when i use the app in local (on executing with visual studio) there is no probleme, but when i deploy my project the authentification doesn't work. the probleme is situated here :
string path = HostingEnvironment.MapPath("~/App_Data");
FileDataStore file = new FileDataStore(path);
credential =new GoogleWebAuthorizationBroker().AuthorizeAsync(
new ClientSecrets
{
ClientId = "Client_ID",
ClientSecret = "Client_Secret"
},
Scopes,
"me",
CancellationToken.None
, file
).Result;
Finally I have found a solution (one of X) by my self so let begin:
First we generate the authorization url manually, look:
after that the RedirectUrl which I put on web config will be start after authentication and get a Code as parameter in the link (url with parameter Code), so now you just need to get token access, so lets see this code:
note: