} //singleton public void Initialize(Context context) { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .RequestProfile() .Build(); //_googleApiClient = new GoogleApiClient.Builder(context) // //.AddApi(Auth.GOOGLE_SIGN_IN_API, gso) // .AddConnectionCallbacks(this) // .AddOnConnectionFailedListener(this) // .AddApi(DriveClass.API).AddScope(new Scope(Scopes.DriveFile)) // .Build(); // //auth _googleApiClient = new GoogleApiClient.Builder(context) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); if (!_googleApiClient.IsConnected) { _googleApiClient.Connect(); //logout: GoogleManager._googleApiClient.Disconnect(); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); et_username = FindViewById <EditText>(Resource.Id.et_username); et_passwd = FindViewById <EditText>(Resource.Id.et_passwd); bt_simpleLogin = FindViewById <Button>(Resource.Id.bt_login); bt_googleLogin = FindViewById <Button>(Resource.Id.bt_Google_login); bt_simpleLogin.SetOnClickListener(this); bt_googleLogin.SetOnClickListener(this); // Configure sign-in to request the user's ID, email address, and basic // profile. ID and basic profile are included in DEFAULT_SIGN_IN. GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(Resources.GetString(Resource.String.GoogleClientKey)) .RequestEmail() .Build(); // Build a GoogleApiClient with access to the Google Sign-In API and the // options specified by gso. mGoogleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); }
private static GoogleApiClient BuildGoogleApiClient() { #if DEBUG GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("59954122652-54snfl95i3cigj67phdjpvovvrokn4ec.apps.googleusercontent.com") .RequestEmail() .Build(); #else GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("711636366543-0tmtrgmtp43d4q60c31alhur9j2m8ha2.apps.googleusercontent.com") .RequestEmail() .Build(); #endif var builder = new GoogleApiClient.Builder(CrossCurrentActivity.Current.Activity) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso); if (CrossCurrentActivity.Current.Activity is GoogleApiClient.IConnectionCallbacks connectionCallbackHandler) { builder.AddConnectionCallbacks(connectionCallbackHandler); } if (CrossCurrentActivity.Current.Activity is GoogleApiClient.IOnConnectionFailedListener connectionFailedHandler) { builder.AddOnConnectionFailedListener(connectionFailedHandler); } return(builder.Build()); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); mStatusTextView = FindViewById <TextView>(Resource.Id.status); FindViewById(Resource.Id.sign_in_button).SetOnClickListener(this); FindViewById(Resource.Id.sign_out_button).SetOnClickListener(this); FindViewById(Resource.Id.disconnect_button).SetOnClickListener(this); // [START configure_signin] // Configure sign-in to request the user's ID, email address, and basic // profile. ID and basic profile are included in DEFAULT_SIGN_IN. GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); // [END configure_signin] // [START build_client] // Build a GoogleApiClient with access to the Google Sign-In API and the // options specified by gso. mGoogleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); // [END build_client] // [START customize_button] // Set the dimensions of the sign-in button. var signInButton = FindViewById <SignInButton>(Resource.Id.sign_in_button); signInButton.SetSize(SignInButton.SizeStandard); // [END customize_button] }
public GoogleSignInOptions GetGoogleSignInOptions() { gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); return(gso); }
//====================================================== #region Google //Event Click login using google private void GoogleSignInButtonOnClick(object sender, EventArgs e) { try { if (MGoogleSignInClient == null) { // Configure sign-in to request the user's ID, email address, and basic profile. ID and basic profile are included in DEFAULT_SIGN_IN. var gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(AppSettings.ClientId) .RequestScopes(new Scope(Scopes.Profile)) .RequestScopes(new Scope(Scopes.PlusMe)) .RequestScopes(new Scope(Scopes.DriveAppfolder)) .RequestServerAuthCode(AppSettings.ClientId) .RequestProfile().RequestEmail().Build(); MGoogleSignInClient ??= GoogleSignIn.GetClient(this, gso); } var signInIntent = MGoogleSignInClient.SignInIntent; StartActivityForResult(signInIntent, 0); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void PrepareGoogleSignIn() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); _googleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this, new GoogleConnectionFailedCallback() { Activity = this }) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); googleSignInButton = FindViewById <SignInButton>(Resource.Id.signIn_GoogleSignInButton); for (int i = 0; i < googleSignInButton.ChildCount; i++) { View v = googleSignInButton.GetChildAt(i); if (v is TextView tv) { tv.SetPadding(0, 0, 20, 0); return; } } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_login); // Create your application here register = FindViewById <TextView>(Resource.Id.link_signup); // google = FindViewById<TextView>(Resource.Id.google_button); login = FindViewById <Button>(Resource.Id.btn_login); // signout = FindViewById<Button>(Resource.Id.logout); register.Click += OnClickedEvent; login.Click += OnLoginEvent; // Create your application here FindViewById(Resource.Id.google_button).SetOnClickListener(this); // FindViewById(Resource.Id.logout).SetOnClickListener(this); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); mgoogleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); }
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); base.OnRequestPermissionsResult(requestCode, permissions, grantResults); FirebaseApp.InitializeApp(context); FirebaseAuth_ = FirebaseAuth.Instance; if (FirebaseAuth_ == null) { FirebaseAuth_ = new FirebaseAuth(FirebaseApp.Instance); } GoogleSignInOptions signInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("926850429943-envuu4ga9i133mbaq5hd77g1b9bdcrj5.apps.googleusercontent.com") .RequestEmail() .RequestId() .Build(); GoogleApiClient = new GoogleApiClient.Builder(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, signInOptions) .Build(); GoogleApiClient.Connect(); GoogleSignIn(); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main); if (savedInstanceState != null) { IsResolving = savedInstanceState.GetBoolean(KEY_IS_RESOLVING); ShouldResolve = savedInstanceState.GetBoolean(KEY_SHOULD_RESOLVE); } FindViewById(Resource.Id.sign_in_button).SetOnClickListener(this); FindViewById(Resource.Id.sign_out_button).SetOnClickListener(this); //TODO remove oauth client id var gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("oauth_client_id") .RequestEmail() .RequestProfile() .Build(); GoogleApiClient = new GoogleApiClient.Builder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddScope(new Scope(Scopes.Email)) .AddScope(new Scope(Scopes.Profile)) .Build(); }
public IObservable <string> GetAuthToken() { lock (lockable) { if (isLoggingIn) { return(subject.AsObservable()); } isLoggingIn = true; subject = new Subject <string>(); var activity = Mvx.Resolve <IMvxAndroidCurrentTopActivity>().Activity as FragmentActivity; var signInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("{TOGGL_DROID_GOOGLE_SERVICES_CLIENT_ID}") .RequestEmail() .Build(); var googleApiClient = new GoogleApiClient.Builder(activity) .EnableAutoManage(activity, onError) .AddApi(Auth.GOOGLE_SIGN_IN_API, signInOptions) .Build(); var intent = Auth.GoogleSignInApi.GetSignInIntent(googleApiClient); StartActivityForResult(googleSignInResult, intent); return(subject.AsObservable()); } }
public static GoogleApiClient ConfigureGoogleSignIn(Context context) { //if (context is IOnCompleteListener && context is GoogleApiClient.IConnectionCallbacks && context is GoogleApiClient.IOnConnectionFailedListener) if (context is LoginActivity) { //var onComplete = context as IOnCompleteListener; //var goooglConncectionCallBack = context as GoogleApiClient.IConnectionCallbacks; //var goooglConncectionFail = context as GoogleApiClient.IOnConnectionFailedListener; var LoginContext = (LoginActivity)context; GoogleSignInOptions gso = new GoogleSignInOptions .Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(context.GetString(Resource.String.server_client_id)) .RequestEmail() .Build(); var _googleApiClient = new GoogleApiClient .Builder(LoginContext) .EnableAutoManage(LoginContext, LoginContext).AddOnConnectionFailedListener(LoginContext) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddConnectionCallbacks(LoginContext).Build(); return(_googleApiClient); } return(null); }
public async Task <GoogleSignInResult> Authenticate(string serverClientId, params string[] scopes) { var googleScopes = scopes?.Select(s => new Scope(s))?.ToArray(); var gsoBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(serverClientId) .RequestEmail() ; //if (googleScopes != null && googleScopes.Any()) // gsoBuilder = gsoBuilder.RequestScopes(googleScopes.First(), googleScopes.Skip(1)?.ToArray()); var gso = gsoBuilder.Build(); var activity = CurrentActivity; googleApiClient = await new GoogleApiClient.Builder(activity) .EnableAutoManage(activity, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .BuildAndConnectAsync(); var signInIntent = Auth.GoogleSignInApi.GetSignInIntent(googleApiClient); if (tcsSignIn != null && !tcsSignIn.Task.IsCompleted) { tcsSignIn.TrySetCanceled(); } tcsSignIn = new TaskCompletionSource <GoogleSignInResult>(); activity.StartActivityForResult(signInIntent, SIGN_IN_REQUEST_CODE); return(await tcsSignIn.Task); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); var containerBuilder = new ContainerBuilder(); var application = new AndroidTrackerApplication(); containerBuilder.RegisterInstance(application).As <TrackerApplication>(); containerBuilder.RegisterInstance(this).As <IAuthenticate>(); PlatformServiceRegistrar.RegisterServices(containerBuilder); LoadApplication(application); var signInOptions = new GoogleSignInOptions .Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("379304893141-r75kkh22memf9mi873od0pittmtdj3tp.apps.googleusercontent.com") .Build(); _googleApiClient = new GoogleApiClient.Builder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, signInOptions) .Build(); }
public async Task <bool> SignOut(string serverClientId) { try { var gsoBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(serverClientId) .RequestServerAuthCode(serverClientId) .RequestEmail(); var gso = gsoBuilder.Build(); googleApiClient = new GoogleApiClient.Builder(CurrentActivity) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); googleApiClient.Connect(); await connectedTask.Task; var result = await Auth.GoogleSignInApi.SignOut(googleApiClient).AsAsync <Statuses> (); return(true); } finally { googleApiClient?.UnregisterConnectionCallbacks(this); googleApiClient?.Disconnect(); } //var result = await Auth.GoogleSignInApi.SignOut (googleApiClient).AsAsync<ResultS> (); //result. }
protected override async void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Forms.Init(this, bundle); XamForms.Controls.Droid.Calendar.Init(); var gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .RequestIdToken("723494873981-np3v1u9js6jman2qri5r0gfd7fl3g3c2.apps.googleusercontent.com") .Build(); MGoogleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); var check = await Services.UserService.Instance.IsLoggedUser(); if (check) { LoadApplication(new App()); } else { SignIn(); } }
internal GoogleClientManager() { if (CurrentActivity == null) { throw new GoogleClientNotInitializedErrorException(GoogleClientBaseException.ClientNotInitializedErrorMessage); } var gopBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail(); if (!string.IsNullOrWhiteSpace(_serverClientId)) { gopBuilder.RequestServerAuthCode(_serverClientId, false); } if (!string.IsNullOrWhiteSpace(_clientId)) { gopBuilder.RequestIdToken(_clientId); } foreach (var s in _initScopes) { gopBuilder.RequestScopes(new Scope(s)); } GoogleSignInOptions googleSignInOptions = gopBuilder.Build(); // Build a GoogleSignInClient with the options specified by gso. mGoogleSignInClient = GoogleSignIn.GetClient(CurrentActivity, googleSignInOptions); }
public void Logout() { var gsoBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn).RequestEmail(); GoogleSignIn.GetClient(_context, gsoBuilder.Build())?.SignOut(); _googleApiClient.Disconnect(); }
public async Task <GoogleSignInResult> Authenticate(GoogleAuthenticator authenticator) { var activity = CurrentActivity; CheckGooglePlayServices(activity); try { var googleScopes = authenticator.Scope?.Select(s => new Scope(s))?.ToArray(); var clientID = GoogleAuthenticator.GetGoogleClientId(authenticator.ClientId); var serverId = GoogleAuthenticator.GetGoogleClientId(authenticator.ServerClientId); var gsoBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail(); if (serverId != null) { gsoBuilder.RequestIdToken(serverId); } if (authenticator.Scope != null) { foreach (var scope in authenticator.Scope) { gsoBuilder.RequestScopes(new Scope(scope)); } } var gso = gsoBuilder.Build(); googleApiClient = new GoogleApiClient.Builder(activity) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); googleApiClient.Connect(); var signInIntent = Auth.GoogleSignInApi.GetSignInIntent(googleApiClient); if (tcsSignIn != null && !tcsSignIn.Task.IsCompleted) { tcsSignIn.TrySetCanceled(); } tcsSignIn = new TaskCompletionSource <GoogleSignInResult>(); activity.StartActivityForResult(signInIntent, SIGN_IN_REQUEST_CODE); var success = await tcsSignIn.Task; return(success); } finally { googleApiClient?.UnregisterConnectionCallbacks(this); googleApiClient?.Disconnect(); } }
public GoogleService(Activity activity) { _activity = activity; var gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(activity.GetString(Resource.String.default_web_client_id)) .RequestEmail() .Build(); _client = GoogleSignIn.GetClient(activity, gso); }
private void ConfigureGoogleSignIn() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("402739675097-9m67mrteg0df8qm3nas2aa61il5gril9.apps.googleusercontent.com") .RequestEmail() .Build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .EnableAutoManage(this, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); }
// Third partys private void ImgGooglePlay_Click(object sender, EventArgs e) { string serverClientId = Resources.GetString(Resource.String.server_client_id); GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultGamesSignIn) .RequestServerAuthCode(serverClientId) .Build(); GoogleSignInClient googleSignInClient = GoogleSignIn.GetClient(this, googleSignInOptions); Intent signInIntent = googleSignInClient.SignInIntent; StartActivityForResult(signInIntent, 9003); }
private void ConfigureGoogleSign() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); mGoogleApiClient = new GoogleApiClient.Builder(Activity) .EnableAutoManage(Activity, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddConnectionCallbacks(this) .Build(); }
public void ConfigureGoogleSignInWithCache() { GoogleSignInOptions options = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn).RequestProfile().RequestEmail().Build(); apiClient = new GoogleApiClient.Builder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, options) .Build(); getConnectionResult(); }
private GoogleSignInClient BuildSignInClient() { var signInOptions = new GoogleSignInOptions .Builder(GoogleSignInOptions.DefaultSignIn) //.RequestScopes(DriveClass.ScopeFile, DriveClass.ScopeAppfolder) .RequestProfile() .RequestEmail() .Build(); var activity = _fromActivity ? _activity : _fragment.Activity; return(GoogleSignIn.GetClient(activity, signInOptions)); }
public AndroidGoogleService() { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); _googleApiClient = new GoogleApiClient.Builder(((MainActivity)Forms.Context).ApplicationContext) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddScope(new Scope(Scopes.Profile)) .Build(); }
public GoogleApiClient GoogleLogin(Context context, FragmentActivity fragmentActivity, GoogleApiClient.IOnConnectionFailedListener onConnectionFailedListener, GoogleApiClient.IConnectionCallbacks onconnectionCallbacks) { GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); GoogleApiClient mgoogleApiClient = new GoogleApiClient.Builder(context) .EnableAutoManage(fragmentActivity, onConnectionFailedListener) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddConnectionCallbacks(onconnectionCallbacks) .Build(); return(mgoogleApiClient); }
public GoogleServiceAndroid() { var signInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken("{TOGGL_DROID_GOOGLE_SERVICES_CLIENT_ID}") .RequestEmail() .Build(); googleApiClient = new GoogleApiClient.Builder(Application.Context) .AddConnectionCallbacks(login) .AddOnConnectionFailedListener(onError) .AddApi(Auth.GOOGLE_SIGN_IN_API, signInOptions) .Build(); }
protected override void OnStart() { base.OnStart(); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestEmail() .Build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .Build(); mGoogleApiClient.Connect(); }
public GoogleManager() { Instance = this; GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn).RequestEmail().Build(); _googleApiClient = new GoogleApiClient.Builder(Android.App.Application.Context) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .AddScope(new Scope(Scopes.Profile)) .Build(); }
public async Task<GoogleSignInResult> Authenticate(string serverClientId, params string[] scopes) { var googleScopes = scopes?.Select(s => new Scope(s))?.ToArray(); var gsoBuilder = new GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn) .RequestIdToken(serverClientId) .RequestEmail () ; //if (googleScopes != null && googleScopes.Any()) // gsoBuilder = gsoBuilder.RequestScopes(googleScopes.First(), googleScopes.Skip(1)?.ToArray()); var gso = gsoBuilder.Build(); var activity = CurrentActivity; googleApiClient = await new GoogleApiClient.Builder(activity) .EnableAutoManage(activity, this) .AddApi(Auth.GOOGLE_SIGN_IN_API, gso) .BuildAndConnectAsync(); var signInIntent = Auth.GoogleSignInApi.GetSignInIntent(googleApiClient); if (tcsSignIn != null && !tcsSignIn.Task.IsCompleted) tcsSignIn.TrySetCanceled(); tcsSignIn = new TaskCompletionSource<GoogleSignInResult>(); activity.StartActivityForResult(signInIntent, SIGN_IN_REQUEST_CODE); return await tcsSignIn.Task; }