Skip to content

Commit

Permalink
fix(ts): signIn infer provider type (#4623)
Browse files Browse the repository at this point in the history
The "P" type it's not passed in any props, so the result type doesn't understand and return the false type always, Adding the "P" at provider type props.
  • Loading branch information
ArthurPedroti committed May 31, 2022
1 parent 7d8cc70 commit 46089eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-auth/src/react/index.tsx
Expand Up @@ -175,7 +175,7 @@ export async function getProviders() {
export async function signIn<
P extends RedirectableProviderType | undefined = undefined
>(
provider?: LiteralUnion<BuiltInProviderType>,
provider?: LiteralUnion<P | BuiltInProviderType>,
options?: SignInOptions,
authorizationParams?: SignInAuthorizationParams
): Promise<
Expand Down

0 comments on commit 46089eb

Please sign in to comment.