Comments (8)
the jwt_options portion provides access to the key fetched from apple using the JWK arguments described here: https://github.com/jwt/ruby-jwt#json-web-key-jwk
It was introduced in jwt (2.2.0). Using jwt < 2.2.0 results in
JWT::DecodeError No verification key available
Also looks like jwt 2.2.0 is not compatible with openssl 1.1.0. So doesn't work in ruby 2.3.x and older:
rvm/rvm#3862 (comment)
from omniauth-apple.
Had the same problem with omniauth-apple (1.0.0) and jwt (2.1.0). Upgrading jwt to 2.2.3 solved the issue
from omniauth-apple.
Thanks @ebsbk - I can confirm this. Same problem with omniauth-apple (1.0.2) and jwt (2.1.0). Upgrading jwt to 2.3.0 solved the issue.
from omniauth-apple.
The issue seems to be coming from line 71 in apple.rb:
payload, _header = ::JWT.decode(id_token, nil, true, jwt_options)
JWT.decode is being called with the second parameter being nil. This nil value is what triggers the exeption
from omniauth-apple.
the jwt_options
portion provides access to the key fetched from apple using the JWK arguments described here: https://github.com/jwt/ruby-jwt#json-web-key-jwk
The nil
second argument is not used (and must be nil) for this use case.
from omniauth-apple.
@btalbot Thank you for your input. Do you know how I can resolve this issue ?
from omniauth-apple.
@btalbot I downgraded to 0.0.3 and it works now
from omniauth-apple.
omniauth-apple 0.0.3 doesn't really work and token validation is broken so it's not secure.
I would need an id-token from you that is not working along with the client_id
value you're using in the omniauth-apple config. The apple issued id-tokens contain an email address so if you're concerned about that leaking, send a token using their @privaterelay.appleid.com service.
from omniauth-apple.
Related Issues (20)
- Authentication failure! HTTP Origin header (https://appleid.apple.com) didn't match request.base_url (https://mysite.com) HOT 8
- nonce is optional in callback HOT 13
- Getting error as id_token_claims_invalid | nonce invalid HOT 2
- Authentication failure! no implicit conversion of String into Array: TypeError, no implicit conversion of String into Array
- Apple SSO Callback Phase throws a OAuth2::AccessToken.from_hash error HOT 1
- ERROR -- omniauth: (apple) Authentication failure! invalid_credentials: OAuth2::Error, invalid_request: {"error":"invalid_request"} HOT 2
- Please, add to Readme some important settings. HOT 3
- Empty request.env['omniauth.auth'] in callback
- Doesn't receive code in mobile browser HOT 2
- "stored_nonce" is nil due to different sessions HOT 9
- Authentication failure! invalid_credentials: OAuth2::Error, invalid_request: {"error":"invalid_request"} HOT 2
- Is Ruby 2.1.1 supported by omniauth-apple ? HOT 3
- Error when callback ? HOT 12
- Can't use Sign In With Apple JS HOT 25
- Fetching keys fails in production HOT 8
- Nonce mismatch Error HOT 10
- Stuck on Request Phase Initiated HOT 1
- Apple's /auth/revoke supported? HOT 1
- Oauth2 version 2.0.0 breaks omniauth-apple HOT 4
- Remove version lock for rack-protection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omniauth-apple.