[Auth] Allow user select google account on login (#3777)

This commit is contained in:
Chenlei Hu
2025-05-05 23:16:16 -04:00
committed by GitHub
parent ca16e55579
commit d05a340949
2 changed files with 6 additions and 1 deletions

View File

@@ -56,6 +56,9 @@ export const useFirebaseAuthStore = defineStore('firebaseAuth', () => {
// Providers
const googleProvider = new GoogleAuthProvider()
googleProvider.setCustomParameters({
prompt: 'select_account'
})
const githubProvider = new GithubAuthProvider()
// Getters

View File

@@ -52,7 +52,9 @@ vi.mock('firebase/auth', () => ({
signOut: vi.fn(),
onAuthStateChanged: vi.fn(),
signInWithPopup: vi.fn(),
GoogleAuthProvider: vi.fn(),
GoogleAuthProvider: class {
setCustomParameters = vi.fn()
},
GithubAuthProvider: vi.fn(),
browserLocalPersistence: 'browserLocalPersistence',
setPersistence: vi.fn().mockResolvedValue(undefined)