@descope/vue-sdk
Advanced tools
Comparing version 0.0.0-next-d3b7ecbc-20240411 to 0.0.0-next-d3f0a201-20240711
{ | ||
"name": "@descope/vue-sdk", | ||
"version": "0.0.0-next-d3b7ecbc-20240411", | ||
"version": "0.0.0-next-d3f0a201-20240711", | ||
"main": "dist/index.cjs", | ||
@@ -40,7 +40,8 @@ "module": "dist/index.mjs", | ||
"dependencies": { | ||
"@descope/access-key-management-widget": "0.1.35", | ||
"@descope/audit-management-widget": "0.1.0", | ||
"@descope/role-management-widget": "0.1.35", | ||
"@descope/user-management-widget": "0.4.36", | ||
"@descope/web-component": "3.8.39" | ||
"@descope/access-key-management-widget": "0.1.109", | ||
"@descope/audit-management-widget": "0.1.72", | ||
"@descope/role-management-widget": "0.1.107", | ||
"@descope/user-management-widget": "0.4.110", | ||
"@descope/user-profile-widget": "0.0.82", | ||
"@descope/web-component": "3.19.4" | ||
}, | ||
@@ -47,0 +48,0 @@ "peerDependencies": { |
@@ -57,2 +57,3 @@ # Descope Vue SDK | ||
<!-- autoFocus="skipFirstScreen" autoFocus can be true, false or "skipFirstScreen". Default is true. - true: automatically focus on the first input of each screen - false: do not automatically focus on screen's inputs - "skipFirstScreen": automatically focus on the first input of each screen, except first screen --> | ||
<!-- validateOnBlur can be true in order to show input validation errors on blur, in addition to on submit. Default is false. --> | ||
<!-- errorTransformer="errorTransformer" errorTransformer is a function that receives an error object and returns a string. The returned string will be displayed to the user. NOTE: errorTransformer is not required. If not provided, the error object will be displayed as is. --> | ||
@@ -228,2 +229,20 @@ <!-- form="{ email: 'test@domain.com' }" form is an object the initial form context that is used in screens inputs in the flow execution. Used to inject predifined input values on flow start such as custom inputs, custom attrbiutes and other inputs. Keys passed can be accessed in flows actions, conditions and screens prefixed with "form.". NOTE: form is not required. If not provided, 'form' context key will be empty before user input. --> | ||
### Token Persistence | ||
Descope stores two tokens: the session token and the refresh token. | ||
- The refresh token is either stored in local storage or an `httpOnly` cookie. This is configurable in the Descope console. | ||
- The session token is stored in either local storage or a JS cookie. This behavior is configurable via the `sessionTokenViaCookie` prop in the Descope plugin. | ||
However, for security reasons, you may choose not to store tokens in the browser. In this case, you can pass `persistTokens: false` to the Descope plugin. This prevents the SDK from storing the tokens in the browser. | ||
Notes: | ||
- You must configure the refresh token to be stored in an `httpOnly` cookie in the Descope console. Otherwise, the refresh token will not be stored, and when the page is refreshed, the user will be logged out. | ||
- You can still retrieve the session token using the `useSession` hook. | ||
### Last User Persistence | ||
Descope stores the last user information in local storage. If you wish to disable this feature, you can pass `storeLastAuthenticatedUser: false` to the Descope plugin. Please note that some features related to the last authenticated user may not function as expected if this behavior is disabled. | ||
### Widgets | ||
@@ -239,3 +258,3 @@ | ||
The `UserManagement` widget will let you embed a user table in your site to view and take action. | ||
The `UserManagement` widget lets you embed a user table in your site to view and take action. | ||
@@ -272,3 +291,3 @@ The widget lets you: | ||
The `RoleManagement` widget will let you embed a role table in your site to view and take action. | ||
The `RoleManagement` widget lets you embed a role table in your site to view and take action. | ||
@@ -303,3 +322,3 @@ The widget lets you: | ||
The `AccessKeyManagement` widget will let you embed an access key table in your site to view and take action. | ||
The `AccessKeyManagement` widget lets you embed an access key table in your site to view and take action. | ||
@@ -316,2 +335,3 @@ The widget lets you: | ||
<template> | ||
<!-- admin view: manage all tenant users' access keys --> | ||
<AccessKeyManagement | ||
@@ -321,2 +341,8 @@ tenant="tenant-id" | ||
/> | ||
<!-- user view: mange access key for the logged-in tenant's user --> | ||
<AccessKeyManagement | ||
tenant="tenant-id" | ||
widget-id="user-access-key-management-widget" | ||
/> | ||
</template> | ||
@@ -334,3 +360,3 @@ | ||
The `AuditManagement` widget will let you embed an audit table in your site. | ||
The `AuditManagement` widget lets you embed an audit table in your site. | ||
@@ -352,2 +378,30 @@ ###### Usage | ||
#### User Profile | ||
The `UserProfile` widget lets you embed a user profile component in your app and let the logged in user update his profile. | ||
The widget lets you: | ||
- Update user profile picture | ||
- Update user personal information | ||
- Update authentication methods | ||
- Logout | ||
###### Usage | ||
```vue | ||
<template> | ||
<UserProfile widget-id="user-profile-widget" @logout="onLogout" /> | ||
</template> | ||
<script setup> | ||
import { UserProfile } from '@descope/vue-sdk'; | ||
const onLogout = () => (window.location.href = '/login'); | ||
</script> | ||
``` | ||
Example: | ||
[User Profile](./example/components/MyUserProfile.vue) | ||
## Code Example | ||
@@ -384,6 +438,7 @@ | ||
| Env Variable | Description | Default value | | ||
| ------------------------ | -------------------------------------- | ----------------- | | ||
| VUE_APP_DESCOPE_FLOW_ID | Which flow ID to use in the login page | **sign-up-or-in** | | ||
| VUE_APP_DESCOPE_BASE_URL | Custom Descope base URL | None | | ||
| Env Variable | Description | Default value | | ||
| ------------------------------- | -------------------------------------- | ----------------- | | ||
| VUE_APP_DESCOPE_FLOW_ID | Which flow ID to use in the login page | **sign-up-or-in** | | ||
| VUE_APP_DESCOPE_BASE_URL | Custom Descope base URL | None | | ||
| VUE_APP_DESCOPE_BASE_STATIC_URL | Custom Descope base static URL | None | | ||
@@ -399,2 +454,4 @@ Example for `.env.local` file template: | ||
VUE_APP_DESCOPE_BASE_URL="" | ||
# Descope base static URL | ||
VUE_APP_DESCOPE_BASE_STATIC_URL="" | ||
``` | ||
@@ -401,0 +458,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
284840
5011
478
8
+ Added@descope/access-key-management-widget@0.1.109(transitive)
+ Added@descope/audit-management-widget@0.1.72(transitive)
+ Added@descope/core-js-sdk@2.23.2(transitive)
+ Added@descope/role-management-widget@0.1.107(transitive)
+ Added@descope/sdk-component-drivers@0.2.35(transitive)
+ Added@descope/sdk-helpers@0.1.54(transitive)
+ Added@descope/sdk-mixins@0.2.39(transitive)
+ Added@descope/user-management-widget@0.4.110(transitive)
+ Added@descope/user-profile-widget@0.0.82(transitive)
+ Added@descope/web-component@3.19.4(transitive)
+ Added@descope/web-js-sdk@1.15.4(transitive)
+ Added@fingerprintjs/fingerprintjs-pro@3.9.8(transitive)
+ Addedlibphonenumber-js@1.11.4(transitive)
+ Addedreselect@5.1.1(transitive)
- Removed@descope/access-key-management-widget@0.1.35(transitive)
- Removed@descope/audit-management-widget@0.1.0(transitive)
- Removed@descope/core-js-sdk@2.12.1(transitive)
- Removed@descope/role-management-widget@0.1.35(transitive)
- Removed@descope/sdk-component-drivers@0.2.0(transitive)
- Removed@descope/sdk-helpers@0.1.19(transitive)
- Removed@descope/sdk-mixins@0.2.0(transitive)
- Removed@descope/user-management-widget@0.4.36(transitive)
- Removed@descope/web-component@3.8.39(transitive)
- Removed@descope/web-js-sdk@1.10.31(transitive)
- Removed@fingerprintjs/fingerprintjs-pro@3.9.2(transitive)
- Removedlibphonenumber-js@1.10.58(transitive)
- Removedreselect@5.1.0(transitive)
- Removedtslib@2.6.2(transitive)