Relative Content

Tag Archive for next.jsaws-amplifynext-auth

next-auth middleware in aws amplify not working as expected

I am trying to use next-auth v4 in middleware. I have common setup for authentication (credentials provider). When user is authenticated i am getting it from token in middleware. Locally works pretty fine in dev mode and in prod mode (build & start). But on production in AWS Amplify I am getting req: { nextauth: {token: null }}