pow-auth / assent

Multi-provider framework in Elixir
https://powauth.com
MIT License
391 stars 45 forks source link

Assent.Strategy.Apple doesn't work with Assent.JWTAdapter.AssentJWT #17

Closed stuartbain closed 4 years ago

stuartbain commented 4 years ago

The client_secret generated by Assent.JWTAdapter.AssentJWT doesn't have a valid signature and returns an "invalid_client" error when handling the callback from Apple. I confirmed that the signature was not valid by decoding the client secret at https://jwt.io/ and providing the public key for my Apple generated private key.

In case this helps, I used the following command to generate a public key from the private key:

openssl ec -in AuthKey_xxxxxxxxx.p8 -pubout -out public.pem

Switching to Assent.JWTAdapter.JOSE adapter does generate the correct client secret.

danschultzer commented 4 years ago

Finally figured this one out. Fixed in #17, thanks for the help debugging this 😄

danschultzer commented 4 years ago

Merged to master, let me know if it works for you using the master branch!

stuartbain commented 4 years ago

Confirmed working with the AssentJWT adapter. Thanks!