-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove nonce comparison because session['omniauth.nonce']
is nil
#106
Conversation
Rather then removing the nonce claim I opted to store it additionally in a sameSite: :none cookie which only lives during the authentication with apple stage:
add this monkey-patch to an initializer. The session will be a new one in most cases when the callback is invoked with a POST from the apple side. |
@bvogel |
i tried to add this to my initializer and i get this error @bvogel @obregonia1 This error is when it tries to run this line Has anyone experienced something similar? |
better try using the code from PR #107 - we currently run that in our production system. On the other hand a monkey patch like the one above shouldn't be executed during startup, it's just another class definition were only class name and methods are identified. |
I fixed this issue by swapping out def cookies
request.env["action_dispatch.cookies"]
end to def cookies
@_request ||= ActionDispatch::Request.new(request.env)
@_request.cookie_jar
end |
I removed nonce comparison.
I failed authentification with omniauth-apple 1.3.0, and I found that
session['omniauth.nonce']
is nil.session['omniauth.nonce']
is assigned after calledauthorize_params
, butauthorize_params
is never called.In addition,
session['omniauth.nonce']
is generated in application, and id_token[:nonce] is generated server in Apple.ref #102
ref #103