fix: get access token from headers
This commit is contained in:
@@ -29,8 +29,7 @@ export const contentstackProcedure = t.procedure.use(async function (opts) {
|
||||
})
|
||||
export const protectedProcedure = t.procedure.use(async function (opts) {
|
||||
const authRequired = opts.meta?.authRequired ?? true
|
||||
const session = await opts.ctx.auth()
|
||||
|
||||
const session = await (await opts.ctx).session
|
||||
if (!authRequired && env.NODE_ENV === "development") {
|
||||
console.info(
|
||||
`❌❌❌❌ You are opting out of authorization, if its done on purpose maybe you should use the publicProcedure instead. ❌❌❌❌`
|
||||
|
||||
Reference in New Issue
Block a user