Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth Authentication Iphone

I am doing an iPhone app which requires OAuth 2.0 protocol to be implemented for the login of the user to a particular website. I have the client id and client secret which i got after registering my application on the website. I would like to know a few things about this.

  1. I saw a number of links regarding this. But yet in my head I'm not very sure of whether i need to use OAuth classes or OAuth consumer classes?

  2. Is authentication of the user possible in OAuth without sending the email id and password of the user in a query string?

  3. Is is possible to load the website in a uiwebview and login to the website and get the user credentials for the further screen functionalities.

This is the first kind of such an app I'm developing. It would be great if someone could help me out so that i can know clearly how i should go about.

EDIT: if there any good tutorials for achieving Login to a website using OAuth please do share.

Thanks in advance

like image 694
Sharanya K M Avatar asked Apr 24 '12 11:04

Sharanya K M


People also ask

Does the iOS Mail app support modern authentication (OAuth2)?

Yes, keep in mind that web outlook connections are already on Modern Authentication. iPhone users will have to change their settings, its not dynamic. Does the iOS Mail app with version iOS 12 or higher support Modern Authentication (oAuth2.0)? Yes.

How to improve user authentication in iOS devices?

Make it easy for users to log into apps and services. Use the Authentication Services framework to improve the experience of users when they enter credentials to establish their identity. Give users the ability to sign into your services with their Apple ID.

What is an authentication object in iOS 14?

An object that performs a request to modify an account’s authentication properties. A view controller that can upgrade user passwords to strong passwords, or convert accounts to use Sign in with Apple. An object that you interact with to change an account’s password or to upgrade to Sign in with Apple.

How do you authenticate a user in an app?

Use a web authentication session to authenticate a user in your app. Use time-based codes generated on-device for a secure authentication experience. A session that an app uses to authenticate a user through a web service. A mechanism for generating requests to authenticate users with third-party providers.


1 Answers

OAuth spec and documentations

  • OAuth 1.0 protocol: https://www.rfc-editor.org/rfc/rfc5849
  • OAuth 2.0 protocol: https://www.rfc-editor.org/rfc/rfc6749
  • http://oauth.net/documentation/getting-started/
  • http://hueniverse.com/oauth/

SDKs for OAuth on iOS

  • YToolkit (OAuth 1.0 & 2.0)
    • Source on GitHub
  • OAuthConsumer (OAuth 2.0)
    • Source on Google Code
    • Wiki
  • LROAuth2Client (OAuth 2.0)
    • Source on GitHub
    • Simple document
    • Demo project
  • MPOAuthConnection (OAuth 1.0)
    • Source on GitHub
    • Wiki

(Speaking of "a particular website", does it have official or third-party SDK for iOS? If yes then you don't need to implement OAuth authorization yourself.)

like image 107
Hailei Avatar answered Oct 19 '22 18:10

Hailei