@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 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);