Skip to content

Commit

Permalink
fix: refresh pocketbase auth
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Mar 30, 2024
1 parent bc4e5cb commit e5a8dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/030.pocketbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineNuxtPlugin(async ({ app }) => {
try {
// TODO: Only refresh the auth model if it's expired
// get an up-to-date auth store state by verifying and refreshing the loaded auth model (if any)
// pb.authStore.isValid && await pb.collection('users').authRefresh();
pb.authStore.isValid && await pb.collection('users').authRefresh();
} catch (_) {
// clear the auth store on failed refresh
pb.authStore.clear();
Expand All @@ -39,4 +39,4 @@ export default defineNuxtPlugin(async ({ app }) => {

provide: { pocketBase: pb }
}
});
});

0 comments on commit e5a8dee

Please sign in to comment.