1.3.1 • Published 2 months ago
@profi.co/hegnar-mws-token-hook v1.3.1
Hegnar MWS token fetching plugin by Profico
This plugin is used to as a hook to fetch MWS token from Hegnar web.
Installation
Install @profi.co/hegnar-mws-token-hook
with npm:
npm install @profi.co/hegnar-mws-token-hook
or with yarn:
yarn add @profi.co/hegnar-mws-token-hook
Usage
In a functional React component add the following
const token = useMillistreamMwsToken();
Then listen to a change in the token with e.g. useEffect(() => {}, [token])
Changelog:
1.3.1
- Before updating token remove the old one from local storage
1.3.0
- Replace useInterval with a setTimeout
1.1.9
Now really Mark token expired 10min before actual expiration (logic was in the wrong direction so it expired 10min after)
1.1.8
- Mark token expired 10min before actual expiration
1.1.7
- Prevent saving invalid response to local storage
1.3.1
2 months ago
1.3.0
3 months ago
1.2.6
4 months ago
1.2.5
4 months ago
1.2.4
4 months ago
1.2.3
4 months ago
1.2.2
4 months ago
1.2.1
4 months ago
1.1.9
6 months ago
1.1.8
6 months ago
1.1.7
6 months ago
1.1.6
6 months ago
1.1.5
6 months ago
1.1.4
6 months ago
1.1.3
6 months ago
1.1.2
6 months ago
1.1.1
6 months ago
1.0.8
7 months ago
1.0.7
7 months ago
1.0.6
7 months ago
1.0.4
7 months ago