IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 840 forks source link

Uncaught ErrorResponse when using querySessionStatus #1160

Closed jimmytb closed 4 years ago

jimmytb commented 4 years ago

Hi there,

I have two questions:

  1. I am using this library with a main domain and a subdomain. When i am logged in in the main domain (example.com). I am not signed in, in the subdomain (subdomain.example.com. Do i need to configure something to make this work?

  2. I want to check the current session status of a user to determine if i should show the login screen or log the user in with signinSilent. I am trying to get this working using querySessionStatus (i know i can get the same functionality with signinSilent). Unfortunately when using it i get the error below. I know how promises work and i know how to catch an error. But i just cant get it to work.

I am using the following code:

manager.querySessionStatus().then((session) => console.log(session)).catch((error) => console.log('error', error))

The result is the following error.

Uncaught (in promise) ErrorResponse: No+authenticated+session+found.
    at new e (oidc-client.min.js:1099)
    at t [as _processSigninParams] (oidc-client.min.js:1903)
    at t [as validateSigninResponse] (oidc-client.min.js:1881)
    at eval (oidc-client.min.js:960)

Any of you know if i am missing something?

Thanks!

brockallen commented 4 years ago

StackOverflow is a more appropriate place for your question.

If you or your company need commercial support, please see here for more information.

Thanks!