Giter Site home page Giter Site logo

JWT::DecodeError about omniauth-apple HOT 8 CLOSED

nhosoya avatar nhosoya commented on August 28, 2024 1
JWT::DecodeError

from omniauth-apple.

Comments (8)

anthony-bazhuhin avatar anthony-bazhuhin commented on August 28, 2024 4

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.

ebsbk avatar ebsbk commented on August 28, 2024 2

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.

vilius avatar vilius commented on August 28, 2024 1

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.

NdaJunior avatar NdaJunior commented on August 28, 2024

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.

btalbot avatar btalbot commented on August 28, 2024

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.

NdaJunior avatar NdaJunior commented on August 28, 2024

@btalbot Thank you for your input. Do you know how I can resolve this issue ?

from omniauth-apple.

NdaJunior avatar NdaJunior commented on August 28, 2024

@btalbot I downgraded to 0.0.3 and it works now

from omniauth-apple.

btalbot avatar btalbot commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.