@veripass/react-sdk 1.0.9 → 1.0.11
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/react-sdk.cjs.js
CHANGED
|
@@ -616,6 +616,13 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
616
616
|
return JSON.parse(value);
|
|
617
617
|
};
|
|
618
618
|
|
|
619
|
+
// Effect to redirect if user is null
|
|
620
|
+
React.useEffect(function () {
|
|
621
|
+
if (user === null) {
|
|
622
|
+
window.location.replace('/auth/login');
|
|
623
|
+
}
|
|
624
|
+
}, [user]);
|
|
625
|
+
|
|
619
626
|
/**
|
|
620
627
|
* Memoized value containing the user data and authentication functions.
|
|
621
628
|
*
|