You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call getSession inside of my API it throws an error showing that it attempted to make an API call to oauth/token and it was hit with a 401 but my API handler is wrapped in withApiAuthRequired which does not fail and I am authenticated so I'm stumped why calling getSession is failing.
Reproduction
Follow the setup setups outlined in the README of this package
Create an API route as shown below
import { getSession, withApiAuthRequired } from "@auth0/nextjs-auth0"
import { NextApiRequest, NextApiResponse } from "next"
const handler = async (req: NextApiRequest, res: NextApiResponse): Promise<void> => {
const data = getSession(req, res)
// Ommitted the rest of the code as not applicable
}
export default withApiAuthRequired(handler)
Call this API when you are authenticated inside of your application and it will throw the error
Environment
Please provide the following:
Version of this library used: 1.3.1
Version of the platform or framework used, if applicable: 10.2.0
The text was updated successfully, but these errors were encountered:
Description
Reproduction
Environment
The text was updated successfully, but these errors were encountered: