yes, this one: without scope: ‘update:users’
this is my app.ts
import { createApp as createClientApp } from 'vue'
import { createHead } from '@unhead/vue'
import { InferSeoMetaPlugin } from '@unhead/addons'
import { createPinia } from 'pinia'
import { createRouter } from './router'
//@ts-ignore
import VueroApp from './VueroApp.vue'
import './styles'
import { createAuth0 } from '@auth0/auth0-vue'
export type VueroAppContext = Awaited<ReturnType<typeof createApp>>
export type VueroPlugin = (vuero: VueroAppContext) => void | Promise<void>
const plugins = import.meta.glob<{ default: VueroPlugin }>('./plugins/*.ts')
// this is a helper function to define plugins with autocompletion
export function definePlugin(plugin: VueroPlugin) {
return plugin
}
export async function createApp() {
const app = createClientApp(VueroApp)
const router = createRouter()
const head = createHead({
plugins: [InferSeoMetaPlugin()],
})
app.use(head)
const pinia = createPinia()
app.use(pinia)
const vuero = {
app,
router,
head,
pinia,
}
app.provide('vuero', vuero)
for (const path in plugins) {
try {
const { default: plugin } = await plugins[path]()
await plugin(vuero)
} catch (error) {
console.error(`Error while loading plugin "${path}".`)
console.error(error)
}
}
// use router after plugin registration, so we can register navigation guards
app.use(vuero.router)
.use(
createAuth0({
domain: import.meta.env.VITE_AUTH0_DOMAIN,
clientId: import.meta.env.VITE_AUTH0_CLIENT_ID,
authorizationParams: {
redirect_uri: import.meta.env.VITE_AUTH0_CALLBACK_URL,
audience: import.meta.env.VITE_AUTH0_AUDIENCE
},
})
)
return vuero
}
I can log in:
but If I tried to update the password:
I got this:
error: "Forbidden"
errorCode: "insufficient_scope"
message: "Insufficient scope, expected any of: update:users,update:users_app_metadata,update:current_user_metadata"
statusCode: 403
now, testing it, But I’m going to add the scope: 'update:users'
this is my app.ts
import { createApp as createClientApp } from 'vue'
import { createHead } from '@unhead/vue'
import { InferSeoMetaPlugin } from '@unhead/addons'
import { createPinia } from 'pinia'
import { createRouter } from './router'
//@ts-ignore
import VueroApp from './VueroApp.vue'
import './styles'
import { createAuth0 } from '@auth0/auth0-vue'
export type VueroAppContext = Awaited<ReturnType<typeof createApp>>
export type VueroPlugin = (vuero: VueroAppContext) => void | Promise<void>
const plugins = import.meta.glob<{ default: VueroPlugin }>('./plugins/*.ts')
// this is a helper function to define plugins with autocompletion
export function definePlugin(plugin: VueroPlugin) {
return plugin
}
export async function createApp() {
const app = createClientApp(VueroApp)
const router = createRouter()
const head = createHead({
plugins: [InferSeoMetaPlugin()],
})
app.use(head)
const pinia = createPinia()
app.use(pinia)
const vuero = {
app,
router,
head,
pinia,
}
app.provide('vuero', vuero)
for (const path in plugins) {
try {
const { default: plugin } = await plugins[path]()
await plugin(vuero)
} catch (error) {
console.error(`Error while loading plugin "${path}".`)
console.error(error)
}
}
// use router after plugin registration, so we can register navigation guards
app.use(vuero.router)
.use(
createAuth0({
domain: import.meta.env.VITE_AUTH0_DOMAIN,
clientId: import.meta.env.VITE_AUTH0_CLIENT_ID,
authorizationParams: {
redirect_uri: import.meta.env.VITE_AUTH0_CALLBACK_URL,
audience: import.meta.env.VITE_AUTH0_AUDIENCE,
scope: 'update:users'
},
})
)
return vuero
}
on my dashboard of auth0:
then when I tried to log in:
you can see that I wrote the email and password, so, I pressed the button Log in
and the page redirect me to the same page, I mean redirect me to the universal login of auth0, this happends when I added the scope: 'update:users'
so, I was checking the log:
and it seems everything is fine.
what do you think?