Skip to content

Commit 46089eb

Browse files
authoredMay 31, 2022
fix(ts): signIn infer provider type (#4623)
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.
1 parent 7d8cc70 commit 46089eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/next-auth/src/react/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export async function getProviders() {
175175
export async function signIn<
176176
P extends RedirectableProviderType | undefined = undefined
177177
>(
178-
provider?: LiteralUnion<BuiltInProviderType>,
178+
provider?: LiteralUnion<P | BuiltInProviderType>,
179179
options?: SignInOptions,
180180
authorizationParams?: SignInAuthorizationParams
181181
): Promise<

0 commit comments

Comments
 (0)
Please sign in to comment.