I'm running a website that works great on Google Cloud Platform but there is a issue that I'm unable to resolve at code level on my website and I think it is related to GCP.
On the website the users can connect quickly through a Google account, the thing is that it works great only while the website is working on a local server and not while the website is in the cloud.
So far I have read about it a lot and changed a lot of things at the code level and settings but it does not solve the problem, once someone tries to log in through an existing Google account the website fails to read his details and it bring him back to login form page, without even show any error message.
My code so far, In Startup.Auth page:
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "xyz",
ClientSecret = "xyz",
});
In GCP I followed these steps to allow external login on the website:
And as I mentioned, this work excelnet on localhost but not when the website on the cloud.
Did I miss any step?
I found a solution to the problem, thanks to Anders Abel,
It turns out that this is a known bug, the system is unable to pass cookies with details of the user who try to log in..and there are many different solutions to this problem, in my case the solution was to add a library called Kentor.OwinCookieSaver and apply it in the Startup class.
You can read more about the subject at the following link: https://stackoverflow.com/a/26978166/11429682