Account Linking

Hi there,

I'm using better-auth for authentication in my app, and I want to support two providers:

Google OAuth

Phone number with OTP (credentials-based)

Here's what I'm trying to achieve:

Users can sign up using Google, but we want to mandate phone number verification right after sign-up to prevent fake or bot accounts.

Once verified, the phone number should be linked to the Google account so that:

The user can later sign in using either Google or just their phone number (one unified account).

Both login methods point to the same user account.

My Questions:
How do I properly implement phone number + OTP signup using Better Auth? The docs aren’t super clear on this flow.

After a user signs up with Google, how do I link their phone number to their Google account for dual sign-in support?

Would appreciate a clearer explanation or code sample for this flow.
Thanks!
Was this page helpful?