Last active
May 19, 2017 06:57
-
-
Save Clancey/d662e64c45295901bb2b6534974ceae5 to your computer and use it in GitHub Desktop.
Native Google Auth setup for Simple Auth. https://github.com/clancey/simpleauth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#iOS Setup | |
// In Appdelegate override OpenUrl (UIApplication app, NSUrl url, NSDictionary options) and add | |
return SimpleAuth.Native.OpenUrl(app, url, options); | |
//#Android | |
//In Activity override OnCreate and add | |
SimpleAuth.Providers.Google.Init(this.Application); | |
//In Activity override OnActivityResult(int requestCode, Result resultCode, Intent data) and add | |
SimpleAuth.Native.OnActivityResult (requestCode,resultCode,data); | |
//Make Api calls | |
var api = new GoogleApi("google","clientid","clientsecret"); | |
var user = await api.GetUserInfo(); | |
//For more info: https://github.com/clancey/simpleauth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment