@logto/client 2.6.0 → 2.6.2
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/lib/client.d.ts +13 -0
- package/lib/index.cjs +4 -0
- package/lib/index.js +1 -1
- package/lib/shim.cjs +4 -0
- package/lib/shim.d.ts +2 -2
- package/lib/shim.js +1 -1
- package/package.json +3 -3
package/lib/client.d.ts
CHANGED
|
@@ -130,6 +130,19 @@ export declare class StandardLogtoClient {
|
|
|
130
130
|
* @param options The options for the sign-in flow.
|
|
131
131
|
*/
|
|
132
132
|
signIn(options: SignInOptions): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Start the sign-in flow with the specified options.
|
|
135
|
+
*
|
|
136
|
+
* The redirect URI is required and it must be registered in the Logto Console.
|
|
137
|
+
*
|
|
138
|
+
* The user will be redirected to that URI after the sign-in flow is completed,
|
|
139
|
+
* and the client will be able to get the authorization code from the URI.
|
|
140
|
+
* To fetch the tokens from the authorization code, use {@link handleSignInCallback}
|
|
141
|
+
* after the user is redirected in the callback URI.
|
|
142
|
+
*
|
|
143
|
+
* @param redirectUri See {@link SignInOptions.redirectUri}.
|
|
144
|
+
*/
|
|
145
|
+
signIn(redirectUri: SignInOptions['redirectUri']): Promise<void>;
|
|
133
146
|
/**
|
|
134
147
|
*
|
|
135
148
|
* Start the sign-in flow with the specified redirect URI. The URI must be
|
package/lib/index.cjs
CHANGED
|
@@ -61,6 +61,10 @@ Object.defineProperty(exports, "getOrganizationIdFromUrn", {
|
|
|
61
61
|
enumerable: true,
|
|
62
62
|
get: function () { return js.getOrganizationIdFromUrn; }
|
|
63
63
|
});
|
|
64
|
+
Object.defineProperty(exports, "isLogtoRequestError", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return js.isLogtoRequestError; }
|
|
67
|
+
});
|
|
64
68
|
Object.defineProperty(exports, "organizationUrnPrefix", {
|
|
65
69
|
enumerable: true,
|
|
66
70
|
get: function () { return js.organizationUrnPrefix; }
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultJwtVerifier } from './adapter/defaults.js';
|
|
2
2
|
import { StandardLogtoClient } from './client.js';
|
|
3
|
-
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedResource, ReservedScope, UserScope, buildOrganizationUrn, getOrganizationIdFromUrn, organizationUrnPrefix } from '@logto/js';
|
|
3
|
+
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedResource, ReservedScope, UserScope, buildOrganizationUrn, getOrganizationIdFromUrn, isLogtoRequestError, organizationUrnPrefix } from '@logto/js';
|
|
4
4
|
export { LogtoClientError } from './errors.js';
|
|
5
5
|
import '@silverhand/essentials';
|
|
6
6
|
export { CacheKey, PersistKey } from './adapter/types.js';
|
package/lib/shim.cjs
CHANGED
|
@@ -46,6 +46,10 @@ Object.defineProperty(exports, "getOrganizationIdFromUrn", {
|
|
|
46
46
|
enumerable: true,
|
|
47
47
|
get: function () { return js.getOrganizationIdFromUrn; }
|
|
48
48
|
});
|
|
49
|
+
Object.defineProperty(exports, "isLogtoRequestError", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return js.isLogtoRequestError; }
|
|
52
|
+
});
|
|
49
53
|
Object.defineProperty(exports, "organizationUrnPrefix", {
|
|
50
54
|
enumerable: true,
|
|
51
55
|
get: function () { return js.organizationUrnPrefix; }
|
package/lib/shim.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* JWT verifier. It can avoid the use of `jose` package which is useful for certain environments
|
|
4
4
|
* that don't support native modules like `crypto`. (e.g. React Native)
|
|
5
5
|
*/
|
|
6
|
-
export type { IdTokenClaims, LogtoErrorCode, UserInfoResponse, InteractionMode } from '@logto/js';
|
|
7
|
-
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedScope, ReservedResource, UserScope, organizationUrnPrefix, buildOrganizationUrn, getOrganizationIdFromUrn, } from '@logto/js';
|
|
6
|
+
export type { AccessTokenClaims, IdTokenClaims, LogtoErrorCode, UserInfoResponse, InteractionMode, } from '@logto/js';
|
|
7
|
+
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedScope, ReservedResource, UserScope, organizationUrnPrefix, buildOrganizationUrn, getOrganizationIdFromUrn, isLogtoRequestError, } from '@logto/js';
|
|
8
8
|
export * from './errors.js';
|
|
9
9
|
export type { Storage, StorageKey, ClientAdapter, JwtVerifier } from './adapter/index.js';
|
|
10
10
|
export { PersistKey, CacheKey } from './adapter/index.js';
|
package/lib/shim.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedResource, ReservedScope, UserScope, buildOrganizationUrn, getOrganizationIdFromUrn, organizationUrnPrefix } from '@logto/js';
|
|
1
|
+
export { LogtoError, LogtoRequestError, OidcError, Prompt, ReservedResource, ReservedScope, UserScope, buildOrganizationUrn, getOrganizationIdFromUrn, isLogtoRequestError, organizationUrnPrefix } from '@logto/js';
|
|
2
2
|
export { LogtoClientError } from './errors.js';
|
|
3
3
|
import '@silverhand/essentials';
|
|
4
4
|
export { CacheKey, PersistKey } from './adapter/types.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/client",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@silverhand/essentials": "^2.8.7",
|
|
33
33
|
"camelcase-keys": "^7.0.1",
|
|
34
34
|
"jose": "^5.2.2",
|
|
35
|
-
"@logto/js": "^4.1.
|
|
35
|
+
"@logto/js": "^4.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@peculiar/webcrypto": "^1.4.5",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@swc/jest": "^0.2.24",
|
|
43
43
|
"@types/jest": "^29.5.0",
|
|
44
44
|
"@types/node": "^20.11.19",
|
|
45
|
-
"eslint": "^8.
|
|
45
|
+
"eslint": "^8.57.0",
|
|
46
46
|
"jest": "^29.5.0",
|
|
47
47
|
"jest-matcher-specific-error": "^1.0.0",
|
|
48
48
|
"lint-staged": "^15.0.0",
|