Comments (6)
Glad to help, but also TodoApi can become the blueprint for what I'm working on.
@davidfowl Any comments you can provide on this issue would be appreciated: dotnet/aspnetcore#52800
Just trying to make sure TodoApi is not outside of the ASP.NET Core Identity supported scenarios.
from todoapi.
@davidfowl I'm also interested in this. How would TodoApi evolve to switch the new Blazor app template with WASM interactivity (or even better, just SSR) and then use the new Identity endpoints in the backend API?
from todoapi.
https://github.com/davidfowl/TodoApi/tree/davidfowl/net8 still needs to update to RTM
from todoapi.
I've seen that branch, however the roles/claims is the actual part that I'm not confortable with.
I also opened an issue on the aspnetcore repo related to this (to see if someone helps on creating a sample on the docs or something).
What I've seen so far is that we need to create an additional endpoint on the api that takes the claims principal (logged user) and return a json representation of the roles/claims.
And, with this, have on the blazor project a authentication state provider that consumes that endpoint after the cookie creation to get the roles/claims.
This feels like a hack 😆 because the identity endpoints generates the token or cookie with that info inside.
This is the PR
In that example is a standalone WASM but this would be added on a "server" state provider to get the current authenticated user roles and then use the PersistentComponentState to share it to the the client (similar to the new template with identity).
Do you think this is the right approach?
from todoapi.
@davidfowl Thank you, this is awesome!
Here's a PR to update everything to .NET 8 RTM: #90
Verified it in my box, and all tests are passing.
from todoapi.
You are awesome!
from todoapi.
Related Issues (20)
- Open Telemetry Exporters HOT 3
- Question : What does the todo.http file do? HOT 2
- Deploy to *somewhere* HOT 6
- Docker Integration
- Client-side password validation is inaccurate HOT 4
- dotnet ef command fails HOT 1
- Cannot log in: "Signing key is not specified" HOT 2
- What is the advantage of using Otel instead of serilog for logging? HOT 8
- Question about Seq / ES + Kib HOT 4
- Serilog is better when the settings are via config sources HOT 10
- Allow "discussions" for this repo? HOT 1
- SameSite.Strict auth cookie
- GRPC Support
- The first run of the application: errors HOT 2
- _Host in the Server project HOT 5
- Upgrade from AddMicrosoftAccount to AddMicrosoftIdentityWebApp
- net8 branch doesn't build HOT 6
- Running the app as multiple startup projects in Visual Studio doesn't work
- Shared Project DTO
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 todoapi.