Comments (16)
Yep! I was right. That package reference shouldn't be there. It's provided by the shared framework. I'll re-open and remove it now.
Yes, you should be using it ... but NOT directly like this. I think Jeremy just made a slight mistake including it. It comes in via the shared framework. The app doesn't need a package reference for it.
from blazor-samples.
Fab thanks! :)
from blazor-samples.
That's what I had locally. Not sure why a delta existed between the repo and local app. VS these days makes namespace changes to files all by itself. I'll blame VS here for making my app correct! 😆
Thanks again for the issue. As you can see, we're still working a lot of 🪲 out of the docs and samples for 8.0. That process will continue for months.
from blazor-samples.
No, that's the latest version of that package. That one doesn't version with a number that matches the shared framework.
https://www.nuget.org/packages/Microsoft.AspNetCore.Identity
from blazor-samples.
Sorry I don't understand - the latest version is deprecated as per the link you've provided?
from blazor-samples.
It's a false warning ... one doesn't typically use the package directly like this. Normally, this is used by the metapackage. I think a remark about this in the article makes sense. I'll open an issue and address it next week. I'll ping u on the issue in a moment.
from blazor-samples.
... and I'll check further on this. I actually thought that if the shared framework has the package reference that it wouldn't need to be in the app's project file. I'll investigate and get back to you shortly.
from blazor-samples.
Thanks - It would be good to have some clarity. I've used it in a .NET 7 project already directly and I've seen posts across the web where people are unsure about what they should be using in place of Microsoft.AspNetCore.Identity - or if it is good to continue using it.
from blazor-samples.
Ok ... we're good now ... fixed on commit ...
Thanks for opening this issue!
from blazor-samples.
Thanks - I think if you just remove the package you'll have the following error:
Error CS0246 The type or namespace name 'ClaimsPrincipal' could not be found (are you missing a using directive or an assembly reference?) Program.cs
potentially this can be resolved by referencing System.Security.Claims
from blazor-samples.
I didn't that error here. Where is that being thrown? ... which project? ... and is that for custom code. We won't cover anything beyond the base use case; however, this sample will be expanded later to include a role claims endpoint in the backend so that the frontend can implement user roles.
from blazor-samples.
That's simply downloading your repository. No code changed. (I pulled the project into a VS solution but that's it).
After referencing the System.Security.Claims in Program.cs the project compiles fine
from blazor-samples.
And sorry it's in the 8.0 Backend project as per my original screenshot.
from blazor-samples.
Ah! I see it had the MVC package there for it. I changed it to your suggestion of System.Security.Claims
on ...
from blazor-samples.
This is all good news as far as I'm concerned. Back in April I was working on a project to implement something like what you now have built in and much hair was lost figuring it out! 😆
What I've seen so far looks great! :)
from blazor-samples.
I agree. We needed this for years ... and was asked for it quite a bit. We do need the roles piece for sure. However ... even in this form ... it shoudn't be too difficult for folks to roll their own controller into the backend and send back role claims for use by the frontend.
We're going to leave the extra coverage on the other scenarios/endpoints (e.g., 2FA) over in the main doc set. That coverage is being worked on now at ...
What I don't know is if they'll relent and provide a fully working implementation for token auth. Right now, they just guide toward it with notes and a partial implementation. I'm telling them on ...
... that I think it should be fully worked out and presented.
from blazor-samples.
Related Issues (20)
- Remove NavMenu.razor
- BlazorWebAssemblyStandaloneWithIdentity - AddRoles HOT 3
- Drop shared layout file
- BlazorWebAssemblyStandaloneWithIdentity sample with Bearer Token instead cookie HOT 4
- Style.css is not presented in blazor samples 8 for BlazorSignalRApp HOT 4
- BlazorWebAssemblyStandaloneWithIdentity uses cookie auth but no antiforgerytoken HOT 1
- Logout not Working (BlazorWebAssemblyStandaloneWithIdentity) HOT 9
- Cannot read roles from the claims HOT 1
- Oidc sample double renders full page HOT 1
- Blazor WASM + Dotnet API example HOT 1
- JavaScript interop HOT 2
- Update JS interop example code
- Templates link update to http://useiconic.com
- Blazor database example's list page is reloaded when coming back from a details page HOT 2
- Change button theme to completely unstyle it
- Change hardcoded CSS link to assembly name in _Host.cshtml HOT 3
- we can't upload the directory(folder) in InputFile component HOT 1
- The rendered HTML markup for the example is inconsistent with the source code
- FileUpload4.razor is missing according to documentation page HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazor-samples.