Skip to content

Commit a14fbea

Browse files
committed
chore: add TODO comment for next major
1 parent 4705632 commit a14fbea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ export async function getProviders() {
175175
export async function signIn<
176176
P extends RedirectableProviderType | undefined = undefined
177177
>(
178-
provider?: LiteralUnion<P extends RedirectableProviderType ? P | BuiltInProviderType : BuiltInProviderType>,
178+
provider?: LiteralUnion<
179+
P extends RedirectableProviderType
180+
? P | BuiltInProviderType
181+
: BuiltInProviderType
182+
>,
179183
options?: SignInOptions,
180184
authorizationParams?: SignInAuthorizationParams
181185
): Promise<
@@ -224,6 +228,7 @@ export async function signIn<
224228

225229
const data = await res.json()
226230

231+
// TODO: Do not redirect for Credentials and Email providers by default in next major
227232
if (redirect || !isSupportingReturn) {
228233
const url = data.url ?? callbackUrl
229234
window.location.href = url

0 commit comments

Comments
 (0)