Skip to content

Commit c9e16fb

Browse files
committed
fix(core): only show Twitter OAuth 2 warning once
1 parent a7d34f9 commit c9e16fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/lib/assert.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ type ConfigError =
1616
| MissingAuthorize
1717
| MissingAdapter
1818

19+
let twitterWarned = false
20+
1921
/**
2022
* Verify that the user configured `next-auth` correctly.
2123
* Good place to mention deprecations as well.
@@ -78,7 +80,8 @@ export function assertConfig(
7880
return new MissingAdapter("E-mail login requires an adapter.")
7981
}
8082

81-
if (hasTwitterProvider) {
83+
if (!twitterWarned && hasTwitterProvider) {
84+
twitterWarned = true
8285
return "TWITTER_OAUTH_2_BETA"
8386
}
8487
}

0 commit comments

Comments
 (0)