User with profiles belonging to organizations
Hi, is there a way to get this flow working?
A user can have multiple profiles.
A profile can belong to multiple organizations.
The user is not directly part of the organization.
Do you have any ideas? Do i need to edit the organization behavior or build a custom plugin for that use case?
6 Replies
@Better Auth
Hey there, everyone! Here are some common questions we've seen about Better Auth with some brief answers:
1. How do I configure the Discord provider?
To use Discord for authentication, you must obtain a client ID and client secret from the Discord Developer Portal. Then, update your Better Auth configuration (e.g., in auth.ts) with these values and set the proper redirect URL for your environment (e.g., localhost for development or your production URL) [1]. 2. What about privacy concerns with collecting emails via Discord?
Some community members have raised privacy concerns about collecting real email addresses. There’s talk about optionally using Discord’s unique snowflake ID instead of the email field, or replacing the email scope with a dummy address to address these concerns [2], [5]. This helps ensure users understand that their email won’t be misused. 3. Can I customize Discord OAuth to include bot permissions?
Yes, Better Auth now supports specifying Discord bot permissions during OAuth authorization. When using the
Some users have encountered issues with the Discord OAuth redirect URL formatting (e.g., missing the required "++" prefix) which can cause authentication errors. Make sure that your Better Auth setup generates URLs that include these prefixes as Discord requires for a successful OAuth flow [6]. 5.
To use Discord for authentication, you must obtain a client ID and client secret from the Discord Developer Portal. Then, update your Better Auth configuration (e.g., in auth.ts) with these values and set the proper redirect URL for your environment (e.g., localhost for development or your production URL) [1]. 2. What about privacy concerns with collecting emails via Discord?
Some community members have raised privacy concerns about collecting real email addresses. There’s talk about optionally using Discord’s unique snowflake ID instead of the email field, or replacing the email scope with a dummy address to address these concerns [2], [5]. This helps ensure users understand that their email won’t be misused. 3. Can I customize Discord OAuth to include bot permissions?
Yes, Better Auth now supports specifying Discord bot permissions during OAuth authorization. When using the
bot scope, you can add a permissions parameter in your configuration to pass the desired bot permissions, making integrations requiring bot capabilities more flexible [3].
4. I’m running into redirect issues. What should I do?Some users have encountered issues with the Discord OAuth redirect URL formatting (e.g., missing the required "++" prefix) which can cause authentication errors. Make sure that your Better Auth setup generates URLs that include these prefixes as Discord requires for a successful OAuth flow [6]. 5.
GitHub
better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
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.

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.

GitHub
better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
Why is Discord always prompting for consent on authorization?
It turns out that Discord’s OAuth flow defaults to prompting for consent. You can adjust this behavior by modifying the
It turns out that Discord’s OAuth flow defaults to prompting for consent. You can adjust this behavior by modifying the
prompt parameter. If you prefer less interruption after the first login, consider setting the prompt to "none" to bypass repeat approvals [16].
These are just a few of the topics based on community questions and our latest updates. If you have any other questions or need further clarification, feel free to ask here!
Sources:
[1] Discord | Better Auth
[2] feat: Discord Oauth without the email scope
[3] feat: add Discord bot permissions parameter support
[5] feat:Add Discord OAuth email scope configuration field
[6] Discord OAuth redirect_uri requires double plus signs (++) prefix - Better Auth generates invalid URLs
[16] Discord login always prompts for authorizationGitHub
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: Discord Oauth without the email scope · Issue #2059 · bette...
Is this suited for github? Yes, this is suited for github Is your feature request related to a problem? Please describe. I find collecting email addresses a potential privacy concern depending on t...
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 ...
GitHub
feat:Add Discord OAuth email scope configuration field by Summerlyt...
Collecting the real email address is a privacy concern. By implementing this simple fix, it allows users to replace said address with a dummy address easily. I understand you can write over the ema...
Anyone have any ideas?
I'm not sure what you mean by "profiles". Best I can think of is having every user have a separate account with account switcher that is a part of each org
I mean that I want each user to have multiple profiles linked to their userId.
Each profile can have its own first name, last name, bank account number, etc., but they all still belong to the same user.

