Hi, with the previous 1.x version I could trigger the passwordless login prompt with this code:
loginWithRedirect({
passwordless: "true",
});
However in 2.x that option is no longer there. I am sure there is still a way to do this but I couldn’t figure it out. Can anyone assist?
My current code:
// main.ts
import App from "@/App.vue";
import "@/assets/styles/main.scss";
import { createRouter } from "@/router";
import { createPinia } from "pinia";
import { createApp } from "vue";
import { createMetaManager, plugin as metaPlugin } from "vue-meta";
import { createAuth0 } from "@auth0/auth0-vue";
const app = createApp(App);
app.use(
createAuth0({
domain: import.meta.env.VITE_AUTH0_DOMAIN,
clientId: import.meta.env.VITE_AUTH0_CLIENT_ID,
cacheLocation: "localstorage",
useRefreshTokens: true,
authorizationParams: {
audience: import.meta.env.VITE_AUTH0_AUDIENCE,
redirect_uri: location.origin,
scope: "token id_token",
},
})
);
app.use(createMetaManager());
app.use(metaPlugin);
app.use(createRouter(app));
app.use(createPinia());
app.mount("#app");
// router.ts
import { createAuthGuard } from "@auth0/auth0-vue";
import { createRouter as createVueRouter, createWebHistory } from "vue-router";
import type { App } from "vue";
export function createRouter(app: App) {
const router = createVueRouter(...);
const guard = createAuthGuard(app);
router.beforeEach(guard);
return router;
}
Also there is no “auth0-vue” tag and the forum enforces a minimum of 2 tags so I tagged it under “auth0-react”.