GoogleWebAuthorizationBroker.AuthorizeAsync is not working on Server


GoogleWebAuthorizationBroker.AuthorizeAsync is not working on localhost but not working in server


Asked by:- RahulPatel
0
: 233 At:- 2/25/2021 11:05:51 AM
c# GoogleWebAuthorizationBroker.AuthorizeAsync is not working on Server

please edit and update your question to provide more details like Current code, and error details or your question will be closed as we cannot understand what is the issue, thanks 0
By : vikas_jk - at :- 2/25/2021 11:54:34 AM





1 Answers
profileImage Answered by:- bhanu

As there isn't any code details or error details, so I can suggest this code

private static readonly IAuthorizationCodeFlow flow =
        new GoogleAuthorizationCodeFlow(new GoogleAuthorizationCodeFlow.Initializer
            {
                ClientSecrets = new ClientSecrets
                {
                    ClientId = "PUT_CLIENT_ID_HERE",
                    ClientSecret = "PUT_CLIENT_SECRET_HERE"
                },
                Scopes = new[] { DriveService.Scope.Drive },
                DataStore = new FileDataStore("Drive.Api.Auth.Store")
            });

Consider checking these links

https://stackoverflow.com/questions/42835914/googlewebauthorizationbroker-is-not-working-from-iis-host

https://github.com/googleapis/google-api-dotnet-client/issues/888

https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#web-applications-aspnet-mvc

Thanks

0
At:- 3/3/2021 2:56:00 PM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use