1.3.1 • Published 1 year 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
1 year ago
1.3.0
1 year ago
1.2.6
2 years ago
1.2.5
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.4
2 years ago