Google oauth login from any page suggestions

When setting up Google Oauth signup/login, we have to provide the “redirect URIs” in the Google console. It seems users are only able to sign up/login if they are coming from the specific URIs that we provided to Google, otherwise the user gets an error “rediruct_uri_mismatch” and is unable to log in.

I’d like to have a login button in my site header where users can log in from ANY page on my website. I’m unable to simply add all pages to the google Console as my site makes new, dynamic URIs often.

Any suggestions for allowing the users to log in with google from any page on my website? Thanks for any help!

Update: Found this old thread with some potential solutions.

Any other solutions would be much appreciated.

Update:

Did a simple workaround to send user to signup/login page, and then return the user to the page they were previously viewing after successfully signing up/logging in:

  1. Created a separate sign-up/login page that is set as the “authorised redirect URI”
  2. Created a new text field in the “users” data type. This will store a URL in the next step.
  3. Created workflow for when user clicks the “login/signup” button that saves the current page’s URL in the new text field for the ‘current user’. Then navigates user to the signup/login page.
  4. Created workflow to signup/login the user after they press my signup/login with google button. Then navigate to external website (current user’s new text field from step 2/3).

This topic was automatically closed after 70 days. New replies are no longer allowed.