Closed rgbaman closed 1 year ago
I no longer support encryption on the web, since it would be incredibly easy for a hacker to find the encryption key in the source code. Supporting actual secure storage on the web is beyond the scope of this plugin, since it is really designed for native mobile usage. setEncryptionKey
was a web-only method which has been removed. Problem solved!
Bug report
Capacitor version
Platform(s)
Only tested on web so far.
Current behavior
I am using Angular and when following the documentation to
get
orset
data by usingsetEncryptionKey
it crashes the app.There are no warnings (other than by not including the
setEncryptionKey
which throws the expectedencryptionKeyNotSet
error), it just crashes the browser.Expected behavior
The plugin should call the
setEncryptionKey
property and use this to get the information stored in localStorage. Perhaps the property forget
should be renamed togetEncryptionKey
?Code reproduction
Setting seems to work perfectly fine:
The crash occurs when getting:
Other technical details
npm --version
output:9.5.0
node --version
output:v16.18.0