Closed alec-c4 closed 2 years ago
I've used a debugger and as i see
[9] pry(#<Users::OmniauthCallbacksController>)> request.env['omniauth.auth']
=> nil
I haven't seen this. @JacobMarq any ideas?
For some reason it looks like auth
is not defined. Where are you defining that? Is that merely reading request.env['omniauth.auth']
?
The error seems to be the JWT processing...
21:40:15 web.1 | D, [2022-09-04T21:40:15.075161 #89262] DEBUG -- omniauth: (google) Callback phase initiated.
21:40:15 web.1 | OAuth2::AccessToken.from_hash: `hash` contained more than one 'token' key (["access_token", "id_token"]); using "access_token".
21:40:15 web.1 | E, [2022-09-04T21:40:15.348641 #89262] ERROR -- omniauth: (google) Authentication failure! Invalid segment encoding: JWT::DecodeError, Invalid segment encoding
21:40:15 web.1 | 2022-09-04 21:40:15.354212 D [89262:puma srv tp 004] Users::OmniauthCallbacksController -- Processing #failure
Looks like OAuth2
chose the access_token
, and then blew up. Perhaps it should have selected the id_token
?
I have a different problem, where JWT decoding fails:
But is also fixed by your PR #431 👌
Hey! I have a strange behaviour of the gem v1.1.0 (1.0.1 works fine with the same code):
to reproduce - just create an test app with my template https://github.com/alec-c4/ks-rails-bootstrap and try to login using google.If you downgrade to 1.0.1 - it will work fine