-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor WASM "Error trying to log you in" on Net 5 and 6 in VS 2022 #39201
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
Comments
Could you include the logs from the browser Developer console? |
Hi @dochoss. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
HAR file from dev console attached. Let me know what else I can provide. |
@dochoss sorry I didn't mean the network log. The developer console will typically include logs or exception stack traces, if any. Is it entirely empty? |
Sorry, no, there is no other information in the console. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
@mkArtakMSFT Thanks for letting me know. I really want to love Blazor, as I'm mostly a C# dev, I just keep running into frustrating issues like this when spinning up new projects. I built my first Blazor app on version 0.1, so I've seen it mature and I'm still very excited about its future! I'll keep following and trying whenever new projects crop up. Thanks to you and the team for your work! |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Is there an existing issue for this?
Describe the bug
When creating a new Blazor WASM project with authentication set to "Microsoft Identity Platform", with HTTPS checked, and with and without PWA checked (both tested), login fails with "There was an error trying to log you in: '' ". I've seen the other errors posted that include a "toLowerCase" related error, but this error doesn't show that. I'm getting a 400 - Bad Request error when calling the token endpoint during the login process (
https://login.microsoftonline.com/<my tenant id>/oauth2/v2.0/token
).The only change I made to the default project file is to add Azure AD info to the appsettings.json file in wwwroot. I've tried with .Net 5 and 6 in the latest versions, and made sure to update VS 2022 to the latest version. I've tried cleaning out the bin and obj folders multiple times, and have tried multiple browsers (Edge, Chrome, and Brave). I saw on other posts the workaround of excluding the auth package from trimming (as here: #37206 (comment)) but that didn't have any effect.
In my local network, I have a Pi-Hole for ad filtering, but
login.microsoftonline.com
is whitelisted, and I've tried logging in to the Blazor app with Pi-Hole totally disabled and that has the same result as above. Other than Pi-Hole, I have nothing between my machine and the internet.Repro repo is here: https://github.com/dochoss/blazor-wasm-login-error.git
Expected Behavior
User logs in successfully
Steps To Reproduce
appsettings.json
Exceptions (if any)
I see this in the Output window in VS 2022:
The program '[35560] dotnet.exe' has exited with code 4294967295 (0xffffffff).
.NET Version
6.0.101
Anything else?
VS Community 2022 v17.0.4
Results of
dotnet --info
:The text was updated successfully, but these errors were encountered: