Beispiel #1
0
        public string CompleteOAuthFlow(AuthorizationParameters parameters)//AuthorizationParameters parameters)
        {
            try
            {
                DriveRestClient restClient = new DriveRestClient(AppConstants.GoogleDriveClientId, AppConstants.GoogleDriveClientSecret, googledriveRedirectUrl.ToString());

                DriveToken token = restClient.GetTokenfromCode(parameters.Code);

                Storage.GoogleDrive.Token = token;
                return("OAuth succeeded");
            }
            catch (Exception ex)// ActiveDirectoryAuthenticationException ex)
            {
                return("OAuth failed. " + ex.ToString());
            }
        }