-
Notifications
You must be signed in to change notification settings - Fork 100
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
"stored_nonce" is nil due to different sessions #58
Comments
session cookies will only be sent to your site in the callback from apple if the Same-Site policy is |
Hi @btalbot , thanks for answering. I have checked that the Same-Site policy for our session cookies are already set to |
Oh, sorry, the Same-Site policy must be |
Hi @btalbot , I can confirm that setting the Same-Site policy of our |
Not any good ones that I know of. You can consider setting it to Same-Site=None in the request phase and then change it back to Same-Site=Lax when complete (success or failure). Other than that, it's an issue with how apple structures the callback request. They send it with Origin and Referrer both set to an appleid.com domain so no Lax cookies allowed. |
Thanks @btalbot for the replies. I'll think about this. Your comments saved me from not being able to sleep lol. |
Note that Same-Site=None doesn't give 3rd parties access to the cookies. It just allows them to make requests to your site via a script on your users browser and the cookies will be sent to you. It is a XSRF risk which is what the Same-Site setting was intended to address. No clue why apple does it that way. |
I having this same issue. Setting SameSite to None does not allow Chrome to use Apple Sign In. |
see #107. |
Hi all,
I would appreciate if I can get some help on the verification of
nonce
.During the phase of
verify_nonce!
, thestored_nonce
and the value frompayload['nonce']
are different.I did a bit more debugging, apparently
stored_nonce
returnsnil
. It seems like Rails has created a new session, hencenew_nonce
andstored_nonce
are referring to different sessions. Have a look at thebyebug
output below.In
#new_nonce
:In
#stored_nonce
:Final result: users are logged in, but getting the flash error message:
FYI, I am using this gem together with
devise
.Wondering whether other people are experiencing the same issue and able to find a solution.
Thanks, looking forward to your replies.
The text was updated successfully, but these errors were encountered: