Skip to content

Painless OAuth 2 drop-in classes extracted from Googles GTM-OAuth 2.0

Notifications You must be signed in to change notification settings

chrhansen/simple-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Simple OAuth 2.0

Currently URL's are set for Google API (Gmail, Google+ etc.) but should work for other OAuth 2.0 services.

  1. Register and app here: https://code.google.com/apis/console/ (or other OAuth 2.0 service)

  2. For Google API be sure to register the Platform as "Other" and NOT "iOS" otherwise you'll get "invalid_client" error when authenticating.

  3. Insert your Client ID and Client Secret in ViewController.m (and optionally change the authentication-url and token-url if you're not using Google API)

  4. Run the app. The sign method is called in viewDidLoad in ViewController.m

  5. When the user has successfully authenticated your viewController:finishedWithAuth:error: will be called (it's also in ViewController.m), here you can also retrieve the access_token for later authentication.

About

Painless OAuth 2 drop-in classes extracted from Googles GTM-OAuth 2.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published