@leapdev/auth-agent 2.2.13-office.2 → 2.3.0
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 +5 -0
- package/package.json +1 -1
- package/src/index.umd.js +521 -488
- package/src/lib/auth-agent.d.ts +0 -1
- package/src/lib/auth-agent.js +2 -2
- package/src/lib/auth-agent.js.map +1 -1
- package/src/lib/authentication.d.ts +0 -1
- package/src/lib/authentication.js +21 -120
- package/src/lib/authentication.js.map +1 -1
- package/src/lib/config.js +2 -0
- package/src/lib/config.js.map +1 -1
- package/src/lib/notification.d.ts +3 -0
- package/src/lib/notification.js +76 -15
- package/src/lib/notification.js.map +1 -1
- package/src/lib/types.d.ts +4 -0
- package/src/lib/types.js +1 -0
- package/src/lib/types.js.map +1 -1
package/README.md
CHANGED
|
@@ -53,12 +53,14 @@ If the query contains parameters "code" and "state", the Auth Agent will exchang
|
|
|
53
53
|
- `autoLogout` **[boolean][37]** : If true, the user will be automatically logged out after a configurable time interval if no activity detected (optional, default `true`)
|
|
54
54
|
- `idleTimeoutInMinutes` **[number][37]** : In minutes, the time interval after which the user is automatically logged out if no activity detected (optional, default `30`)
|
|
55
55
|
- `uniqueSession` **[boolean][37]** : If true, the same user can't have more than one active session for the same app, based on authHost and clientId (optional, default `true`)
|
|
56
|
+
- `userPresence` **[boolean][37]** : If true, the same user can't have more than one active session between web applications and LEAP Desktop (optional, default `false`)
|
|
56
57
|
- `autoRefreshToken` **[boolean][37]** : If true, AuthAgent would run a background task to refresh access token before they expire(optional, default `false`)
|
|
57
58
|
- `rememberMe` **[boolean][37]** : If true, AuthAgent would have query `remember_me=true`, and this would have "Keep me signed in" checkbox checked by default in the login page. (optional, default `false`)
|
|
58
59
|
- `hooks` **[object][38]** : callback functions(optional, default: no hooks)
|
|
59
60
|
* afterLogin: Callback function that take the access_token, executed after login.
|
|
60
61
|
* beforeLogout: Callback function executed before logout.
|
|
61
62
|
* uniqueSessionTrigger: Callback function executed when unique session triggered.
|
|
63
|
+
* userPresenceTrigger: Callback function executed when user presence triggered.
|
|
62
64
|
* afterRefreshToken: Callback function executed after an access token refreshed.
|
|
63
65
|
- `initToken` **[string][37]** : If provided, AuthAgent would use the jti from the initToken and call "passthrough" to create an auth session(optional, default `""`)
|
|
64
66
|
|
|
@@ -70,6 +72,9 @@ Returns **[Promise][39]** Nothing if autoLogin is turned off, the access_token i
|
|
|
70
72
|
Login function using PKCE flow.
|
|
71
73
|
Executes hook afterLogin if any.
|
|
72
74
|
|
|
75
|
+
### Parameters
|
|
76
|
+
- `force_2fa` **[boolean][37]** Force user to do a 2fa challenge (optional, default `false`)
|
|
77
|
+
|
|
73
78
|
Returns **[Promise][39]** The access_token
|
|
74
79
|
|
|
75
80
|
## logout
|