vscode-azurestaticwebapps icon indicating copy to clipboard operation
vscode-azurestaticwebapps copied to clipboard

Support app settings even if there's no function app

Open anthonychu opened this issue 2 years ago • 6 comments

Some apps have app settings node missing. I think this might be because the app doesn't have a function app. It should be possible to set app settings in all static web apps.

image

/cc @simonaco

anthonychu avatar Oct 12 '21 19:10 anthonychu

We started hiding it due to this issue: https://github.com/microsoft/vscode-azurestaticwebapps/issues/239

You can see if there is no function app, then an error is thrown when you make an API call to retrieve the triggers.

As far as I can tell, if you don't have a function app, the app settings blade just freezes on the portal: image

nturinski avatar Oct 12 '21 20:10 nturinski

That shouldn't be the case. I just tried it on a free app with no functions. Also a free app that hasn't been deployed to at all. Able to open the configuration blade and add an app setting. Also refreshed to ensure it got saved.

@miwebst can help troubleshoot this.

anthonychu avatar Oct 13 '21 06:10 anthonychu

What's the use case for having app settings with no Function app? Are customers somehow able to access those from the client code or is this more of a consistency thing?

fiveisprime avatar Oct 13 '21 22:10 fiveisprime

Standard apps can use app settings in auth config without functions. Also useful for setting config before deployment is complete.

anthonychu avatar Oct 14 '21 03:10 anthonychu

Okay, that sounds good. Can you walk me through the scenario for setting auth up and how that should be exposed? My concern is confusing customers about app settings - we've seen people in studies assume app settings were available to the client and I don't want to compound that.

fiveisprime avatar Oct 15 '21 17:10 fiveisprime

See this tutorial: https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-custom

Good point about the confusion. I think we’ll need to solve this within the product somehow. /cc @simonaco

anthonychu avatar Oct 16 '21 23:10 anthonychu