I'm having trouble handling refresh tokens because setUserSession doesn't update the session. So, I'm considering the possibility of adding options to setUserSession or returning an updateSession function along with the useUserSession composable.
Other ideas could be add options to refresh token in the route files... and maybe add the refresh token method to the providers definitions too.
I'd like to know people here think about this
P.S: I read the others topics talking about this issue and I think we don't have a good solution yet
// expose update session
const { updateSession } = useUserSession()
updateSession( {
token: 'token',
refresh_toke: 'token'
})
// allow session mutation by setUserSession
setUserSession(event, {
token: 'token',
refresh_toke: 'token'
}, { updateSession: true })
// add refreshtoken callback
export default defineOAuthAuth0EventHandler({
async onSuccess(event, data) {},
async onRefreshToken() {}
})
I'm having trouble handling refresh tokens because setUserSession doesn't update the session. So, I'm considering the possibility of adding options to setUserSession or returning an updateSession function along with the useUserSession composable.
Other ideas could be add options to refresh token in the route files... and maybe add the refresh token method to the providers definitions too.
I'd like to know people here think about this
P.S: I read the others topics talking about this issue and I think we don't have a good solution yet