@logto/client
Advanced tools
Comparing version 3.0.0-alpha.0 to 3.0.0-alpha.1
@@ -40,4 +40,7 @@ import type { Requester } from '@logto/js'; | ||
* @param url The URL to navigate to. | ||
* @param redirectUri The redirect URI that the user will be redirected to after the flow is | ||
* completed. That is, the "redirect URI" for sign-in and "post-logout redirect URI" for sign-out. | ||
* @param parameters The parameters for the navigation. | ||
* @param parameters.redirectUri The redirect URI that the user will be redirected to after the | ||
* flow is completed. That is, the "redirect URI" for sign-in and "post-logout redirect URI" for | ||
* sign-out. | ||
* @param parameters.for The purpose of the navigation. It can be either "sign-in" or "sign-out". | ||
* @remarks Usually, the `redirectUri` parameter can be ignored unless the client needs to pass the | ||
@@ -47,3 +50,6 @@ * redirect scheme or other parameters to the native app, such as `ASWebAuthenticationSession` in | ||
*/ | ||
export type Navigate = (url: string, redirectUri?: string) => void | Promise<void>; | ||
export type Navigate = (url: string, parameters: { | ||
redirectUri?: string; | ||
for: 'sign-in' | 'sign-out'; | ||
}) => void | Promise<void>; | ||
export type JwtVerifier = { | ||
@@ -50,0 +56,0 @@ verifyIdToken(idToken: string): Promise<void>; |
@@ -180,3 +180,3 @@ import { decodeIdToken, decodeAccessToken, fetchUserInfo, generateSignInUri, revoke, generateSignOutUri, fetchTokenByRefreshToken, fetchOidcConfig, UserScope, verifyAndParseCodeFromCallbackUri, fetchTokenByAuthorizationCode } from '@logto/js'; | ||
]); | ||
await this.adapter.navigate(signInUri, redirectUri); | ||
await this.adapter.navigate(signInUri, { redirectUri, for: 'sign-in' }); | ||
} | ||
@@ -233,3 +233,3 @@ /** | ||
]); | ||
await this.adapter.navigate(url, postLogoutRedirectUri); | ||
await this.adapter.navigate(url, { redirectUri: postLogoutRedirectUri, for: 'sign-out' }); | ||
} | ||
@@ -236,0 +236,0 @@ async getSignInSession() { |
{ | ||
"name": "@logto/client", | ||
"version": "3.0.0-alpha.0", | ||
"version": "3.0.0-alpha.1", | ||
"type": "module", | ||
@@ -32,3 +32,3 @@ "main": "./lib/index.cjs", | ||
"dependencies": { | ||
"@logto/js": "^4.0.0-alpha.0", | ||
"@logto/js": "^4.0.0-alpha.1", | ||
"@silverhand/essentials": "^2.8.7", | ||
@@ -35,0 +35,0 @@ "camelcase-keys": "^7.0.1", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
85136
1907
0
20
Updated@logto/js@^4.0.0-alpha.1