Google Log In not working
See original GitHub issueI can not log in with Google when I deploy the application (doesnt matter if Debug or Release deploy). The Google log-in works on local build but it does not work after deploying to production machine. The localhost and the domain are both whitelisted in the Google Developer Console (http and https).
Log:
Request starting HTTP/1.1 GET http://xxxxxxxxx.com/signin-google?state=xxxxxxx&code=4
/yyyyyyy&authuser=0&session_state=zzzzz&prompt=none
info: Microsoft.AspNetCore.Authentication.Google.GoogleHandler[4]
Error from RemoteAuthentication: OAuth token endpoint failure: Status: BadRequest;Headers: Vary: X-Origin, Origin, Accept-Encoding
Date: Tue, 19 Dec 2017 13:48:23 GMT
Cache-Control: max-age=0, private
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: hq=":443"; ma=2592000; quic=51303431; quic=51303339; quic=51303338; quic=51303337; quic=51303335,quic=":443"; ma=2592000; v="41,39,38,37,35"
Accept-Ranges: none
Transfer-Encoding: chunked
;Body: {
"error": "redirect_uri_mismatch",
"error_description": "Bad Request"
}
;.
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.<HandleRequestAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NetEscapades.AspNetCore.SecurityHeaders.Infrastructure.CustomHeadersMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Joonasw.AspNetCore.SecurityHeaders.Csp.CspMiddleware.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()
Uncommenting the signin-google route does not solve the issue and also causes issues with the Steam OAuth login.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Can't sign in to your Google Account
If you can't sign in to your Google Account in Gmail, Google Drive, Google Play, or elsewhere, select the issue that most closely...
Read more >4 Tips to Fix Can't Sign into Your Google Account Issue
4 Tips to Fix Can't Sign into Your Google Account Issue · Tip 1. Clear the Chrome Browser Caches · Tip 2. Reset...
Read more >What to Do If You Can't Log In to Your Google Account
For a password or credentials issue, you would go through the “Forgot email?” link below the login prompt or start Google's Automated Account ......
Read more >8 Simple Fixes to Try if You Can't Sign into Gmail
How do I fix the Google Account sign-in problem? · 1. Try an alternative browser · 2. Is Gmail down? · 3. Reset...
Read more >Couldn't Sign You in: Fix Google Account Login in 2023
Here is the Guide to Fix the Google Account Login issue, Couldn't Sign You in or Google Couldn't Verify this Account Belongs to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ahhh, it must be this line then. Better if this is a configuration coming from appsettings.json as well. I will update that. But meanwhile try by changing this. Note, if you have already seeded the database, you need to update your datastore accordingly.
@Trojaner25 @pvagnini This setting is in appsettings.json and appsettings.Development.json based on which environment you are configuring. also, this should fix couple of other issue. Let me know if you find any other issues.