@nibssplc/cams-sdk-react 0.0.1-beta.35 → 0.0.1-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +8 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -16786,6 +16786,14 @@ function useCAMSMSALAuth(options) {
|
|
|
16786
16786
|
setToken(response.accessToken);
|
|
16787
16787
|
setAccessToken(response.accessToken);
|
|
16788
16788
|
setIdToken(response.idToken);
|
|
16789
|
+
// Persist tokens to localStorage
|
|
16790
|
+
if (typeof window !== 'undefined') {
|
|
16791
|
+
localStorage.setItem('cams-msal-auth', JSON.stringify({
|
|
16792
|
+
isAuthenticated: true,
|
|
16793
|
+
accessToken: response.accessToken,
|
|
16794
|
+
idToken: response.idToken
|
|
16795
|
+
}));
|
|
16796
|
+
}
|
|
16789
16797
|
(_a = options.onAuthSuccess) === null || _a === void 0 ? void 0 : _a.call(options, response.accessToken);
|
|
16790
16798
|
if (typeof window !== "undefined" &&
|
|
16791
16799
|
process.env.NODE_ENV !== "test") {
|