@asgardeo/auth-spa 0.4.3 → 0.4.4
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/README.md +11 -1
- package/dist/asgardeo-spa.production.esm.js +11 -11
- package/dist/asgardeo-spa.production.esm.js.map +1 -1
- package/dist/asgardeo-spa.production.js +4 -4
- package/dist/asgardeo-spa.production.js.map +1 -1
- package/dist/asgardeo-spa.production.min.js +1 -1
- package/dist/asgardeo-spa.production.min.js.map +1 -1
- package/dist/polyfilled/asgardeo-spa.production.esm.js +40 -40
- package/dist/polyfilled/asgardeo-spa.production.esm.js.map +1 -1
- package/dist/polyfilled/asgardeo-spa.production.js +4 -4
- package/dist/polyfilled/asgardeo-spa.production.js.map +1 -1
- package/dist/polyfilled/asgardeo-spa.production.min.js +1 -1
- package/dist/polyfilled/asgardeo-spa.production.min.js.map +1 -1
- package/dist/src/clients/main-thread-client.js +2 -2
- package/dist/src/clients/main-thread-client.js.map +1 -1
- package/dist/src/helpers/authentication-helper.js +5 -5
- package/dist/src/helpers/authentication-helper.js.map +1 -1
- package/dist/src/helpers/spa-helper.d.ts +2 -2
- package/dist/src/helpers/spa-helper.d.ts.map +1 -1
- package/dist/src/helpers/spa-helper.js +2 -2
- package/dist/src/helpers/spa-helper.js.map +1 -1
- package/dist/src/worker/worker-core.js +2 -2
- package/dist/src/worker/worker-core.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/clients/main-thread-client.ts +2 -2
- package/src/helpers/authentication-helper.ts +5 -5
- package/src/helpers/spa-helper.ts +7 -3
- package/src/worker/worker-core.ts +2 -2
package/README.md
CHANGED
|
@@ -401,6 +401,17 @@ The `sign-out` hook is used to fire a callback function after signing out is suc
|
|
|
401
401
|
auth.signOut();
|
|
402
402
|
```
|
|
403
403
|
|
|
404
|
+
**Clearing the locally stored user session happens when a sign-out hook is registered after the user gets redirected back to the `signOutRedirectURL`.**
|
|
405
|
+
Therefore, the developer should ensure that a sign-out hook is registered when `signOutRedirectURL` is loaded. Refer the [example](#sign-out-hook-example)
|
|
406
|
+
for further details.
|
|
407
|
+
|
|
408
|
+
#### Example
|
|
409
|
+
```TypeScript
|
|
410
|
+
// Register a sign-out hook with any callback function when signOutRedirectURL is loaded
|
|
411
|
+
// to clear locally stored user session
|
|
412
|
+
auth.on("sign-out", () => {});
|
|
413
|
+
```
|
|
414
|
+
|
|
404
415
|
---
|
|
405
416
|
|
|
406
417
|
### httpRequest
|
|
@@ -807,7 +818,6 @@ If you are using TypeScript, you may want to use the `Hooks` enum that consists
|
|
|
807
818
|
**When the user signs out, the user is taken to the Asgardeo's logout page and then redirected back to the SPA on successful log out. Hence, developers should ensure that the `"sign-out"` hook is called when the page the user is redirected to loads.**
|
|
808
819
|
|
|
809
820
|
#### Example
|
|
810
|
-
|
|
811
821
|
```TypeScript
|
|
812
822
|
auth.on("sign-in", () => {
|
|
813
823
|
// console.log(response);
|