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

PKCE crashes when using stateless #1163

Open
srabouin opened this issue Feb 29, 2024 · 0 comments
Open

PKCE crashes when using stateless #1163

srabouin opened this issue Feb 29, 2024 · 0 comments

Comments

@srabouin
Copy link

srabouin commented Feb 29, 2024

Using PKCE will crash when using stateless since it accesses session() but there is no session.

I would do something like this, which solves the problem in AbstractProvider.php

        if ($this->usesPKCE()) {
                if($this->isStateless()) {
                        $fields['code_verifier'] = $this->request->get('code_verifier');
                } else {
                        $fields['code_verifier'] = $this->request->session()->pull('code_verifier');
                }
        }

This is probably an edge case, but I am using a frontend to do the first part of the authentication and just the last part is done by the backend. (nuxt auth)

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

No branches or pull requests

1 participant