@zitadel/react
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,11 +0,5 @@ | ||
import { UserManager } from "oidc-client-ts"; | ||
export interface ZitadelConfig { | ||
client_id: string; | ||
issuer: string; | ||
redirect_uri?: string; | ||
post_logout_redirect_uri?: string; | ||
scope?: string; | ||
import { UserManagerSettings, UserManager } from "oidc-client-ts"; | ||
export type ZitadelConfig = Partial<UserManagerSettings> & { | ||
project_resource_id?: string; | ||
prompt?: string; | ||
} | ||
}; | ||
interface ZitadelAuth { | ||
@@ -12,0 +6,0 @@ authorize(): Promise<void>; |
@@ -5,3 +5,3 @@ import { UserManager, WebStorageStateStore, } from "oidc-client-ts"; | ||
const authConfig = { | ||
authority: `${zitadelConfig.issuer}`, | ||
authority: `${zitadelConfig.authority}`, | ||
client_id: `${zitadelConfig.client_id}`, | ||
@@ -19,2 +19,3 @@ redirect_uri: `${(_a = zitadelConfig.redirect_uri) !== null && _a !== void 0 ? _a : "http://localhost:3000/callback"}`, | ||
userStore: new WebStorageStateStore({ store: window.localStorage }), | ||
loadUserInfo: true, | ||
...authConfig, | ||
@@ -21,0 +22,0 @@ }); |
{ | ||
"name": "@zitadel/react", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Wraps oidc-client-ts to provide a simple interface for ZITADEL", | ||
@@ -5,0 +5,0 @@ "homepage": "https://zitadel.com/docs/examples/login/react", |
@@ -28,5 +28,4 @@ # ZITADEL React SDK | ||
const zitadelAuth = createZitadelAuth({ | ||
issuer: `${myZITADELInstancesOrigin}`, | ||
authority: `${myZITADELInstancesOrigin}`, | ||
client_id: `${myApplicationsClientID}`, | ||
project_resource_id: `${myApplicationsProjectResourceID}`, | ||
}); | ||
@@ -33,0 +32,0 @@ ``` |
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
4734
46
40