hooks: {
after: createAuthMiddleware(async (ctx) => {
if (ctx.path === '/callback/:id') {
if (ctx.params?.id === 'google') {
const session = await getSessionFromCtx(ctx)
console.log(session) // output: is null
console.log(ctx.context.session) // output: is null
await ctx.context.internalAdapter.updateSession(
session!.session.id,
{
...ctx.
}
)
}
else if (ctx.params?.id === 'github') {
console.log('github callback, attaching wallet....')
}
}
}),
}
...
})
hooks: {
after: createAuthMiddleware(async (ctx) => {
if (ctx.path === '/callback/:id') {
if (ctx.params?.id === 'google') {
const session = await getSessionFromCtx(ctx)
console.log(session) // output: is null
console.log(ctx.context.session) // output: is null
await ctx.context.internalAdapter.updateSession(
session!.session.id,
{
...ctx.
}
)
}
else if (ctx.params?.id === 'github') {
console.log('github callback, attaching wallet....')
}
}
}),
}
...
})