fix: revert auth token and browser protect

This commit is contained in:
Ben Allfree 2024-11-18 06:33:13 -08:00
parent a9ef782666
commit 48b9dd4661

View File

@ -1,3 +1,4 @@
import { browser } from '$app/environment'
import { INSTANCE_URL } from '$src/env' import { INSTANCE_URL } from '$src/env'
import { createGenericSyncEvent } from '$util/events' import { createGenericSyncEvent } from '$util/events'
import { fetchEventSource } from '@microsoft/fetch-event-source' import { fetchEventSource } from '@microsoft/fetch-event-source'
@ -210,13 +211,15 @@ export const createPocketbaseClient = (config: PocketbaseClientConfig) => {
* token may be out of date, or fields in the user record may have changed * token may be out of date, or fields in the user record may have changed
* in the backend. * in the backend.
*/ */
// refreshAuthToken() if (browser) {
// .catch((error) => { refreshAuthToken()
// client.authStore.clear() .catch((error) => {
// }) client.authStore.clear()
// .finally(() => { })
// fireAuthChange(client.authStore) .finally(() => {
// }) fireAuthChange(client.authStore)
})
}
/** /**
* Listen for auth state changes and subscribe to realtime _user events. * Listen for auth state changes and subscribe to realtime _user events.