- d6a900c: bump dependencies for security update
- Updated dependencies [d6a900c]
- @logto/[email protected]
- 1fb33d0: force bump for republish
- Updated dependencies [1fb33d0]
- @logto/[email protected]
- 46b26bd: fix react-native compatibility issues by re-exporting the shim
- 28bc32e: force bump for republish
- Updated dependencies [28bc32e]
- @logto/[email protected]
- 9fa75c6: drop CommonJS support and become pure ESM
- Updated dependencies [9fa75c6]
- @logto/[email protected]
- Updated dependencies [7980dec]
- @logto/[email protected]
-
e92940f: add react-native package export condition
Enabling package export in react-native is unstable and can cause issues.
Replace the
exports
in@logto/client
package.json with thereact-native
condition.{ "react-native": "./lib/shim.js" }
So the
shim.js
module can be used in react-native projects, without enabling the unstable package export feature.
-
5b46f9c: add support for identifier-based and single sign-on first screens and configurable identifiers
You can now set
identifier:sign_in
,identifier:register
,single_sign_on
orreset_password
as the first screen in the sign-in process. Additionally, you can specify which identifiers (email
,phone
,username
) are allowed foridentifier:sign_in
,identifier:register
andreset_password
flows.Note the the original
interactionMode
is now deprecated, please use the newfirstScreen
option instead.Example (React):
signIn({ redirectUri, firstScreen: 'identifier:sign_in', identifiers: ['email', 'phone'], });
- Updated dependencies [5b46f9c]
- Updated dependencies [cb57a5e]
- @logto/[email protected]
- Updated dependencies [5f64e0e]
- @logto/[email protected]
-
e0cc59f: fix request error handler
Clone the response object before consuming it to avoid the unexpected "Body has already been consumed." error.
- Updated dependencies [6b1eb78]
- @logto/[email protected]
-
bf6fedc: - support clock tolerance config in
DefaultJwtVerifier
- allow set
jwtVerifier
afterLogtoClient
instance created
const client = new LogtoClient( config, adapters, (client) => new DefaultJwtVerifier(client, { clockTolerance: 10 }) ); client.setJwtVerifier(new DefaultJwtVerifier(client, { clockTolerance: 20 }));
- allow set
-
2f8a855: improve
LogtoRequestError
- Add
cause
property toLogtoRequestError
to expose the original response. - Make
isLogtoRequestError
more reliable by checking the instance of the error and thename
property.
- Add
-
Updated dependencies [2f8a855]
- @logto/[email protected]
- 7f477b3: allow not including reserved scopes by setting
includeReservedScopes
tofalse
- Updated dependencies [7f477b3]
- Updated dependencies [7f477b3]
- @logto/[email protected]
-
bc3e8da: Fix the bug of granting mutiple organization tokens concurrently.
This is a bug fix for the issue that the client is not able to grant multiple organization tokens concurrently. The issue is caused by the memoize function that caches the organization token request, which leads to the token request being memoized by incorrect key and not being able to be granted concurrently. This fix updates the memoize function to cache by the correct key.
- 3e28e29: add new method "clearAllTokens()" to clear all cached tokens from storage
- bc86d46: export "clearAccessToken()" method from Client SDK
-
e30e121: add prompt parameter to sign in function.
This change adds a prompt parameter to the signIn function in the @logto/client package. This parameter allows you to specify the prompt parameter in the
signIn()
method, with which the developer can override the prompt value pre-defined in the Logto configs.
- 24d1680: fix: clear access token storage on sign-in
- 76d113f: export more typescript types
- e0d20a3: export
isLogtoRequestError
- e6c8ec5: add
signIn(redirectUri: string)
as a normal signature - Updated dependencies [e6c8ec5]
- Updated dependencies [1975235]
- @logto/[email protected]
- e643c01: support
firstScreen
,directSignIn
, andextraParams
for sign-in
- Updated dependencies [e643c01]
- @logto/[email protected]
- f739621: support login_hint param on sign-in.
- Updated dependencies [f739621]
- @logto/[email protected]
- 65fca8c: support
postRedirectUri
to navigate to a URI after sign-in callback
-
c491de1: support custom jwt verifier
Now it's possible to pass a
JwtVerifier
instance to the Logto client adapter to verify the JWT token. The client also has a built-in verifier that keeps the same behavior as before. -
c491de1: provide a shim version without importing
jose
(@logto/client/shim
)It can avoid the use of
jose
package which is useful for certain environments that don't support native modules likecrypto
. (e.g. React Native)To use the shim client:
import { StandardLogtoClient } from '@logto/client/shim';
The
StandardLogtoClient
class is identical to the originalLogtoClient
class, except it doesn't have the default JWT verifier implemented. -
c491de1: update prompt usage to allow multiple values
- Logto config supports both
Prompt
andPrompt[]
types now. - Added
Prompt.None
enum value.
- Logto config supports both
-
88495b2: export
JwtVerifier
type -
c491de1: refactor adapter types
generateState()
,generateCodeVerifier()
,generateCodeChallenge()
now accept both Promise and non-Promise return types.- the navigate function now calls with a second parameter which has the state information. (
{ redirectUri?: string; for: 'sign-in' | 'sign-out' }
)
-
26619ed: use TypeScript 5.3.3
-
Updated dependencies [c491de1]
-
Updated dependencies [c491de1]
-
Updated dependencies [26619ed]
-
Updated dependencies [c491de1]
-
Updated dependencies [2febe71]
- @logto/[email protected]
- 867b357: Add Node v20 LTS support
- Updated dependencies [867b357]
- @logto/[email protected]
- efdf5c5: Fix a potential build issue in Vue, which is caused by using private method in Client SDK.
-
3a0713d: refactor method execution
getOidcConfig()
will only run oncehandleSignInCallback()
is now memoized to prevent unnecessary calls (e.g. in React strict mode)
-
8d693a3: add organizations support
- add
getOrganizationToken()
andgetOrganizationTokenClaims()
toLogtoClient
- automatically add organization resource to configuration when `scopes`` contains organization scope
- add
- Updated dependencies [8d693a3]
- Updated dependencies [8d693a3]
- @logto/[email protected]
- cd5ad7d: reuse
getAccessToken()
Promise when there's an ongoing one to avoid multiple calls to the server
-
05b9d3e: update "RefreshTokenTokenResponse" type in core JS SDK and set "refresh_token" field as optional
-
f9ff6f4: Align the js SDK error type exports.
- @logto/react: add
LogtoRequestError
export - @logto/vue: add
LogtoRequestError
export - @logto/express: add logto errors export
- @logto/next: add logto errors export
- @logto/react: add
-
Updated dependencies [05b9d3e]
- @logto/[email protected]
- eb94b36: add comment annotations for better dev experience
- Updated dependencies [eb94b36]
- @logto/[email protected]
- 5ed5b92: Use
requestedAt
+expiresIn
to calculate an approximatelyexpiredAt
timestamp, in order to ensure it is always smaller than the actualexp
timestamp in access token claims.
-
90ef48f: add well-known cache support (unstable)
- client: support
unstable_cache
inClientAdapter
- browser, react: add
unstable_enableCache
option to enable asessionStorage
cache for well-known data
- client: support
- a839b08: Add RBAC support for NextJS SDK
- Updated dependencies [a839b08]
- @logto/[email protected]
- 3aa0913: set package type to ESM, keep CJS build for compatibility (#477)
- Updated dependencies [3aa0913]
- @logto/[email protected]
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
1.1.2 (2023-04-24)
1.1.1 (2023-04-11)
Note: Version bump only for package @logto/client
1.1.0 (2023-03-19)
- js: add interactionMode props to signIn method (ea763a5)
1.0.0 (2023-02-28)
Note: Version bump only for package @logto/client
1.0.0-rc.0 (2023-02-03)
- remove core-kit dependency and update
engines
(8a24a87)
1.0.0-beta.15 (2023-01-12)
1.0.0-beta.14 (2022-12-12)
Note: Version bump only for package @logto/client
1.0.0-beta.13 (2022-11-08)
1.0.0-beta.12 (2022-11-02)
- client: remove access token from storage after sign-out (90f50de)
1.0.0-beta.11 (2022-10-26)
- deps: update dependency @logto/core-kit to v1.0.0-beta.20 (d9750b1)
1.0.0-beta.10 (2022-10-21)
- deps: update dependency @logto/core-kit to v1.0.0-beta.19 (ae0be3b)
1.0.0-beta.9 (2022-10-19)
- deps: update dependency @logto/core-kit to v1.0.0-beta.16 (b65a499)
1.0.0-beta.8 (2022-09-23)
Note: Version bump only for package @logto/client
1.0.0-beta.7 (2022-09-20)
1.0.0-beta.6 (2022-09-17)
- bump to essentials v1.2.1 to use utf-8 on decoding base64 (5a4ad09)
1.0.0-beta.5 (2022-09-13)
- js,client: enable user endpoint in js core and client sdks (abd2842)
1.0.0-beta.4 (2022-09-09)
Note: Version bump only for package @logto/client
1.0.0-beta.3 (2022-08-22)
Note: Version bump only for package @logto/client