lcobucci / jwt

A simple library to work with JSON Web Token and JSON Web Signature
https://lcobucci-jwt.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
7.3k stars 601 forks source link

Key parse: error:1E08010C:DECODER routines::unsupported #1061

Closed bradders closed 7 months ago

bradders commented 7 months ago

I'm following along with this guide to get laravel working with Apple login: https://bannister.me/blog/generating-a-client-secret-for-sign-in-with-apple-on-each-request

I get a Lcobucci\JWT\Signer\InvalidKeyProvided ... It was not possible to parse your key, reason: * error:1E08010C:DECODER routines::unsupported on the following code:

Screenshot 2024-04-28 at 11 45 03 AM

I realize the article is written against an older version of JWT so I'm trying to figure out if I need to update something to get this working. The changelog docs seem to suggest that getToken should accept params from a config object (which I think I'm doing).

I found an old issue asking something similar, with a link to an openssl thread (https://github.com/lcobucci/jwt/issues/983), but I'm not sure what the fix would be in relation to my issue.

Any pointers/help would be greatly received!

bradders commented 7 months ago

Seems like the key I was using wasn't correctly encoded1