Skip to content

Don't force token refresh when the token from init() isn't expired #52

@Reveares

Description

@Reveares

Description

I have to reduce our requests to our keycloak instance because our E2E test with Cypress result in many requests.

That's why I store for the tests the tokens in the session storage and pass them back when the init() method is called in the Keycloak class.

My expectation was that Keycloak-js would use them as long as they have not expired. But this is not the case, because when init() always calles updateToken(-1) to force a refresh when token and refreshToken are supplied and loginIframe = false.

Why is this necessary and would it be conceivable to include an option to deactivate the forced refresh or remove it anyway?

Discussion

No response

Motivation

No response

Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions