Comments (2)
Hi @inferiore,
for this kind of issues, please refer to the official IdentityServer4 & ASP.NET Core docs.
However:
- To register a new client, just add it to the list:
return new List<Client>
{
new Client
{
ClientId = "AngularSPA",
...
},
new Client
{
ClientId = "AngularSPA2",
...
}
};
-
To save on db, you have to change the InMemory (https://github.com/robisim74/AngularSPAWebAPI/blob/master/Startup.cs#L82-L84) to a Store:https://identityserver4.readthedocs.io/en/release/quickstarts/8_entity_framework.html
-
To get the current user in the controller you have multiple ways, like https://stackoverflow.com/questions/40135181/how-do-i-access-my-current-user-using-identityserver4 or you can pass the
username
to it
On the first point, I have to discourage you from using the ROPC grant, which should only be used in legacy or secure applications, for example with the client hosted on the same server as in this project.
With multiple clients you should use an implicit flow. This is an excellent project: https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow
Greetings
from angularspawebapi.
Work fine!
from angularspawebapi.
Related Issues (20)
- Question About Scaling Potential HOT 5
- Question: How to Redirect to IdentityServer instead of using password flow? HOT 2
- Is this the right way to do it? HOT 3
- Session time question HOT 2
- Fix for AOT compilation and Lazy-Loaded modules HOT 5
- Cannot run angular app HOT 1
- Cannot get userinfo from userinfo endpoint HOT 1
- Question about the AuthGard HOT 8
- HttpClient HOT 1
- ASP.NET Core 2 HOT 5
- question about role claims HOT 3
- Set up base urls of configurations HOT 1
- Using SqlServer Problem with "id" column HOT 9
- Unable to use migrations HOT 1
- Logout doesn't really logging out! HOT 1
- MSSQL dotnet ef database update problem HOT 2
- Can't deploy your project HOT 2
- Requires editing appsettings.json HOT 1
- error.json() is not a function when username/password incorrect HOT 1
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 angularspawebapi.