Relative Content

Tag Archive for oauth-2.0google-oauth

Is storagerelay in the Redirect URL a Bug in Google OAuth2 Login?

When using Google for OAuth2 login, I found that the https://accounts.google.com/gsi/client JavaScript library adds the storagerelay field to the redirect URL in popup mode. For example, if I set http://example.com/callback in the console, the redirect URL becomes storagerelay://http/example.com?id=auth12345 when obtaining the code. In the second step, when using the code to request an access token, if I set the redirect URL to example.com/callback, it shows a redirect URL mismatch error. If I set it to http://example.com/callback, it indicates that the application violates Google’s security restrictions. However, if I use storagerelay://http/example.com?id=auth12345, it works correctly. I believe this is not normal.