Closed helderasmoreira closed 3 years ago
I am also seeing issues in my testing. Looking into it more now, seems the redirect_uri specified is not the one being sent to google.
i'm having the same problem, redirect_url is not working
I'm also have the same problem, redirect_url is not working as expected
I have just tested against master and can confirm that redirect_uri is working. Please let me know if you still have issues.
@heldersantosmoreira were you able to get this to work? I am running into this issue as well. I tried passing a redirect_uri param as well but it seems to only work with the default
@andrewdang17 to be honest I found no solution at the time and ended up giving up and using the default value. Not sure what's the situation in the latest version.
This still seams to be an issue, running rails 7.0.4
& omniauth-google-oauth2 1.1.1
Has anyone found a solution?
configuration
Pretty vanilla Rails 6 application with the latest version of this gem.
description
I've been exploring the possible options that one can pass to the provider when configuring and I've found what I believe is a weird behaviour related to the
redirect_uri
.If I set it in my configuration for something else than the default (
/auth/google_oauth2/callback
):this seems to prevent the Callback phase from initiating. The request is redirected to my
redirect_uri
but since there is no callback phase, there is no exchange of the authorization code for the access token and the process seems to hang mid way, leavingrequest.env['omniauth.auth']
to benil
.If I were to just switch the above to use the default value (or remove the hash):
things change and the callback phase is initiated as expected, the code is exchanged for a token and
request.env['omniauth.auth']
is set properly.Am I missing something? Has anyone customized the
redirect_uri
and has a different experience perhaps?