martinkasa / capacitor-secure-storage-plugin

Capacitor plugin for storing string values securly on iOS and Android.
MIT License
155 stars 56 forks source link

Get method does not throw error on missing value #9

Closed Frotty closed 4 years ago

Frotty commented 4 years ago

Using capacitor 1.4.0 I copied the code examples from the readme:

import 'capacitor-secure-storage-plugin';
import { Plugins } from '@capacitor/core';
const { SecureStoragePlugin } = Plugins;

[...]

    const key = 'moots_token_secure';
    SecureStoragePlugin.get({ key })
    .then((value: string) => {
      console.log(value);
    })
    .catch((error: any) => {
      console.log('Item with specified key does not exist.');
    });

But there is never any error thrown. If the value does not exist, a weird {value: "žée"} value is returned:

martinkasa commented 4 years ago

duplicate #2 will be fixed in next release

Frotty commented 4 years ago

Thanks. Do you have a rough estimate for the next release?

Drvanon commented 4 years ago

For me this is being quite a problem. I would be quite interested in an expected time as well.

Frotty commented 4 years ago

Well the next release happened, but #2 is still open

Drvanon commented 4 years ago

Excuse me, I got confused, I thought I was on #2 when writing this.