Skip to content

Error in signinresponse not managed #2345

@gogolander

Description

@gogolander

Hi,

i think there could be an error whenever the library tries to create a session and the IAM responds with an error: if the GET https://{{oidc_authorization_endpoint}}?client_id=foo&redirect_uri={{my_app}}&response_type=code&scope=openid&state={{state}} results in the following redirect {{my_app}}?error=login_required&state={{state}}&iss={{iam}} the library does nothing to handle the error.
It looks to me that, in this case, the OidcClient.processSigninResponse() should clear all user session data in the sessionStorage and start a new login request with a new state.

Am I missing something?

I'm using:

  • IAM: Keycloak v25.0.2
  • Oidc-client-ts: v3.4.1
  • React: v18.3.1
  • OAuth2.0 flow used: authorization_code
  • The service provider is set with public access type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions