Skip to content

Resolve "Logout after token expiration"

Closes #647 (closed)

This issue addresses the problem of managing the token expiration.

In order to configure them two new configuration parameters have been added on icat.js:

/**
* Automatic refresh
* true - token will be refreshed automatically a (validityTokenPercentage * remainingMinutes) time
* false - token will not be refresehd and user will be logged out automatically
* */
autoRefresh: false,
// This is the percentage of validity of the token before refreshing (autoRefresh needs to be true)
validityTokenPercentage: 0.9,

The strong dependency to Keycloak has been removed so it will not fail when sso is not used (db authentication, for instance).

App.js and index.js have been clean up and now it is managed from the redux actions as a state machine.

Edited by Alejandro De Maria Antolinos

Merge request reports