From c9da04636ffe1ba804a1ce5e5b79027d3a2344d2 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Wed, 18 Dec 2024 12:37:04 +0200 Subject: [PATCH] feat(types): Add `oidcPrompt` and `oidcLoginHint` (#4789) --- .changeset/old-dryers-approve.md | 12 ++++++++++++ packages/types/src/externalAccount.ts | 2 ++ packages/types/src/factors.ts | 2 ++ packages/types/src/signIn.ts | 2 ++ packages/types/src/signUp.ts | 4 ++++ packages/types/src/user.ts | 2 ++ 6 files changed, 24 insertions(+) create mode 100644 .changeset/old-dryers-approve.md diff --git a/.changeset/old-dryers-approve.md b/.changeset/old-dryers-approve.md new file mode 100644 index 0000000000..1a6bb174e5 --- /dev/null +++ b/.changeset/old-dryers-approve.md @@ -0,0 +1,12 @@ +--- +'@clerk/types': minor +--- + +Adds `oidcLoginHint` & `oidcPrompt` parameters to following types: + +- `ReauthorizeExternalAccountParams` +- `OAuthConfig` +- `SignInCreateParams` +- `PrepareVerificationParams` +- `SignUpCreateParams` +- `CreateExternalAccountParams` diff --git a/packages/types/src/externalAccount.ts b/packages/types/src/externalAccount.ts index c8b2fbd952..b2ab7b6a0b 100644 --- a/packages/types/src/externalAccount.ts +++ b/packages/types/src/externalAccount.ts @@ -7,6 +7,8 @@ import type { VerificationResource } from './verification'; export type ReauthorizeExternalAccountParams = { additionalScopes?: OAuthScope[]; redirectUrl?: string; + oidcPrompt?: string; + oidcLoginHint?: string; }; export interface ExternalAccountResource extends ClerkResource { diff --git a/packages/types/src/factors.ts b/packages/types/src/factors.ts index 1eb79ecfb9..6ef8237e3f 100644 --- a/packages/types/src/factors.ts +++ b/packages/types/src/factors.ts @@ -101,6 +101,8 @@ export type PassKeyConfig = PasskeyFactor; export type OAuthConfig = OauthFactor & { redirectUrl: string; actionCompleteRedirectUrl: string; + oidcPrompt?: string; + oidcLoginHint?: string; }; export type SamlConfig = SamlFactor & { diff --git a/packages/types/src/signIn.ts b/packages/types/src/signIn.ts index f9d9425dc9..cca2951dcf 100644 --- a/packages/types/src/signIn.ts +++ b/packages/types/src/signIn.ts @@ -183,6 +183,8 @@ export type SignInCreateParams = ( redirectUrl: string; actionCompleteRedirectUrl?: string; identifier?: string; + oidcPrompt?: string; + oidcLoginHint?: string; } | { strategy: TicketStrategy; diff --git a/packages/types/src/signUp.ts b/packages/types/src/signUp.ts index c94d69e6be..8dd84f5a4d 100644 --- a/packages/types/src/signUp.ts +++ b/packages/types/src/signUp.ts @@ -127,6 +127,8 @@ export type PrepareVerificationParams = strategy: OAuthStrategy; redirectUrl?: string; actionCompleteRedirectUrl?: string; + oidcPrompt?: string; + oidcLoginHint?: string; } | { strategy: SamlStrategy; @@ -171,6 +173,8 @@ export type SignUpCreateParams = Partial< ticket: string; token: string; legalAccepted: boolean; + oidcPrompt: string; + oidcLoginHint: string; } & Omit>, 'legalAccepted'> >; diff --git a/packages/types/src/user.ts b/packages/types/src/user.ts index 15bc308226..a6cc92aef9 100644 --- a/packages/types/src/user.ts +++ b/packages/types/src/user.ts @@ -138,6 +138,8 @@ export type CreateExternalAccountParams = { strategy: OAuthStrategy; redirectUrl?: string; additionalScopes?: OAuthScope[]; + oidcPrompt?: string; + oidcLoginHint?: string; }; export type VerifyTOTPParams = { code: string };