Skip to content

Commit

Permalink
Merge pull request #41 from qaqee-DK/master
Browse files Browse the repository at this point in the history
Add scopes
  • Loading branch information
hansemannn authored Mar 13, 2023
2 parents 63469dd + 428f2cd commit 3477830
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ Initialize the module by setting the Google SignIn API key you can get from the
import GoogleSignIn from 'ti.googlesignin';

GoogleSignIn.initialize({
// Required properties
clientID: '<client-id>',

// Optional properties:
serverClientID: '<server-client-id>',
scopes: ['https://www.googleapis.com/auth/plus.login'], // See https://developers.google.com/identity/protocols/googlescopes for more
language: 'de', // Or 'de-DE', 'en-US', etc.
loginHint: 'Titanium rocks!',
hostedDomain: 'https://my-hosted-domain.com',
shouldFetchBasicProfile: false, // Default: true
openIDRealm: 'my-openID-realm',
});
```
Expand Down
10 changes: 2 additions & 8 deletions ios/Classes/TiGooglesigninModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,18 @@ - (void)signIn:(id)unused
hostedDomain:hostedDomain
openIDRealm:openIDRealm];

if (scopes != nil) {
DEPRECATED_REMOVED(@"GoogleSignIn.scopes (removed by Google)", @"5.0.0", @"5.0.0");
}

if (language != nil) {
DEPRECATED_REMOVED(@"GoogleSignIn.language (removed by Google)", @"5.0.0", @"5.0.0");
}

if (loginHint != nil) {
DEPRECATED_REMOVED(@"GoogleSignIn.loginHint (removed by Google)", @"5.0.0", @"5.0.0");
}

if (shouldFetchBasicProfile != nil) {
DEPRECATED_REMOVED(@"GoogleSignIn.shouldFetchBasicProfile (removed by Google)", @"5.0.0", @"5.0.0");
}

[[GIDSignIn sharedInstance] signInWithConfiguration:config
presentingViewController:TiApp.app.controller.topPresentedController
hint:loginHint
additionalScopes:scopes
callback:^(GIDGoogleUser * _Nullable user, NSError * _Nullable error) {
[self fireLoginEventWithUser:user andError:error];
}];
Expand Down
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 6.0.0
version: 6.0.2
apiversion: 2
architectures: arm64 x86_64
description: ti.googlesignin
Expand Down
2 changes: 1 addition & 1 deletion ios/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 11.1.0.GA
TITANIUM_SDK_VERSION = 12.0.0.GA

//
// THESE SHOULD BE OK GENERALLY AS-IS
Expand Down

0 comments on commit 3477830

Please sign in to comment.