🚑 (auth) Fix bad requests with getSession on server side
This commit is contained in:
@ -8,7 +8,7 @@ import { oauth2Client } from '@/lib/googleSheets'
|
||||
import { getAuthenticatedUser } from '@/features/auth/helpers/getAuthenticatedUser'
|
||||
|
||||
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const user = await getAuthenticatedUser(req)
|
||||
const user = await getAuthenticatedUser(req, res)
|
||||
if (!user) return notAuthenticated(res)
|
||||
const state = req.query.state as string | undefined
|
||||
if (!state) return badRequest(res)
|
||||
|
Reference in New Issue
Block a user