reauth v1.2.0
Reauthorization
This module will help you to refresh id token silently (sure, only if you are Pavel Nekhaichook and you're trying to refresh it and put it on our project's back-end).
Installation
To add an entry to your package.json's dependencies:
run nmp install reauth --save
To add an entry to your package.json's devDependencies:
run npm install reauth --save-dev
To automatically download the module without (dev)dependencies:
Run nmp install reauth
Usage
Import ReauthModule
in your app.module.ts, provide ReauthService
where it's necessary and use it as ordinary service.
Commands
reauth(redirect_uri?: string)
- call the queue of requests to refresh your id token (use your own redirect uri or default one);
isExpired()
- check if your id token is expired;
redirect_uri
- use your own redirect uri instead of default one;
REFRESH_TIME
- set the time (in millis) when to start refreshing id token before it expires (default 600 000 equal to 10 minutes).