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

Debug the roles function using the local auth emulator

Open simonaco opened this issue 3 years ago • 9 comments

Is your feature request related to a problem? Please describe. Enable local dev for role management through serverless functions

Describe the solution you'd like Test programmatically assigned roles in local environment

Describe alternatives you've considered Call the auth function locally with something like Postman to ensure it responds with the right roles given an input. Use the local emulator to set custom roles at login to test how your app works with different roles.

Additional context Tutorial: Assign custom roles with a function and Microsoft Graph

simonaco avatar Dec 17 '21 16:12 simonaco

Related to #306

AverageCakeSlice avatar Jan 15 '22 02:01 AverageCakeSlice

I will look at this post-GA.

The current workaround is to print a warning if we detect the auth in the staticwebapp.config.json

manekinekko avatar Apr 27 '22 11:04 manekinekko

What is the current status of this? I was attempting to enable role management and test locally. I expected my GetRoles function to be called but it wasn't after login. I was able to call GetRoles directly. I was hoping not to debug in a live SWA deployment.

I'm using SWA CLI ver 1.01 and C#(.net6).

oneolddev avatar Jun 01 '22 04:06 oneolddev

Hi @c0g1t8, We have this in our radar and will be working on this shortly. We do not have a timeline yet to commit this, but you should be seeing some update in a couple of months.

cc// @sgollapudi77

Reshmi-Sriram avatar Jun 01 '22 05:06 Reshmi-Sriram