Skip to content

Instantly share code, notes, and snippets.

@Clancey
Last active May 19, 2017 06:57
Show Gist options
  • Save Clancey/d662e64c45295901bb2b6534974ceae5 to your computer and use it in GitHub Desktop.
Save Clancey/d662e64c45295901bb2b6534974ceae5 to your computer and use it in GitHub Desktop.
Native Google Auth setup for Simple Auth. https://github.com/clancey/simpleauth
//#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