Capacitor mobile app integration
-
I created a PWA with Auth0 integration. Now I’m creating a Capacitor-based mobile application from the PWA, but Auth0 fails with a “auth0-spa-js must run on a secure origin” error. Although I see Auth0 documentation for Cordova integration, I don’t see anything for Capacitor…and what little community support I see takes the form of Ionic or direct API calls. There are one or two poorly supported NPM packages out in the wild that appear to bridge this gap, but they don’t look particularly promising.
Can anyone assist? Many thanks.
-
Auth0 fails with a “auth0-spa-js must run on a secure origin” error.
does it fail in dev mode or prod?
-
@dobbel It fails in dev mode. I haven’t checked production mode, but I will and report my results.
-
auth0-spa-js must run on a secure origin
I think this specific library does not support Capacitor (SPA only).
maybe this will help?
https://github.com/moberwasserlechner/capacitor-oauth2
https://ionic.io/docs/auth-connect
https://devdactic.com/capacitor-google-sign-in/
https://github.com/AyogoHealth/cordova-plugin-oauth