codewithiulian / coffeeshopper-is4 Goto Github PK
View Code? Open in Web Editor NEWAn project integrating ASP.NET Identity with IdentityServer 4
An project integrating ASP.NET Identity with IdentityServer 4
Hey there - I don't know what I may have done but around the 30 min mark of Part 2 (https://www.youtube.com/watch?v=rNqgxAqGZJ8) after you show how to get and use the Token I am getting a 500 Internal Server Error instead of the 200 OK result. I realize it's a long shot to help since you don't have my code but any ideas off top of your head why this may happen? FWIW I did get the 401 Unauthorized message in the earlier segment (as intended) so it was working fine up till then.
Hi again,
Is the correct scope defined in the CLIENT/appsettings.json in the GitHub version? It is showing a scope of "WeatherApi.Read" (also showing in video). The scopes we set in the SERVER/Config.cs file is "CoffeeAPI.read", "CoffeeAPI.write".
And if the scope is wrong, why are we able to log in and see the shops? Because we are not authorizing by scope?
Thanks for the clarifications.
dotnet ef migrations InitialCreate
The output is:
Build started...
Build succeeded.
Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
I run the application and get prompted by ID4 for credentials. I look at the shops. Then log out. Then click the link to log in again. However, I am not shown the login page. It seems I am auto-logged in maybe due to a valid cookie session? How do we force the login to a prompt?
Say I have multiple accounts and log out of one to log back in to the other.
Fantastic videos. I had an issue with my code I wrote from your videos. So I downloaded the GitHub version. You might consider adding this to a DEV_README.txt file on your solution root to help those quickly get the code running:
References: https://www.youtube.com/watch?v=SXJ377G5bOg&list=PL1EYnCfHLswwOz77bgfFbFqRnY3bXYHp3&index=1
https://www.youtube.com/watch?v=rNqgxAqGZJ8&list=PL1EYnCfHLswwOz77bgfFbFqRnY3bXYHp3&index=2
https://github.com/iulianoana/CoffeeShopper-IS4/tree/Part4-Secure_the_Client_app
https://codewithjulian.com/
1) To create a new database before first use:
- Create a database called CoffeeShopperDb
- Edit API/appsettings.json and set the DB connection string
- Edit SERVER/appsettings.json and set the DB connection string
- In Package Manager Console:
- Set API as startup project
- Project: DataAccess PM> Update-Database
- Set Server as startup project
- Project: Server PM> Update-Database -Context PersistedGrantDbContext
- Project: Server PM> Update-Database -Context ConfigurationDbContext
- Project: Server PM> Update-Database -Context AspNetIdentityDbContext
- Seed the database with some initial clients and users
- Project: Server PM> dotnet run Server/bin/Debug/net6.0/Server /seed --project Server
- Project: Server PM> Click the red stop button
2) After updates to database, set multiple projects to start.
- API, Server, Client, DataAccess
3) Run the code
Thanks for the excellent tutorial.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.