Skip to content
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

Issues with authorization on Blazor WASM #54611

Closed
1 task done
jahnotto opened this issue Mar 19, 2024 · 2 comments
Closed
1 task done

Issues with authorization on Blazor WASM #54611

jahnotto opened this issue Mar 19, 2024 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@jahnotto
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am having an issue with Blazor WASM authentication which is reproduced here:

https://github.com/jahnotto/authfrust

Note that there is an @attribute [Authorize] at the top of the Home.razor page. Other than that, this is based on the Blazor wasm tempalte in Visual Studio 2023.

When running locally, it works fine. However, after publishing it to an Azure App server, it doesn't work:

Chrome on Windows: if I open a new browser instance (after quitting the browser completetely), the page seems to forward to the usual "processing login", before it ends up with an error message saying "There was an error trying to log you in: '"undefined" is not valid JSON'". If I re-enter the URL or open another tab, it works fine. This happens regardless on whether I have been logged in previously.

Edge on Android tablet or Edge on iPad: In addition to the above behavor; if I remove the [Authorize] attribute on the Home page and click the Login button, a new tab is opened. The tab says "Completing login" and stays there forever.

Any clues?

Expected Behavior

The "Home" page should be shown after login with a newly opened browser, or immediately if user is already logged in.

Steps To Reproduce

Register an App ID and use that in appsettings.json in the mentioned repo
Publish the repo to an Azure app service

Exceptions (if any)

No response

.NET Version

8.0

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Mar 19, 2024
@MackinnonBuck
Copy link
Member

Thanks for reaching out. We believe this may be caused by #49956, which will be fixed in an upcoming servicing release. Closing this out as a duplicate.

@MackinnonBuck MackinnonBuck added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Mar 21, 2024
Copy link
Contributor

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

2 participants