Skip to content

Problem with auth/callback when next.js app deployed on Azure app service #3739

Answered by GrzegorzCzm
GrzegorzCzm asked this question in Help
Discussion options

You must be logged in to vote

Hi,

I was looking for solution for this issue for last two days. And now, when I posted it here I have tried one more thing. According to https://next-auth.js.org/getting-started/example#deploying-to-production I have added NEXTAUTH_URL as application setting under app service configuration.
Earlier I thought that something like below will be sufficient.

package.json

  (...)
  "scripts": {
   (...)
    "start": "cross-env NEXTAUTH_URL=https://MY-APP-qa-next.azurewebsites.net node server.js",
  },

Maybe this will work for regular server, but looks like Azure app service need to have NEXTAUTH_URL set in application setting.
So looks like problem solved.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HabibaAsif
Comment options

Answer selected by GrzegorzCzm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Ask how to do something or how something works
2 participants
Converted from issue

This discussion was converted from issue #3738 on January 25, 2022 21:05.