`/.auth/login/aad/callback` fails with 401 after sucessfull login

Martin Hinshelwood nkdAgility.com 35 Reputation points MVP
2024-11-01T11:00:48.1866667+00:00

I have auth setup and I understand that /.auth/* is supposed to handle both the outbound and the inbound callback. However, I get a 401 on return for https://preview.nkdagility.com/.auth/login/aad/callback

To Reproduce

Steps to reproduce the behaviour:

  1. Go to https://preview.nkdagility.com/.auth/login/aad/
  2. Login
  3. Return to https://preview.nkdagility.com/.auth/login/aad/callback
  4. 401: Unauthorized

URLs

Site: https://preview.nkdagility.com

Build: https://github.com/nkdAgility/NKDAgility.com/blob/main/.github/workflows/main.yaml

staticwebapp.config.json: https://github.com/nkdAgility/NKDAgility.com/blob/main/staticwebapp.config.json

GitRepo: https://github.com/nkdAgility/NKDAgility.com/

Expected behavior

I expected this to be handled and return to site with auth tokens present.

Any help would be appreciated.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,005 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.