You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-11-24 07:04:51 +02:00
add fallback in case the collection name in the response was stripped
This commit is contained in:
@@ -133,7 +133,7 @@ class AppAuthStore extends LocalAuthStore {
|
||||
const pb = new PocketBase(import.meta.env.PB_BACKEND_URL, new AppAuthStore());
|
||||
|
||||
if (pb.authStore.isValid) {
|
||||
pb.collection(pb.authStore.record.collectionName)
|
||||
pb.collection(pb.authStore.record.collectionName || "_superusers")
|
||||
.authRefresh()
|
||||
.catch((err) => {
|
||||
console.warn("Failed to refresh the existing auth token:", err);
|
||||
|
||||
Reference in New Issue
Block a user