-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage gets cleared every other day (iOS) #1317
Comments
I have the same issue with angular 18. I am using a custom storage, but storage works fine for one day. the next day, on the first load the stored key isnt accessed (says last accessed the day before) and on page refresh the stored key gets deleted altogether. |
|
doesnt work with angular. I'll create a new ticket then, thanks for the reply anyway |
The Code is from a angular app |
cant use this.storage since that doesnt work with ssr. |
you need to add your own indexdb logic |
already have that, issue persists. this is the implementation that we use. SsrCookiService is coming from the package ngx-cookie-service-ssr import { Inject, Injectable } from '@angular/core';
import { SsrCookieService } from 'ngx-cookie-service-ssr';
import { SupportedStorage } from '@supabase/supabase-js';
@Injectable({
providedIn: 'root',
})
export class SupabaseStorageService implements SupportedStorage {
constructor(
private readonly cookieService: SsrCookieService,
) {
}
getItem(key: string): string | Promise<string | null> | null {
return this.cookieService.get(key);
}
setItem(key: string, value: string): void | Promise<void> {
this.cookieService.set(key, value);
}
removeItem(key: string): void | Promise<void> {
this.cookieService.delete(key);
}
} |
Bug report
https://forum.ionicframework.com/t/storage-gets-cleared-every-other-day-ios14/203254
The Supabase token are in the local storage the problem is that on Ionic Capacitor Apps the iOS Localstorage will be cleared every other day. This is why it need to be saved somewhere else. StorageDB for example.
The text was updated successfully, but these errors were encountered: