Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@descope/vue-sdk

Package Overview
Dependencies
Maintainers
3
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@descope/vue-sdk - npm Package Compare versions

Comparing version 0.0.0-next-d547dc0a-20230808 to 0.0.0-next-d7dcfa5a-20240205

15

package.json
{
"name": "@descope/vue-sdk",
"version": "0.0.0-next-d547dc0a-20230808",
"version": "0.0.0-next-d7dcfa5a-20240205",
"main": "dist/index.cjs",

@@ -9,4 +9,10 @@ "module": "dist/index.mjs",

"exports": {
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
}
},

@@ -35,3 +41,4 @@ "types": "dist/index.d.ts",

"dependencies": {
"@descope/web-component": "2.7.1"
"@descope/user-management-widget": "0.0.7",
"@descope/web-component": "3.7.6"
},

@@ -38,0 +45,0 @@ "peerDependencies": {

@@ -43,16 +43,13 @@ # Descope Vue SDK

<template>
<Descope
:flowId.prop="'my-flow-id'"
@error="handleError"
@success="handleSuccess"
/>
<Descope flowId="my-flow-id" @error="handleError" @success="handleSuccess" />
<!-- additional props -->
<!-- :theme.prop="'dark'" theme can be "light", "dark" or "os", which auto select a theme based on the OS theme. Default is "light" -->
<!-- :debug.prop="true" debug can be set to true to enable debug mode -->
<!-- :locale.prop="'en'" locale can be any supported locale which the flow's screen translated to, if not provided, the locale is taken from the browser's locale. -->
<!-- :debug.prop="true" debug can be set to true to enable debug mode -->
<!-- :tenant.prop="tenantId" tenant ID for SSO (SAML) login. If not provided, Descope will use the domain of available email to choose the tenant -->
<!-- :redirectUrl.prop="redirectUrl" Redirect URL for OAuth and SSO (will be used when redirecting back from the OAuth provider / IdP), or for "Magic Link" and "Enchanted Link" (will be used as a link in the message sent to the the user) -->
<!-- :autoFocus.prop="'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 -->
<!-- :errorTransformer.prop="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. -->
<!-- theme="dark" theme can be "light", "dark" or "os", which auto select a theme based on the OS theme. Default is "light" -->
<!-- v-bind:debug="true" debug can be set to true to enable debug mode -->
<!-- locale="en" locale can be any supported locale which the flow's screen translated to, if not provided, the locale is taken from the browser's locale. -->
<!-- tenant="tenantId" tenant ID for SSO (SAML) login. If not provided, Descope will use the domain of available email to choose the tenant -->
<!-- redirectUrl="redirectUrl" Redirect URL for OAuth and SSO (will be used when redirecting back from the OAuth provider / IdP), or for "Magic Link" and "Enchanted Link" (will be used as a link in the message sent to the the user) -->
<!-- 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 -->
<!-- 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. -->
<!-- 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. -->
<!-- client="{ version: '1.2.3' }" client is an object the initial client context in the flow execution. Keys passed can be accessed in flows actions and conditions prefixed with "client.". NOTE: client is not required. If not provided, context key will be empty. -->
</template>

@@ -104,3 +101,3 @@

<script setup>
import { useDescope, useSession, useUser } from '../../src';
import { useDescope, useSession, useUser } from '@descope/vue-sdk';

@@ -262,2 +259,21 @@ const { isAuthenticated, isSessionLoading } = useSession();

## Q & A
### I updated the user in my backend, but the user / session token are not updated in the frontend
// adjust the answer to vue sdk
The Descope SDK caches the user and session token in the frontend. If you update the user in your backend (using Descope Management SDK/API for example), you can call `me` / `refresh` from `useDescope` hook to refresh the user and session token. Example:
```js
const sdk = useDescope();
const handleUpdateUser = () => {
myBackendUpdateUser().then(() => {
sdk.me();
// or
sdk.refresh();
});
};
```
## Learn More

@@ -264,0 +280,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc