static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Support Custom Auth

Open GaryParr opened this issue 4 years ago • 12 comments

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 avatar Sep 21 '21 22:09 GaryParr

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

GaryParr avatar Oct 14 '21 12:10 GaryParr

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": { // ... } } }

GaryParr avatar Nov 17 '21 15:11 GaryParr

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?

felpel avatar Nov 28 '21 21:11 felpel

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.

AverageCakeSlice avatar Jan 15 '22 02:01 AverageCakeSlice

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 avatar Sep 29 '22 17:09 GaryParr

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.

GaryParr avatar Oct 18 '22 20:10 GaryParr