Google Redirect URI and States

I’m having a problem with the google login plugin.

  1. User is able to sign-in, sign-up from a couple of pages, I have registered both root URL’s as redirect URI’s in Google Console.

  2. After successful sign-in, the page needs to maintain it’s state. For example, I have search results, if the user logs in on that page, I need to keep the search results there.

I tried passing the data in as URL parameters, but found out that Google considers the URL with parameters as distinct from the root URL, so it is disallowed unless registered.

I understand to solve this there is a ‘state’ that can be passed to Google, which it will pass back after authentication, but I don’t see this supported in the Google Login plugin.

This would make Google Login kind of useless for our use cases. Any ideas on how we can achieve what we are looking for without custom code? That would defeat the purpose of ‘no code’. :slight_smile:

Ok, so in case someone else is looking for answer to this. I was able to preserve values in browser storage using a browser storage plugin. I store the values in the browser prior to sign-in and get them after sign-in.

1 Like