New standalone Blazor WASM project with authentication missing authentication support

I created a new solution in Rider by selecting the "Web" then "Blazor WebAssembly Standalone App" and then checked the "Include sample pages" and selected "Individual authentication" for authentication. The generated project has 3 pages (Counter, Home and Weather).

On the other hand, a project created in Visual Studio 2022 by selecting "Blazor WebAssembly Standalone App" template and then authentication type "Individual Accounts" generates a project with 4 pages, the additional page is Authentication.

Also the project generated by Visual Studio has additional package in the project file, which is not present in the project generated by Rider:
```
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.8" />
```

I think Rider may be using some other template? Otherwise, how to generate a Blazor WASM project with the same authentication support as in Visual Studio?

0
2 comments

I also had this problem. I would recommend generating a project using the .Net CLI and then open up the project in Rider. It will have all the files you need.

 

0

There is an issue for this problem. 

RIDER-115341 Blazor Template doesn't create Auth/Users when selecting "Auto" Interactive render

Before the fixes are applied in Rider, please consider using the dotnet CLI like below to generate a new project.

dotnet new blazor -au Individual -int Auto

0

Please sign in to leave a comment.