Skip to content

Commit

Permalink
Merge pull request #12 from dead8309/main
Browse files Browse the repository at this point in the history
fix: New accounts not able to login after signout
  • Loading branch information
dead8309 authored Mar 30, 2024
2 parents a541dc8 + 0448036 commit 8f9857d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export class FirebaseJWTStrategy extends JWTStrategy {
try {
const token = authentication.accessToken ?? authentication.access_token;
const user = await firebaseAdmin.auth().verifyIdToken(token);
console.log('user', user);
if (!user) {
throw new NotAuthenticated();
}
Expand Down Expand Up @@ -64,11 +63,12 @@ export class FirebaseJWTStrategy extends JWTStrategy {
uid: id,
},
...params,
paginate: false,
});
if (!result.data || result.data.length === 0) {
return result;
if (!result) {
return null;
}
const entity = result.data.find((entry: any) => entry.uid === id);
const entity = result.find((entry: any) => entry.uid == id);
return entity;
}

Expand Down

0 comments on commit 8f9857d

Please sign in to comment.