Azure / static-web-apps-cli

Azure Static Web Apps CLI ✨
https://aka.ms/swa/cli-local-development
MIT License
600 stars 119 forks source link

Support Custom Auth #306

Open GaryParr opened 3 years ago

GaryParr commented 3 years ago

Is your feature request related to a problem? Please describe. Can't test or debug custom auth providers

Describe the solution you'd like Option to bypass mock auth service when using custom auth

Describe alternatives you've considered Test and debug using deployed app

Additional context I'm setting up AAD B2C for my SWA and was really hoping I could run locally to see if I got everything working. This may not be a big deal now, but with everyone asking for AAD role support (and even full claim access) local testing of custom providers will become more important in the future.

GaryParr commented 3 years ago

With SWA releasing role management functions, custom auth support in development may have just become a bit more important.

GaryParr commented 3 years ago

Any update on this?

Alternatively, is there any way to locally develop and test custom role management functions? Currently the cli flat our ignores the relevant configuration...

{ "auth": { "rolesSource": "/api/GetRoles", "identityProviders": { // ... } } }

felpel commented 2 years ago

This is currently a blocker to actually use SWA for real-life production apps.

I tried to have my deployed SWA talk to my localhost STS with the help of ngrok, but this is far from ideal.

May I suggest to opt-out of mocked authorization through a CLI switch or an option within the SWA config?

AverageCakeSlice commented 2 years ago

I second this. It would be nice to at least have a more robust auth emulator so that we can simulate the response being returned from the custom identity provider. Like @felpel mentioned, having a way to switch the config to use the actual provider rather than the emulator would be fantastic as well.

GaryParr commented 2 years ago

Just checking in to see where this might be at. I've had to step away from my project for a while so I may have missed some change that obviates the need for this feature request. I do see labels were added over 6 months ago, but nothing since.

GaryParr commented 2 years ago

May I suggest to opt-out of mocked authorization through a CLI switch or an option within the SWA config?

This. A million times this. Please.

i-love-code commented 1 year ago

+1 for this.

davide-bergamini-sevenit commented 1 year ago

+1 for us too. I've seen a branch about this somewhere, is someone still working on this?

GaryParr commented 10 months ago

Just doing my yearly check in to see if there has been any movement on this issue.

aeromac commented 1 month ago

This would be very handy, especially for B2C, which I had assumed would have been supported

GaryParr commented 2 weeks ago

Do we have any kind of status update? I see this was added to a milestone, but haven't seem much about said milestone other than it is two months overdue.