Skip to content

Commit f4ecc13

Browse files
dmoernerclaude
andauthored
feat(backend): Add preferredSignInStrategyWhenPasswordRequired (#8878)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c6127bc commit f4ecc13

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': minor
3+
---
4+
5+
Add support for the `preferredSignInStrategyWhenPasswordRequired` parameter to `clerkClient.instance.update()`. Accepts `'password'` or `'otp'` to override the preferred sign-in strategy when a password is required, or an empty string to clear the override.

packages/backend/src/api/endpoints/InstanceApi.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ type UpdateParams = {
3636
* Whether the instance should use URL-based session syncing in development mode (i.e. without third-party cookies).
3737
*/
3838
urlBasedSessionSyncing?: boolean | null | undefined;
39+
/**
40+
* Overrides the sign-in strategy that is preferred when a password is required.
41+
*
42+
* @remarks Accepts `'password'` or `'otp'`. Pass an empty string to clear the override. Passing `null` or `undefined` leaves the current value unchanged. The value is only consulted when a password is required, and is dormant otherwise.
43+
*/
44+
preferredSignInStrategyWhenPasswordRequired?: 'password' | 'otp' | '' | null | undefined;
3945
};
4046

4147
type UpdateRestrictionsParams = {

0 commit comments

Comments
 (0)