-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEATURE] Allow to provide other secure storage #45
Comments
Already supported : https://github.com/Badisi/auth-js/blob/main/projects/auth-js/oidc/mobile/mobile-storage.ts#L27 As long as you have the package installed, the library will use it 😉 |
@ms-emp, did it worked ? |
Sorry I misread the name of the plugin you mentioned as it's quite similar with So you can provide your own implementation, either:
import { InMemoryWebStorage, WebStorageStateStore } from 'oidc-client-ts';
import { AuthUtils } from '@badisi/auth-js'; // or '@badisi/ngx-auth'
initAuth({
...,
internal: {
userStore: new WebStorageStateStore({
store: AuthUtils.isNativeMobile() ? new MyMobileStorage() : new InMemoryWebStorage()
// or simply "store: new MyMobileStorage()" if you are only developing for mobile
})
}
}
// Example
window.Capacitor.Plugins.SecureStoragePlugin = new MyMobileStorage() And in your case maybe: import { SecureStorage } from '@aparajita/capacitor-secure-storage';
...
store: new SecureStorage()
...
// or
window.Capacitor.Plugins.SecureStoragePlugin = window.Capacitor.Plugins.AparajitaCapacitorSecureStorage; |
Let me know how it goes 😉 |
Description
I would like to use a different capacitor plugin for secure storage. for example: capacitor-secure-storage
Proposed solution
It should be a way to provide a different secure storage
Alternatives considered
No response
The text was updated successfully, but these errors were encountered: