feat: account linking for magic link + Google, last login method hint
- Move account linking config out of Google conditional so it's always active - Trust both 'google' and 'email' providers for automatic account linking - Add lastLoginMethod plugin to track how users last signed in - Show "Last signed in with Google/email link" hint in sign-in dialog Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a0ac904dfc
commit
6f7613818b
@@ -1,4 +1,4 @@
|
||||
import { magicLinkClient } from 'better-auth/client/plugins'
|
||||
import { lastLoginMethodClient, magicLinkClient } from 'better-auth/client/plugins'
|
||||
import { createAuthClient } from 'better-auth/react'
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ function getAuthURL(): string {
|
||||
*/
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: getAuthURL(),
|
||||
plugins: [magicLinkClient()],
|
||||
plugins: [magicLinkClient(), lastLoginMethodClient()],
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user