Lock-GooglePlus 1.1.0

Lock-GooglePlus 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Aug 2015

Maintained by Hernan Zalazar.



 
Depends on:
googleplus-ios-sdk~> 1.7.1
Lock/Core~> 1.11
 

  • By
  • Auth0 and Hernan Zalazar

IMPORTANT: Due to Apple rejecting applications using Google+ SDK because of using Safari to authenticate we recommend to avoid using this library until Google fixes its SDK.

Auth0 is an authentication broker that supports social identity providers as well as enterprise identity providers such as Active Directory, LDAP, Google Apps and Salesforce.

Lock-GooglePlus helps you integrate native Login with Google+ iOS SDK and Lock

Requierements

iOS 7+

Install

The Lock-GooglePlus is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Lock-GooglePlus", "~> 1.0"

Then in your project's Info.plist file register a custom URL Type using your app's bundle identifier. For more information please check Google+ Getting Started Guide.

Usage

Just create a new instance of A0GooglePlusAuthenticator

A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID"];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID")

The G+ client id can be obtained from Google's API Dashboard, for more info please check this guide

and register it with your instance of A0Lock

A0Lock *lock = //Get your A0Lock instance
[lock registerAuthenticators:@[googlePlus]];
let lock:A0Lock = //Get your A0Lock instance
lock.registerAuthenticators([googlePlus])

A good place to create and register A0GooglePlusAuthenticator is the AppDelegate.m or AppDelegate.swift files.

API

A0GooglePlusAuthenticator

A0GooglePlusAuthenticator#newAuthenticatorWithClientId

+ (A0GooglePlusAuthenticator *)newAuthenticatorWithClientId:(NSString *)clientId;

Create a new 'A0GooglePlusAuthenticator' using a G+ client identifier

A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID"];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID")

A0GooglePlusAuthenticator#newAuthenticatorWithClientId:andScopes:

+ (A0GooglePlusAuthenticator *)newAuthenticatorWithClientId:(NSString *)clientId andScopes:(NSArray *)scopes;

Create a new 'A0GooglePlusAuthenticator' with a G+ client identifier and a list of scopes for G+ authentication

A0GooglePlusAuthenticator *googlePlus = [A0GooglePlusAuthenticator newAuthenticatorWithClientId:@"G+_CLIENT_ID" andScopes:@[@"profile"]];
let googlePlus = A0GooglePlusAuthenticator.newAuthenticatorWithClientId("G+_CLIENT_ID", andScopes:["profile"])

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

What is Auth0?

Auth0 helps you to:

  • Add authentication with multiple authentication sources, either social like Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others, or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider.
  • Add authentication through more traditional username/password databases.
  • Add support for linking different user accounts with the same user.
  • Support for generating signed Json Web Tokens to call your APIs and flow the user identity securely.
  • Analytics of how, when and where users are logging in.
  • Pull data from other sources and add it to the user profile, through JavaScript rules.

Create a free account in Auth0

  1. Go to Auth0 and click Sign Up.
  2. Use Google, GitHub or Microsoft Account to login.

Author

Auth0

License

Lock-GooglePlus is available under the MIT license. See the LICENSE file for more info.