public async Task <ActionResult> GoogleSignInAsync(GoogleAccount account)
        {
            try
            {
                var oauth  = new GoogleAuthentication(this.Tenant);
                var result = await oauth.AuthenticateAsync(account, this.RemoteUser).ConfigureAwait(false);

                return(await this.OnAuthenticatedAsync(result).ConfigureAwait(true));
            }
            catch (NpgsqlException)
            {
                return(this.AccessDenied());
            }
        }
        public async Task <ActionResult> GoogleSignInAsync(GoogleAccount account)
        {
            try
            {
                var oauth  = new GoogleAuthentication();
                var result = await oauth.AuthenticateAsync(account, this.RemoteUser);

                return(OnAuthenticated(result));
            }
            catch (NpgsqlException)
            {
                return(this.AccessDenied());
            }
        }
示例#3
0
        public async Task <ActionResult> GoogleSignInAsync(GoogleAccount account)
        {
            try
            {
                GoogleAuthentication oauth  = new GoogleAuthentication();
                LoginResult          result =
                    await oauth.AuthenticateAsync(account, this.RemoteUser);

                return(OnAuthenticated(result));
            }
            catch (NpgsqlException)
            {
                return(Json("Access is denied."));
            }
        }