Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase\JWT\JWT::decode(): Argument #3 ($headers) cannot be passed by reference in src/Token/AppleAccessToken.php:50 #46

Open
tadaszelvys opened this issue Jun 14, 2023 · 4 comments · May be fixed by #50

Comments

@tadaszelvys
Copy link

tadaszelvys commented Jun 14, 2023

No description provided.

@julienbornstein
Copy link

until it is fixed, lock firebase/php-jwt to previous version

composer req firebase/php-jwt:6.5.0

@itaynoy
Copy link

itaynoy commented Jun 21, 2023

A quick fix for the issue is to change line 50 in src/Token/AppleAccessToken.php
to:

 $s = (object) ["alg" => 'RS256'];
 $decoded = JWT::decode($options['id_token'], $key, $s);

that will work with later version of JWT (tested on 6.8)

@bobmagicii
Copy link

bobmagicii commented Jul 4, 2023

ran into this first thing this week. causes the most randomly seemingly intermittent failure to auth. did the version rollback of jwt. gonna try the fix itaynoy posted.

@bobmagicii
Copy link

this seems to be the commit that did it for reference.

firebase/php-jwt@fb85f47

it is a questionable design choice in 2023.

SychO9 added a commit to blomstra/flarum-ext-oauth-apple that referenced this issue Jul 21, 2023
@SystematicCZ SystematicCZ linked a pull request Sep 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants