Cannot signup with google?

AI-generated summary

User Young encountered a “400: Error: redirect_uri_mismatch” when trying to sign up via Google on their Discourse site. simon suggested verifying the Authorized Redirect URI in Google’s OAuth settings matches https://forum.example.com/auth/google_oauth2/callback, with the correct domain and protocol. Young confirmed they had entered it correctly, but pfaffman pointed out it likely wasn’t — possibly due to missing https, trailing spaces, or slashes. After rechecking, Young realized the field had been accidentally cleared and resolved the issue. simon also reminded them to ensure Google logins are enabled in Discourse settings, referencing the official setup guide. The issue was ultimately a misconfiguration in Google’s OAuth redirect URI, not a Discourse bug.

Just bought the standard package and setup my website. I followed the tutorial and setup google signup. But when I click on the with google button, it showed this page:

400: Error: redirect_uri_mismatch

The redirect URI in the request, xxx/auth/google_oauth2/callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/114890565295-bf2ojd8c9cggp8na3h29j78ghnmo0fo7.apps.googleusercontent.com?project=[114890565295](tel:114890565295)

What’s going on? How do I fix it?

I have seen that error message when the URL that has been added to the ‘Authorized Redirect URI’ section on Google is incorrect. It should be set to

https://forum.example.com/auth/google_oauth2/callback

Replace forum.example.com with your site’s domain.

That’s exactly what I added in google.

Did you enable Google logins on your Discourse site? It’s in step 9 of Configure Google login for Discourse. Try going through that guide again and make sure everything has been setup correctly.

It almost certainly isn’t. Make sure that it’s https. Trailing slash or space could also be a problem.

Oh, somehow the field was cleared. Thanks.