Skip to content

Commit

Permalink
Merge pull request #31 from baillysi/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
baillysi authored Jul 25, 2024
2 parents 7e5f4f6 + f526281 commit d0064b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/AuthComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ async function signInWithGoogle() {
await signInWithRedirect(auth, provider)
}
async function signInAsGuest(auth) {
async function signInAsGuest() {
isAuthLoading.value = true
signInAnonymously(auth)
.then((result) => {
.then(() => {
// Signed in..
isAuthLoading.value = false
console.log('Successfully logged in as guest !')
Expand All @@ -49,7 +49,6 @@ getRedirectResult(auth)
// The signed-in user info.
googleUser.value = result.user;
isAuthLoading.value = false
console.log('Successfully logged in !')
}).catch((error) => {
Expand Down Expand Up @@ -114,7 +113,6 @@ getRedirectResult(auth)
</button>
<br/>
<small id="guesthelp" class="form-text text-muted">Certaines fonctionnalités avancées ne seront pas disponibles.</small>

</div>

</div>
Expand All @@ -123,8 +121,9 @@ getRedirectResult(auth)
<div class="row" style="margin-left: 10px; margin-right: 10px;">
<AlertComponent :message="'Vous êtes correctement identifié !'"></AlertComponent>
</div>
<div>Utilisateur : {{ googleUser.displayName }} </div>
<div>Email : {{ googleUser.email }} </div>
<div v-if="currentUser.isAnonymous">Utilisateur : Invité </div>
<div v-if="!currentUser.isAnonymous">Utilisateur : {{ googleUser.displayName }} </div>
<div v-if="!currentUser.isAnonymous">Email : {{ googleUser.email }} </div>
</div>

</div>
Expand Down

0 comments on commit d0064b5

Please sign in to comment.