// auth.ts
export const getAuth = query({
args: {},
handler: async (ctx) => {
const userId = await getAuthUserId(ctx)
const user = await ctx.auth.getUserIdentity()
console.log('Auth', userId, user) // 'Auth', null, null
return { userId, user }
},
})
// auth.ts
export const getAuth = query({
args: {},
handler: async (ctx) => {
const userId = await getAuthUserId(ctx)
const user = await ctx.auth.getUserIdentity()
console.log('Auth', userId, user) // 'Auth', null, null
return { userId, user }
},
})