Open itpropro opened 3 years ago
Hi, by pre-production environments, do you mean local development or staging sites?
Hey, I mean the staging sites, they are called pre-production in the docs that is why I used that phrase :) I think these staging sites are one of the great features that help integrating a SWA into a professional CI/CD process. Unfortunately, as many larger SWA based projects that I assisted customers with were using their own functions runtime, they couldn't benefit from the staging environments. This and the lack of full swaconfig support in staging environments (auth) are currently blocking two projects and I wanted to know if there is an indication when these limitations may be fixed.
Hey, @mkarmark, @anthonychu, any updates on support for authentication/authorization and bring your own functions on pre-production enviroments?
+1 on this. I had to switch to BYO function because I needed to generate a client-side auth token using a managed identity. But doing so means my app collaborators can't use the staging environment feature to fully test out their changes. Big Sad!
Any updates or plans on this @mkarmark and @anthonychu?
We're working on this. Hope to have an update in a month.
@anthonychu any updates on this?
As I understand it - authentication does not work with preview environments at all.
Any updates @annikel ? Most projects I work with use the authentication layer, so preview and PR environments are basically not usable...
@anthonychu was the functionality to use the full authentication/authorization features in every environment type released in the meantime? I could close the issue then.
I'm facing the same issue here. Technically, if we need AAD for both StaticWebApp and Azure Functions (with Azure Functions is the backend API of StaticWebApp), there is no way we could authorize the requests (in pre-production environments)
@anthonychu do we have any update or workaround for this issue?
Describe the bug
We heavily rely on the auth endpoint in form of the
.auth/me
endpoint as well as the injected headers in the backend. If a PR is created and a pre-production environment deployed, the.auth/me
endpoint sometimes returns a 404, and the bring-your-own-function backend always returns a 405. This renders our application technically unusable, what can we do to have the auth endpoint available in pre-production environments and to have the auth information handed over to the backend?Additional context Backend
Frontend
The whole development process heavily relies on PRs and the ability to preview the application in a live environment before merging with GitHub checks that implement E2E tests based on the pre-production environment (that all fail currently).
EDIT: I just found the chapter in the docs, where is says that bring your own function apps are "Only supported in the Static Web Apps production environment.". Are there any plans to fix that, as pre-production environments are somewhat useless currently with bring your own functions?