LoginWithGoogle feature now working.

This commit is contained in:
2024-09-24 01:38:46 -04:00
parent e2660791b7
commit d70ff96d9d
2 changed files with 28 additions and 12 deletions

View File

@@ -63,12 +63,12 @@ export const useAuthStore = defineStore(
}
}
async function loginGoogle(accessToken) {
async function loginWithGoogle(accessToken) {
try {
const response = await clientApi.post(
'api/google/sign-in',
'api/users/login-with-google',
{
accessToken: accessToken
token: accessToken
})
updateTokens(response.data)
} catch (error) {
@@ -95,6 +95,6 @@ export const useAuthStore = defineStore(
}
}
return {accessToken, refreshToken, isAuthenticated, userId, login, loginGoogle, logout}
return {accessToken, refreshToken, isAuthenticated, userId, login, loginWithGoogle, logout}
})