feat: (auth) Add Google and DIscord Auth
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m0s

This commit is contained in:
2024-06-13 23:38:03 -04:00
parent 9bd10b56d9
commit 8ae855838b
4 changed files with 53 additions and 5 deletions

View File

@@ -44,8 +44,17 @@ export const useAuthStore = defineStore('auth', () => {
async function googleLogin() {
account.createOAuth2Session(
OAuthProvider.Google,
'https://bab.toal.ca/',
'https://bab.toal.ca/#/login'
'https://undock.ca',
'https://undock.ca/#/login'
);
currentUser.value = await account.get();
}
async function discordLogin() {
account.createOAuth2Session(
OAuthProvider.Discord,
'https://undock.ca',
'https://undock.ca/#/login'
);
currentUser.value = await account.get();
}
@@ -88,6 +97,7 @@ export const useAuthStore = defineStore('auth', () => {
register,
login,
googleLogin,
discordLogin,
logout,
init,
};