-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Blazor VS template fails on ARC for App Services as the redirect URI is http not https #1792
Comments
@jmprieur : I did not, but looking at it now. I was not using containers, but -- is ARC for App Services creating a container automagically in ARC when publishing directly from Visual Studio? I have no idea. If I can get this working with these instructions, I think I'm going to file a ticket with them, that they are not consistent, i.e. apps should deploy identical to ARC as they do to the app service, and this deploys to a Linux App Service with no issues. If I can't get it to work, then I don't really know. Trying now.... |
@jmprieur : That has no effect, which makes sense since the write up seems to imply, "fixed in .net Core 3.0". The only oddity I see, is that when I create the publishing profile in Visual Studio, for my linux app service it says that the site is "https://xxx", which for the ARC linux app service it says that the site is "http://xxx", even though the app service is set to https only. I can manually change the xml of the publishing profile, but that has no effect. So....I'm not sure. Do you think this bug would be better to be resubmitted to https://github.com/dotnet/aspnetcore? |
Thanks for investigating, @snapfisher |
Try setting the environment variable |
That has no effect. Just so you can double check me....
|
I also tried it only setting the environment variable, but making no other changes. That had no effect, either. |
That variable would need to get set at the start of Program.Main before creating the host. Try the troubleshooting steps at the bottom: |
When I do this -- and I put the env variable set as the very first thing in main, there is no change. I did get logging working. I never see an X-Forwarded-Proto header, and the X-Original-Proto header is always "http". I do see the X-Forwarded-For header, but not the proto header. If I understood the documentation correctly, I should see an X-Forwarded-Proto header that says "https", which then gets copied to the X-Original-Proto header, yes? |
Interesting, it sounds like the middleware is running and getting you those x-original-* headers. Disable the middleware and confirm you get |
I can't seem to get the x-forward-proto header to display, so I went back to the actual linux app service, which runs correctly and don't see it there either. I don't know why I can't see it, but the second one is working, with the middleware off, as it was originally. The really interesting thing is that it also has X-Original-Proto: http. So, I'm back to...it's just broke, as from the logs there is no difference between the two. |
Could it be looking for a different environment variable? |
Microsoft.Identity.Web Library
Microsoft.Identity.Web
Microsoft.Identity.Web version
1.25.1
Web app
Sign-in users
Web API
Not Applicable
Token cache serialization
In-memory caches
Description
I have a Blazor server app, created with the Visual Studio template (recent -- about 30 - 45 days ago), and it authenticates to AAD.
This works fine when deployed to a Windows Azure App Service, .Net 6
This works fine when deployed to a Linux Azure App Service, .Net 6
Both of the above with identical code.
When deploying to an app service created on the Azure Arc preview, the redirect URI is http not https, so login fails.
Reproduction steps
I have been changing the redirect URI in the azure portal for the correct domain name. I tried modifying the manifest to force the configured URIs to http, but I received a security error, so that is no longer allowed.
Error message
AADSTS50011: The redirect URI 'http://xxx.eastus.k4apps.io/signin-oidc' specified in the request does not match the redirect URIs configured for the application
Id Web logs
No response
Relevant code snippets
Regression
No response
Expected behavior
I should be able to log in with the same code as I do for the actual app service (windows and linux).
The text was updated successfully, but these errors were encountered: