YOU_CAN_ONLY_SEND_A_VERIFICATION_EMAIL_TO_AN_UNVERIFIED_EMAIL

I have a custom signup logic , when a user try to login i am sending a verification email from front end using this code
await authClient.sendVerificationEmail({
email: "user@email.com",
callbackURL: "/" // The redirect URL after verification
})
await authClient.sendVerificationEmail({
email: "user@email.com",
callbackURL: "/" // The redirect URL after verification
})
but its returning this error YOU_CAN_ONLY_SEND_A_VERIFICATION_EMAIL_TO_AN_UNVERIFIED_EMAIL. also whenever a user try to update his email getting this error , without a proper error reason
{
"code": "COULDNT_UPDATE_YOUR_EMAIL",
"message": "Couldn't update your email",
"status": 400,
"statusText": "BAD_REQUEST"
}
{
"code": "COULDNT_UPDATE_YOUR_EMAIL",
"message": "Couldn't update your email",
"status": 400,
"statusText": "BAD_REQUEST"
}
@Ping @Better Auth
4 Replies
rinshad
rinshadOP3w ago
@Better Auth
Better Auth
Better Auth3w ago
Hi there! I’ve noticed several common topics coming up in our Discord community about Better Auth. Here are some frequently asked questions along with best practices and solutions: • How do I configure Discord social login?
To use Discord as a Social Provider, you need to supply your Discord client ID and client secret in your Better Auth configuration file (as shown in our docs) [2]. This setup includes specifying the redirect URL for local development or production, so be sure to adjust it based on your environment. • How can I specify Discord bot permissions during OAuth authorization?
In scenarios where you need to integrate bot capabilities, our Discord provider supports an optional permissions property. This is appended to the authorization URL when using the bot scope, allowing you to define exactly what bot permissions you need during the OAuth flow [1]. • How do I address privacy concerns with the email scope in Discord authentication?
Some users worry about sending real email addresses. To mitigate this, you can use our email scope configuration field to replace the actual email with a dummy address. This keeps users in control of what information gets shared [5]. Additionally, Discord’s OAuth offers alternatives (like using the user’s unique Discord ID) as suggested in some GitHub discussions. • How can I control repeated authorization prompts on Discord?
By default, Discord’s OAuth flow uses the prompt parameter with a default value of “consent”, which causes reauthorization prompts on every login. You can set this parameter to “none” to streamline the user experience after the first authorization. This behavior has been discussed widely,
GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
From An unknown user
From An unknown user
From An unknown user
GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
From An unknown user
From An unknown user
From An unknown user
Better Auth
Better Auth3w ago
ensuring that users have a smoother login experience [3], [16]. • What about syncing and updating user profile information from Discord?
Better Auth supports profile hooks that enable you to map fields from the Discord profile (like the profile image or username) to the user record in your database. This is useful if you want to keep user data up to date and in sync with changes in Discord, ensuring a consistent and personalized experience [20]. Each of these approaches has been refined based on community feedback and GitHub discussions, ensuring that you get the most comprehensive and secure authentication setup possible. Feel free to ask if you need more specific details or help with any of these configurations! Sources: 2. Discord | Better Auth 1. feat: add Discord bot permissions parameter support 5. feat:Add Discord OAuth email scope configuration field 3. feat(discord): add consent as an option 16. Discord login always prompts for authorization 20. Feat: Profile Hooks
GitHub
better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
GitHub
better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
Discord | Better Auth
Discord provider setup and usage.
GitHub
feat: add Discord bot permissions parameter support by TheUntraceab...
When using the Discord social plugin, you can set the bot scope, and this scope can have an additional permissions scope, referring to the permissions of the Discord Bot once authorized. This pull ...

Did you find this page helpful?