ionic-appauth icon indicating copy to clipboard operation
ionic-appauth copied to clipboard

Capacitor WebPlugin "SecureStoragePlugin" config object was deprecated in v3 and will be removed in v4.

Open mraible opened this issue 3 years ago • 1 comments

I started seeing these warnings today when creating a new Ionic project and using Ionic AppAuth v0.7.4.

    console.warn
      Capacitor WebPlugin "SecureStoragePlugin" config object was deprecated in v3 and will be removed in v4.

      at new WebPlugin (node_modules/capacitor-secure-storage-plugin/node_modules/@capacitor/core/build/web-plugin.js:12:21)
      at new SecureStoragePluginWeb (node_modules/capacitor-secure-storage-plugin/dist/esm/web.js:4:9)
      at Object.<anonymous> (node_modules/capacitor-secure-storage-plugin/dist/esm/web.js:38:29)
      at Object.<anonymous> (node_modules/capacitor-secure-storage-plugin/dist/esm/index.js:1:1)

    console.warn
      Capacitor plugin "SecureStoragePlugin" is using the deprecated "registerWebPlugin()" function

      at legacyRegisterWebPlugin (node_modules/capacitor-secure-storage-plugin/node_modules/@capacitor/core/build/legacy/legacy-web-plugin-merge.js:10:13)
      at Object.registerWebPlugin (node_modules/capacitor-secure-storage-plugin/node_modules/@capacitor/core/build/global.js:30:46)
      at Object.<anonymous> (node_modules/capacitor-secure-storage-plugin/dist/esm/web.js:41:1)
      at Object.<anonymous> (node_modules/capacitor-secure-storage-plugin/dist/esm/index.js:1:1)

    console.log
      {
        action: 'Get Token From Storage Failed',
        error: 'No Token In Storage'
      }

      at ConsoleLogObserver.update (node_modules/ionic-appauth/lib/auth-observer.js:78:17)

When I start my app, I get additional errors.

[ng] Error: node_modules/capacitor-secure-storage-plugin/node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
[ng]   Types of property 'Plugins' are incompatible.
[ng]     Property 'SecureStoragePlugin' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
[ng] 16 export interface CapacitorInstance extends CapacitorGlobal {
[ng]                     ~~~~~~~~~~~~~~~~~
[ng]   node_modules/capacitor-secure-storage-plugin/dist/esm/definitions.d.ts:3:9
[ng]     3         SecureStoragePlugin: SecureStoragePluginPlugin;
[ng]               ~~~~~~~~~~~~~~~~~~~
[ng]     'SecureStoragePlugin' is declared here.

Any ideas how to fix it?

mraible avatar May 19 '21 13:05 mraible