Skip to content

Commit

Permalink
chore(types): separately export AdapterAccountType (#10832)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed May 6, 2024
1 parent d55b156 commit bfa7079
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/core/src/adapters.ts
Expand Up @@ -185,6 +185,14 @@ export interface AdapterUser extends User {
emailVerified: Date | null
}

/**
* The type of account.
*/
export type AdapterAccountType = Extract<
ProviderType,
"oauth" | "oidc" | "email" | "webauthn"
>

/**
* An account is a connection between a user and a provider.
*
Expand All @@ -196,7 +204,7 @@ export interface AdapterUser extends User {
*/
export interface AdapterAccount extends Account {
userId: string
type: Extract<ProviderType, "oauth" | "oidc" | "email" | "webauthn">
type: AdapterAccountType
}

/**
Expand Down

0 comments on commit bfa7079

Please sign in to comment.