public LoginViewModel(IFacebookAuthenticationDelegate authenticationDelegate) { _authenticationDelegate = authenticationDelegate; #region Google Auth //var authenticator = new OAuth2Authenticator( // "789305869203-akr5j5oh0d54r7tqsko9qp25ilpktnse.apps.googleusercontent.com", // null, // "https://www.googleapis.com/auth/plus.login", // new Uri(Constants.AuthorizeUrl), // new Uri("https://console.developers.google.com/apis/credentials?project=applied-abbey-111204"), // new Uri(Constants.AccessTokenUrl), // null, // true); #endregion #region Facebook Auth _authenticator = new OAuth2Authenticator( clientId: "185501372058546", scope: "email", authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth/"), redirectUrl: new Uri("https://www.facebook.com/connect/login_success.html"), // switch for new Native UI API // true = Android Custom Tabs and/or iOS Safari View Controller // false = Embedded Browsers used (Android WebView, iOS UIWebView) // default = false (not using NEW native UI) isUsingNativeUI: true); _authenticator.Completed += OnAuthCompleted; _authenticator.Error += OnAuthError; #endregion LoginButtonTappedCommand = new Command(OnLoginButtonTapped); }
public FacebookAuthenticator(string clientId, string scope, IFacebookAuthenticationDelegate authenticationDelegate) { _authenticationDelegate = authenticationDelegate; _auth = new OAuth2Authenticator(clientId, scope, new Uri(AuthorizeUrl), new Uri(RedirectUrl), null, IsUsingNativeUI); _auth.Completed += OnAuthenticationCompleted; _auth.Error += OnAuthenticationFailed; }
public FacebookAuthenticator(string clientId, string scope, IFacebookAuthenticationDelegate authenticationDelegate) { _authenticationDelegate = authenticationDelegate; _authAuthentificator = new OAuth2Authenticator(clientId, scope, new Uri(AUTORIZE_URL), new Uri(REDIRECT_URL), null, IS_USING_NATIVE_UI); _authAuthentificator.Completed += ProcessAuthenticationCompleted; _authAuthentificator.Error += ProcessAuthenticationFailed; }
public FacebookAuthenticator(string clientId, string scope, IFacebookAuthenticationDelegate authenticationDelegate) { _authenticationDelegate = authenticationDelegate; _auth = new OAuth2Authenticator(clientId, "", new Uri("https://m.facebook.com/dialog/oauth/"), new Uri("http://www.facebook.com/connect/login_success.html"), isUsingNativeUI: IsUsingNativeUI) { ShowErrors = false, AllowCancel = true }; _auth.Completed += OnAuthenticationCompleted; _auth.Error += OnAuthenticationFailed; }