I have deployed Google Sign-In for iOS (Google/SignIn) on CocoaPods, but when I add a scope, the information does not appear to be registered in keyChain.
Assumptions
Please refer to the following site to add processing such as delete.
https://developers.google.com/identity/sign-in/ios/start
How it works
1.Sign In processing with code from within the application.
Each Sign In process with or without additional scope is as follows:
1-1 If you do not want to add a scope
[GIDSignInsharedInstance] signIn;
1-2 Adding Scopes
NSString*tasksScope=@"https://www.googleapis.com/auth/tasks";
NSSstring* calendarScope=@"https://www.googleapis.com/auth/calendar";
NSArray*currentScopes=[GIDSignInsharedInstance].scopes;
NNSArray* additionalScopes= [NSArray arrayWithObjects: tasksScope, calendarScope, nil];
GIDSignInsharedInstance.scopes=[currentScopes arrayByAddingObjectsFromArray:additionalScopes];
[GIDSignInsharedInstance] signIn;
2. Exit the app (Double tap home button & swipe up to drop the app)
3. Re-launch the app and use the following methods to check the storage status of the keychain
[GIDSignInsharedInstance].hasAuthInKeychain
This behavior returns YES if you do not want to add a scope, or NO if you do.
In this case, it seems that every time you hit the API, the user authenticates.
Is there any way to save authentication information in the keychain even if I add a scope?(Something is missing, etc.)
I tried to save the authentication information myself, but I stopped because I thought I couldn't implement it because I didn't get the "client_secret" to use when refreshing tokens.
Also, there may be separate libraries for Google Tasks and Calendar, but when installing with CocoaPods, it seems that the Swift library cannot be installed properly (using use_frameworks!), so we have stopped this direction.
The environment for performing the operational verification is as follows:
iOS 9.3 (Simulator Boot)
XCode Version 7.3
I would appreciate your feedback.
swift ios objective-c
Try setting scopes before hasAuthInKeychain.
529 Uncaught (inpromise) Error on Electron: An object could not be cloned
547 Who developed the "avformat-59.dll" that comes with FFmpeg?
541 Unable to install versioned in Google Colab
689 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
546 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.