Certain WorkOS features may be available only in the beta version of the SDK. Beta versions have the -beta.* suffix, for example, 3.2.0-beta.1. For more information on how to use the beta versions, refer to the README in the GitHub repository.
Avoids initial refresh when user has no session (#61)
Fixes
Throws error instead of returning stale access tokens when offline (#63)
Properly exports OnRefreshResponse type
December 11, 2024
v0.7.3
December 11, 2024
Changes
export type OnRefreshResponse
December 11, 2024
v0.7.2
December 11, 2024
Changes
onRefresh callbacks no longer receive the refresh token (#58)
December 2, 2024
v0.7.1
December 2, 2024
Fixed
Avoids an issue where multiple authentication requests could queue up when multiple getAccessToken calls are made when the token needs to be refreshed.
November 11, 2024
v0.7.0
November 11, 2024
Added
switchToOrganization can be used to switch a user's active organization.
signIn and signUp now take organizationId and loginHint parameters.
November 1, 2024
v0.6.1
November 1, 2024
Fixed
Under-the-hood changes to improve the locking and synchronization between tabs during session refresh. (#41)
October 28, 2024
v0.6.0
October 28, 2024
Added
Added new refreshBufferInterval option to configure how soon the client will attempt to refresh. (#39)
September 14, 2024
v0.5.1
September 14, 2024
Changed
Updated console error message with more explanation when a code could not be exchanged due to missing codeVerifier.
September 9, 2024
v0.5.0
September 9, 2024
Added context parameter to signIn()/signUp().
August 30, 2024
v0.4.1
August 30, 2024
fixes an issue where we repeatedly attempted to refresh the session after it had already ended.
August 30, 2024
v0.4.0
August 30, 2024
Changes
Only proactively refreshes active tabs (inactive tabs will still be refreshed as necessary when getAccessToken is called).
Doesn't call onRefreshFailure on the initial refresh request
Fixes
authkit-js would previously return stale tokens after a browser lock error
Removes
refreshSession (getAccessToken will refresh when necessary)
August 28, 2024
v0.3.0
August 28, 2024
Added onRefreshError callback
Changed: getAccessToken throws a LoginRequiredError if an access token cannot be returned.
August 14, 2024
v0.2.2
August 14, 2024
Fixes
refresh timing (#15)
August 12, 2024
v0.2.1
August 12, 2024
Fixes:
Schedules token-refreshing after exchanging authorization code
Calls onRefresh() after successful code exchange response