Using Generic OAuth plugin to link social
So I have a user account, and they'll already be signed in, however I want the ability to use Roblox OAuth provider to link their roblox account to the main user.
right now the account linking seems to only support the default providers.
15 Replies
what version of better auth are you on?
1.0.15
I'll take a look and will keep you posted. feel free to open a github issue as well
sure, I’ll open one shortly. Appreciate it as always
Holy shit I was about to ask the same question, @bekacru this would be killer cause I am trying out BA just because of the ability to link social accounts
And I am running into the same issue
I have everything set up but I simply get:
robolox isn't supported
I know, I am also using the custom Oauth plugin
And getting the exact same issue as HotShot
Also replied to the issue on github lol
generic oauth account linking isn't supported yet. should be supported soon.
Sweet👌
cool to hear im not the only one with this request!
Unknown User•3mo ago
Message Not Public
Sign In & Join Server To View
I just looked into making a PR for Roblox support and it's a bit more difficult than just adding the provider. Roblox does not provide an email address through their oauth which triggers some errors
That is an issue that would need to be handled for either direct Roblox implementation or for custom oauth implementation for the account linking feature
For anyone who's interested, my fork has the Roblox provider built-in and is currently on version 1.1.4.
You can install it using
npm install 'https://gitpkg.vercel.app/D3visionNL/better-auth/packages/better-auth?main'
(or whichever package manager you prefer)
I had to use gitpkg cause else you get the main package which is kinda useless since we only need the better-auth package.
Config is:
Please do keep in mind that I am fully intending for this to be temporary so don't expect me to keep it up to date.
And finally, I am not making a PR with my "implementation" due to the fact that Better Auth is hardcoded to expect an email address and Roblox does not provide email addresses. While my current fix works, this issue really needs a more proper fix that could also apply to other social providers.
If something like this is not allowed to be shared here, please do let me know and I will remove the messageUnknown User•3mo ago
Message Not Public
Sign In & Join Server To View
Not a bad idea, however that would still leave the email checking problem. When using the manual linking feature, once the email existence check has passed it checks to see if the email for the user is the same as the email for the account you're trying to link. I really don't understand why cause this is a manual link so emails shouldn't matter but it does.
So in your case it would still give you an error due to the username not being the same as the email address of the user @imide
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View