-
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
feat: make nonce handling configurable #107
Conversation
@nhosoya bump |
@nhosoya bump again |
1 similar comment
@nhosoya bump again |
@nhosoya and another bump. Can we please either merge this or get some kind of reaction? |
don't ignore nonce. at least as a library. |
WHAT!!! This PR exactly enables that nonce won't be ignored, it makes it even possible to use it securely! Please reconsider closing this. To rephrase: without this PR you either have to make your session insecure or you just can't use this gem. With this PR you at least have a choice between a secure and a stupid option (I may rephrase the README even more, so it's clear that using |
@nov @nhosoya Another fun fact, if you check almost all recent forks from this repo - what users do is DISABLE nonce validation, so offering them a secure alternative and make it a choice to them to ignore it is at least miles better than having no option and people just randomly disabling nonce while there is a better option. TBH I'm very disappointed that this wasn't even discussed or deeper looked into, but rather just closed, which leaves this implementation in a worse state than WITH this PR. |
Hopping on this thread - at the very least we need to evaluate whether we should be calling |
@davismatt thank you for hopping on. Unfortunately @nov is very unresponsive and I think this gem is mostly dead, which is a shame. The situation that nonce checking is severely broken is ongoing for quite some time and I thought my proposed solution would be a good balance between security and feasibility, alas it was shot down without further discussion |
I ended up monkey patching the verify method to |
@bvogel Hello, I configured nonce: :ignore, and now the "Sign in with Apple" button doesn't work. It fails to access the "users/auth/apple" route. Before I made this configuration, I could access the route and enter my username and password successfully, but it was failing at the callback. The error I'm getting is: this monkypatch work
|
will look into this next week, sorry about that. However, I strongly suggest to not use |
@bvogel One thing I noticed is that the Google Omniauth session has different data compared to this one :/ I also tried configuring it in :local, but it didn't work. Is there any example or tutorial on how to implement this gem? Thanks for your response :) |
@GastonThese if you get the data correctly from Apple and are able to create the user than the job of this gem is done. If you aren't logged in that's something that you'll have to check with the general devise/omniauth integration, as all this gem does is provide the necessary authentication and user info from Apple, how you proceed from there isn't part of this gem. |
@GastonThese I fixed the error in the parameter handling. See #111 |
This PR will introduce a individual handling of the nonce validation that is significantly hindered by Apple with using a POST callback.
Added specs, README too.
fixes #102 and
fixes #103