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

Uncaught (in promise) #154

Open
chiaracasadei-coder opened this issue Sep 1, 2023 · 3 comments
Open

Uncaught (in promise) #154

chiaracasadei-coder opened this issue Sep 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@chiaracasadei-coder
Copy link

Describe the issue:
HI,
I'm loggingIn from my machine (hostname) to the server that supports wso2.

SignIn is performed and the url is generated
http://localhost:5500/?code=5ff22072-aecf-3832-a1ed-313df9f19f24&state=request_0&session_state=6e974b342540f780a2da0fe87d61c359eaf8d90659e7dba862ef1919121a264b.qi3y1 J UfdfxNfnVVo6g1rw

at that point in js i have to relaunch the signin again like this
auth.on("sign in", (answer) => {
alert("You have successfully logged in!");
});

But this throws the error
image

Whereas the call to /oauth2/token succeeds.

Who could help me?

Thank you

@chiaracasadei-coder chiaracasadei-coder added the bug Something isn't working label Sep 1, 2023
@brionmario
Copy link
Member

@chiaracasadei-coder

It looks like the ID token validation has failed.

To confirm this, can you add the following configuration to the initialization object?

auth.initialize({
  validateIDToken: false,
  ... // rest
})

If you can confirm that the ID token validation is the source of the problem, I recommend decoding your ID token using a tool like jwt.io to check for any issues.

Additionally, could you provide the host on which the Identity Server Instance is currently running? Please ensure that it is correctly reflected in the iss (issuer) attribute of the token. Also, make sure that the local system time and the time on the server machine are synchronized.

@chiaracasadei-coder
Copy link
Author

HI,
Thanks for the reply.

I added the validateIDToken variable in initialization and effectively the token validation is bypassed.

I tried hooking the token generated by https://trdevwso201.online.gruppo24.net:9444/oauth2/token into the jwt.io
This is the answer:

image

This is what I get on jwt.io
image

Could you follow me on how I can fix it?

Thank you

@chiaracasadei-coder
Copy link
Author

CIAO, grazie per la risposta.

Ho aggiunto la variabile validateIDToken nell'inizializzazione e di fatto la convalida del token viene ignorata.

Ho provato ad agganciare il token generato da https://trdevwso201.online.gruppo24.net:9444/oauth2/token nel jwt.io Questa è la risposta:

Immagine

Questo è quello che ottengo su jwt.io Immagine

Potresti seguirmi su come posso risolverlo?

Grazie

Is there any news about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants