This chapter lists all redux actions used by this library, their associated constants and their effect on the reducer. NOTE: These actions are dispatched when the event listeners described here are fired.
import { USER_EXPIRED } from 'redux-oidc-hooks';
Dispatched when:
- no valid user is found on startup,
- a valid user object expires.
Effects on reducer:
- sets the
user
object tonull
andisLoadingUser
tofalse
.
import { SILENT_RENEW_ERROR } from 'redux-oidc-hooks';
Dispatched when:
- the silent renewal process fails
Effects on reducer:
- sets the
user
object tonull
andisLoadingUser
tofalse
.
import { USER_EXPIRING } from 'redux-oidc-hooks';
Dispatched when:
- 5 minutes before the access token expires (oidc-client-ts default)
Effects on reducer:
none
import { SESSION_TERMINATED } from 'redux-oidc-hooks';
Dispatched when:
- the user logs out (with a call to the userManager function)
Effects on reducer:
- sets the
user
object tonull
andisLoadingUser
tofalse
.
import { USER_FOUND } from 'redux-oidc-hooks';
;
Dispatched when:
- a valid user is found (on startup, after token refresh or token callback).
Effects on reducer:
- updates the user object with the new user object.
import { LOADING_USER } from 'redux-oidc-hooks';
Dispatched when:
- the user object has expired and a new user is about to be loaded (middlware only!)
Effects on reducer:
- sets the
isLoadingUser
flag totrue
.
import { USER_SIGNED_OUT } from 'redux-oidc-hooks';
Dispatched when:
- the user is logged out at the auth server.
Effects on reducer:
- sets the
user
object tonull
andisLoadingUser
tofalse
.
import { LOAD_USER_ERROR } from 'redux-oidc-hooks';
Dispatched when:
- the user manager's loading process produces an error.
Effects on reducer:
- none