mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-23 07:18:56 -05:00
fix(core): add credential and siwe to trustedProviders type
- Replace 'email-password' with 'credential' (the actual providerId used) - Add 'siwe' for Sign-In with Ethereum plugin support - Update documentation to use 'credential' instead of 'email-password' The previous 'email-password' value in the type didn't match any actual providerId - password-based accounts use 'credential' as their providerId. Co-authored-by: taesu <taesu@better-auth.com>
This commit is contained in:
@@ -115,7 +115,7 @@ export const auth = betterAuth({
|
||||
account: { // [!code highlight]
|
||||
accountLinking: { // [!code highlight]
|
||||
enabled: true, // [!code highlight]
|
||||
trustedProviders: ["email-password", "github"], // [!code highlight]
|
||||
trustedProviders: ["credential", "github"], // [!code highlight]
|
||||
}, // [!code highlight]
|
||||
}, // [!code highlight]
|
||||
});
|
||||
|
||||
@@ -408,7 +408,7 @@ export const auth = betterAuth({
|
||||
storeAccountCookie: true, // Store account data after OAuth flow in a cookie (useful for database-less flows)
|
||||
accountLinking: {
|
||||
enabled: true,
|
||||
trustedProviders: ["google", "github", "email-password"],
|
||||
trustedProviders: ["google", "github", "credential"],
|
||||
allowDifferentEmails: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -927,7 +927,7 @@ export type BetterAuthOptions = {
|
||||
*/
|
||||
trustedProviders?: Array<
|
||||
LiteralUnion<
|
||||
SocialProviderList[number] | "email-password" | "sso",
|
||||
SocialProviderList[number] | "credential" | "sso" | "siwe",
|
||||
string
|
||||
>
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user