@asgardeo/auth-spa 0.4.4 → 0.4.5

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
@@ -15,6 +15,7 @@
15
15
  - [Getting Started](#getting-started)
16
16
  - [Using an Embedded Script](#using-an-embedded-script)
17
17
  - [Using a Module](#using-a-module)
18
+ - [Configuring Single Logout](#configuring-single-logout)
18
19
  - [Try Out the Sample Apps](#try-out-the-sample-apps)
19
20
  - [Browser Compatibility](#browser-compatibility)
20
21
  - [APIs](#apis)
@@ -141,6 +142,19 @@ auth.on("sign-in", (response) => {
141
142
 
142
143
  [Learn more](#apis).
143
144
 
145
+ ### Configuring Single Logout
146
+
147
+ Asgardeo allows the developers to add single logout capabilities to their applications. To configure single logout:
148
+
149
+ 1. Include following configs when initializing the `AsgardeoSPAClient` instance.
150
+ 1. Set `enableOIDCSessionManagement` flag to `true` in order to enable single logout.
151
+ 2. Adjust the `checkSessionInterval` value as needed to override the default interval. See [AuthClientConfig](#AuthClientConfigConfig) for more details.
152
+ 2. Ensure [signIn( )](#signin) method is called with `{callOnlyOnRedirect: true}` when `signInRedirectURL` is loaded.
153
+
154
+ ```typescript
155
+ auth.signIn({callOnlyOnRedirect: true});
156
+ ```
157
+
144
158
  ## Try Out the Sample Apps
145
159
 
146
160
  ### 1. Create an Application in Asgardeo
@@ -989,7 +1003,6 @@ Of the four methods, storing the session information in the **web worker** is th
989
1003
  ```TypeScript
990
1004
  auth.initialize(config);
991
1005
  ```
992
-
993
1006
  ## Models
994
1007
 
995
1008
  ### AuthClientConfig\<Config>
@@ -1000,7 +1013,7 @@ This table shows the extended attributes provided by the `Config` interface.
1000
1013
  | Attribute | Required/Optional | Type | Default Value | Description |
1001
1014
  |:------------------------------|:------------------------------------------------|:----------------------------------------------------|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1002
1015
  | [`storage`](#storage) | Optional | `"sessionStorage"`, `"webWorker"`, `"localStorage"` | `"sessionStorage"` | The storage medium where the session information such as the access token should be stored. |
1003
- | `resourceServerURLs` | Required if the `storage` is set to `webWorker` | `string[]` | `[]` | The URLs of the API endpoints. This is needed only if the storage method is set to `webWorker`. When API calls are made through the [`httpRequest`](#httprequest) or the [`httpRequestAll`](#httprequestall) method, only the calls to the endpoints specified in the `baseURL` attribute will be allowed. Everything else will be denied. |
1016
+ | `resourceServerURLs` | Required if the `storage` is set to `webWorker` | `string[]` | `[]` | The URLs of the API endpoints. This is required if the storage method is set to `webWorker`. Additionally, when API calls are made through the [`httpRequest`](#httprequest) or the [`httpRequestAll`](#httprequestall) method, only the calls to the endpoints specified either in `baseURL` or in `resourceServerURLs` attributes will be allowed. Everything else will be denied. |
1004
1017
  | `requestTimeout` | Optional | `number` | 60000 (seconds) | Specifies in seconds how long a request to the web worker should wait before being timed out. |
1005
1018
  | `sessionRefreshInterval` | Optional | `number` | 300 (seconds) | Specifies how often the session state should be checked. To check the authentication state, the authorization endpoint is queried with the `prompt` parameter set to `none`. |
1006
1019
  | `checkSessionInterval` | Optional | `number` | 3 (seconds) | Specifies how often the check-session iFrame should be queried to check the session state. This is used to perform single logout. |