Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
330 stars 56 forks source link

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

Open MrHinsh opened 6 days ago

MrHinsh commented 6 days ago

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://prototype.nkdagility.com/.auth/login/aad/callback

To Reproduce

Steps to reproduce the behaviour:

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

URLs

Site: https://prototype.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.

MrHinsh commented 15 hours ago

Note to all it looks like this location is not monitored! I got reponces on https://learn.microsoft.com/en-us/answers/questions/2114272/auth-login-aad-callback-fails-with-401-after-suces?comment=question