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

state not valid (expected: kA6pgvCtBpauwMl0, received: myState) #1241

Open
hmz22 opened this issue Dec 13, 2023 · 3 comments
Open

state not valid (expected: kA6pgvCtBpauwMl0, received: myState) #1241

hmz22 opened this issue Dec 13, 2023 · 3 comments

Comments

@hmz22
Copy link

hmz22 commented Dec 13, 2023

Issue and Steps to Reproduce

when Redirect to auth server after sucess login and redirect back to client callback url dotn call token and show error in console state not valid.
i create auth server with @node-oauth/oauth2-server
this my config:

configuration={
        authority: "http://localhost:7003",
        client_id: "myClient",
        redirect_uri: "http://localhost:5173/cb",
        scope: "profile",
        authority_configuration: {
          authorization_endpoint: "http://localhost:7003/oauth",
          token_endpoint: "http://localhost:7003/oauth/token",
          issuer: "http://localhost:7003",
          revocation_endpoint: "http://localhost:7003/revocation",
        },
        token_request_extras: {
          client_secret: "test_secret",
        },
        storage: localStorage,
      }

if see second screenshot after redirect to callback, you don't see any token call

Versions

7.13.7-alpha.1239

Screenshots

Screenshot 2023-12-13 110346

Screenshot 2023-12-13 110522

@guillaume-chervet
Copy link
Contributor

Hi @hmz22 , thank you for your issue. It seem your server send back in the mySate information inside the callback url.

You can send extra parameter to the login function like
{state:"myState"} it should (not sure) work if your oidc server always send myState back.

@guillaume-chervet
Copy link
Contributor

guillaume-chervet commented Dec 19, 2023

Hi @hmz22 did it solve your issue?

@guillaume-chervet
Copy link
Contributor

Hi @hmz22 did you solve your 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

No branches or pull requests

2 participants