You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when you create a custom storage to use memory, authentication state is not persist and throw error:
Error in loading user info: Error: could not find matching config for state b6c6e5619e6a955d6cbc....
Steps to reproduce the behavior
create a custom storage as below and provide the storage class in a module using the providers array
{ provide: AbstractSecurityStorage, useClass: MemoryStorageService }
import { Injectable } from '@angular/core';
import { AbstractSecurityStorage } from 'angular-auth-oidc-client';
@Injectable()
export class MemoryStorageService implements AbstractSecurityStorage {
private data = new Map<string, string>();
read(key: string) {
return this.data.get(key) || null;
}
write(key: string, value: any): void {
this.data.set(key, value);
}
remove(key: string): void {
this.data.delete(key);
}
clear(): void {
this.data.clear();
}
}
The text was updated successfully, but these errors were encountered:
mohsenvafa
changed the title
[Bug]: Custom Storage on Memory
[Bug]: Custom Storage to use Memory throw exception
Jan 14, 2025
Version
19.0.0
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: