export const getAuthToken = query({
args: {
providerId: v.string(),
},
handler: async (ctx, args) => {
const { userId } = await requireAuth(ctx);
const auth = createAuth(ctx);
const token = await auth.api.getAccessToken({
body: {
providerId: args.providerId,
userId,
},
});
console.log(token)
return token;
},
});
export const getAuthToken = query({
args: {
providerId: v.string(),
},
handler: async (ctx, args) => {
const { userId } = await requireAuth(ctx);
const auth = createAuth(ctx);
const token = await auth.api.getAccessToken({
body: {
providerId: args.providerId,
userId,
},
});
console.log(token)
return token;
},
});