Use Auth0 for a Vue app wrapped in Cordova

Hi all,

I want to wrap my vue app in Cordova so I can cross publish to web and mobile. So far I successfully implemented Auth0 based on auth0-spa-js (GitHub - auth0-samples/auth0-vue-samples: Auth0 Integration Samples for Vue.js Applications). But looking at auth0-cordova (GitHub - auth0-samples/auth0-cordova-samples: Integrate Auth0 with Cordova apps) the Auth0 Cordova SDK seems to use a completely different approach and methods.

What the recommended approach to make a Vue app work on web AND mobile (via Cordova)?


P.S. already checked out similar questions here in the forum. None got a straight answer that I could translate to my use case.

This is a somewhat complex case because although technically you can use the same languages and tech stacks in both web and mobile from the perspective of authentication the two platforms have different recommendations/considerations.

From a personal perspective I think would have the logic to perform the login in code specific to each platform and abstract the outcome to the rest of the application code so that business code can be shared. As in, abstract operations like login and obtaining refreshed tokens so that those operations can be performed in accordance to the current platform (and SDK) while the rest of the application just call into these operations without worrying about their different implementation.