Giter Site home page Giter Site logo

ERROR -- omniauth: (apple) Authentication failure! invalid_credentials: OAuth2::Error, invalid_request: {"error":"invalid_request"} about omniauth-apple HOT 2 OPEN

nhosoya avatar nhosoya commented on August 28, 2024
ERROR -- omniauth: (apple) Authentication failure! invalid_credentials: OAuth2::Error, invalid_request: {"error":"invalid_request"}

from omniauth-apple.

Comments (2)

wonderffle avatar wonderffle commented on August 28, 2024 1

After enabling additional logging on the OAuth2 gem, I found that the request to https://appleid.apple.com/auth/token does not include the code param in the request body. The code param was actually passed, but it was null. I was able to bypass omniauth and send a direct request to the apple auth token endpoint including the code param and got back the JWT to decode to get the auth info. When I sent the request a subsequent time without the code param, I got the same error message as above.

INFO -- request: POST https://appleid.apple.com/auth/token
2023-11-07 11:54:23.878003 D [49453:puma srv tp 005] Rails -- (apple) Callback phase initiated.
I, [2023-11-07T11:54:23.881212 #49453] INFO -- request: User-Agent: "Faraday v2.7.4"
Content-Type: "application/x-www-form-urlencoded"
Traceparent: "00-4ppd0xdr93c3195e22f1dbdd788b29f2-248371a21ff04849-01"
Tracestate: "es=s:1.0"
Elastic-Apm-Traceparent: "00-4ccf0fdd93c2795e22f1dbdd777b29f2-265371a21fa04849-01"
I, [2023-11-07T11:54:23.883525 #49453] INFO -- request: {"client_id"=>"com.client.id",
"client_secret"=>"secret",
"grant_type"=>"authorization_code",
"code"=>nil,
"redirect_uri"=>"https://lvh.me"}

from omniauth-apple.

edemagbenyo avatar edemagbenyo commented on August 28, 2024

@wonderffle were you able to resolve the above error?

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.