onLinkAccount not triggered when linking anonymous user with social account (BetterAuth v1.2.12)
Hi, I'm running into a problem likely related to #1457.
I am building an app using Expo
~53.0.9
on the client and Hono ^4.7.11
on the server.
BetterAuth version is v1.2.12
.
On the client side, I authenticate as an anonymous user and then try to link a Google account.
However, the onLinkAccount callback on the server is never triggered.
Here is the server-side config:
And here’s the client-side config:
What ends up happening is:
- The existing anonymous user is deleted from the Users table
- A new user is created and linked to the account from Google login
Is there something missing in my config to enable onLinkAccount to fire?
Thanks!GitHub
better-auth/better-auth
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
1 Reply
it seems that
onLinkAccount
is not called when running without ID token sign-in.
If I manually send the provider request from the mobile device and then verify the ID token, onLinkAccount
does get triggered.