Тёмный

ASP.NET Identity with Identity Server 4 | Tutorial Part 1 

Code with Julian
Подписаться 9 тыс.
Просмотров 69 тыс.
50% 1

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 93   
@identityserver
@identityserver 2 года назад
Great Tutorial! Thank you for crediting Kevin in the description too! To answer some of the comments, Yes IdentityServer4 will no longer be supported by November 2022. However if you are a small organisation earning under $1 million USD or a single person, Duende IdentityServer is still free. There is also a collection of User & Client management tools to help you with configuring your IdentityServer solution. Duende's inbuilt UI, Skoruba, TheldServer and we also offer a free version of our AdminUI component. - Kieran, Rock Solid Knowledge
@CodeWithJulian
@CodeWithJulian 2 года назад
Thanks for the feedback! Also the info you provided is much appreciated!
@ahmedifhaam7266
@ahmedifhaam7266 Год назад
Just finished the tutorial, and oh man, paired with chatGPT following this through clearing questions about everything you were doing, including dependency injection, basic identity, even OOP concepts I was a bit confused with it took me 7 hours to fully complete this and learnt a lot, I am just a bit lost at the very end, why did we add that IS4 quickstart UI thing, I thought we were going to do a blazor server client in the part 2 anyway, thank you so much, about to watch part 2 now, very excited, maybe i'll find out why there. Thanks again. And yes I know IS4 is not supported anymore, but since main concepts seems to be used, this tutorial is anyway quite helpful, for plenty of reasons, highly recommended for new devs like me.
@bolafahmi
@bolafahmi Год назад
I love how the tutorial is structured, the video description is REALLY helpful and saves A LOT of time, and the source code (and branches) are also so well made. Thanks!!
@CodeWithJulian
@CodeWithJulian Год назад
Thanks for the feedback, much appreciated 😊
@playerzzt1262
@playerzzt1262 Год назад
finally a professional tutorial and not like these tutorials...normally you don't do it but for simplicity...thanks 🙏
@TheQuranVerses1
@TheQuranVerses1 Год назад
The best tutorial I have ever watched, Thank you so much !
@talkathiriify
@talkathiriify 2 года назад
Excellent tutorials, very clear and smooth explanation I like the way you teach materials. Thank you very much for your efforts and time.
@Emil-ej5of
@Emil-ej5of Год назад
This is such a lifesaving tutorial. Thanks! Almost all of this applies to the new duende ids that ive setup side by side with this tutorial. Thanks a million!
@CodeWithJulian
@CodeWithJulian Год назад
Great to know, thanks for letting us know!
@GuildOfCalamity
@GuildOfCalamity 2 года назад
This is slowly becoming my favorite channel on RU-vid. There's no way I would've figured all this out without Julian's help.
@CodeWithJulian
@CodeWithJulian 2 года назад
Thank you for your kind words! I'm glad to know this channel is useful to you! Appreciate your feedback!
@ahmedifhaam7266
@ahmedifhaam7266 Год назад
@@CodeWithJulian on another note, I think it'd be helpful to share with us, how you pieced together all the good information jammed into this tutorial, as in, what caused you to research what topics and from where, those stories help us sometimes, appreciate it, great tutorial
@CodeWithJulian
@CodeWithJulian Год назад
Thanks! I'll take that into consideration, maybe in a blog post.
@austinmrakpor4863
@austinmrakpor4863 2 года назад
You just made learning Identity Server4 very easy, thanks so much.
@CodeWithJulian
@CodeWithJulian 2 года назад
Glad to know that Austin, nice one!
@yuriiarestov3470
@yuriiarestov3470 Год назад
Nice tutorial. But will be even more helpful if you will provide some sort of connection diagram how the applications will work and how http request will travel. I'm trying to get into Identity Server 4, but without seeing the end result is difficult to understand what actually I'm trying to achive without going through the whole tutorial. The turorial is structured well, but in few spots more details will be very helpful. In example, for a person who already worked with Entity Framework it was easy to understand why we need all nuget packages, but extra word for each Identity Server package would help a lot to undestand why you added them into the project. Anyway, one of the clearest Identity Server tutorials.
@margoumix
@margoumix Год назад
Good work! just at 54:14 be sure to add those couple of lines before executing dotnet run builder.Services.AddAuthorization(); builder.Services.AddControllers(); otherwise you will have a build error alos ther is not need to add --project Server
@Apheliont
@Apheliont 2 года назад
Very concise and to the point. Definitely like it!
@cylemons8099
@cylemons8099 11 месяцев назад
Maybe this comment will help future users. I was using .NET 7 on Linux. I followed the tutorial all the way until 53:57 and everything worked fine until there. But when running the program I got an exception at EnsureSeedData(Context) in the parts where you call .ToEntity(). The exception was something like this: ArgumentException: GenericArguments[0], 'System.Char', on 'T MaxFloat[T](System.Collections.Generic.IEnumerable`1[T])' violates the constraint of type 'T'. What solved the problem for me was replacing IdentityServer4 with Duende.IdentityServer. and Remigrate the Database. Now that well known pages works fine.
@treasure6759
@treasure6759 10 месяцев назад
hi i have the same probleme but i'm not working on linux :/ i tried to resolve it by replacing identity4 with duende.Identity but it's not working
@cylemons8099
@cylemons8099 10 месяцев назад
@@treasure6759 did you replace ALL the occurences of IdentityServer4 with duende and install the equivalent nuget packages?
@hendrihooh300
@hendrihooh300 10 месяцев назад
I'm experiencing the same thing on Windows using .Net 8. Thanks for the help. 🙂
@franciscc888
@franciscc888 2 месяца назад
as @cyclemons mentioned: 1. remove this packages 2. install these two: (check newer versions though) 3. fix all the error messages due package references in the Program.cs and SeedClass and others if needed. 4. Delete migrations and also the DB 5. Re do migrations and update db 6. Run the 'run Server/bin/Debug/net8.0/Server /seed --project Server' command
@isachells9859
@isachells9859 2 года назад
Heyia. Just what i was looking for, good stuff. thanks a lot!
@ChrisHolcomb21
@ChrisHolcomb21 2 года назад
Great video on using AspNetIdentity with IdentityServer 4 in DotNet Core 6. Explains very well on what pieces are needed and how they fit together.
@ChrisHolcomb21
@ChrisHolcomb21 2 года назад
This video should show you need to add "builder.Services.AddControllersWithViews()" before the builder.Build() in the program.cs file in order for this part of the code to work.
@CodeWithJulian
@CodeWithJulian 2 года назад
Thannks for the feedback Chris. Yes, that's covered in part 2 of this tutorial 👉 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-rNqgxAqGZJ8.html
@LineshLanjewar
@LineshLanjewar Год назад
When I run the add migration command, I get an error Add-Migration InitialIdentityServerMigration -c PersistedGrantDbContext Multiple startup projects set. Using project 'Server' as the startup project. Build started... Build succeeded. No DbContext named 'PersistedGrantDbContext' was found.
@DotnetistEnterprise
@DotnetistEnterprise 2 года назад
haven't watched yet but I already subscribe. wow.
@turkerkaraoglu1675
@turkerkaraoglu1675 Год назад
at 10:47, why you did not use IdentityDbContext instead of dbcontext? If I asked too early, forgive me.Edit 1: I got my answer at 40:30.
@ElCidPhysics90
@ElCidPhysics90 Год назад
Really interesting, but IdentityServer4 doesn't appear to be available any longer???
@attilaguba856
@attilaguba856 2 года назад
Hi!great tutorial! Are you not planning to do the same thing with asp before mvc ? And can you make a forgot and reset password implementation as well?
@hosseintasm4222
@hosseintasm4222 2 года назад
Very good and thank you. Just why did you disable subtitles?
@CodeWithJulian
@CodeWithJulian 2 года назад
I haven't, but RU-vid might have for some reason.
@mrohailiqbal
@mrohailiqbal 2 года назад
Thanks a lot man. You are the hero. Keep it up
@CostaSparrow
@CostaSparrow 2 года назад
Hello, thanks for the tutorial. Why did you choose Blazor Server over Blazor WASM? Are there any differences if I want to impelent the same architecture but with Blazor WASM as a client?
@ce377
@ce377 2 года назад
Regarding the concept behind making a model class of the CoffeeShop entity (API/Models/CoffeeShopModel for DataAccess/Models/CoffeeShop) can you explain or provide a related link on why/how this is best practice? I think I get it but seems pretty redundant when you're dealing with possibly hundreds (or more) database entities.
@mdzakariamasud8326
@mdzakariamasud8326 Год назад
Can you please make tutorial for openiddict?
@ngoctule3357
@ngoctule3357 2 года назад
Great video for the tutorial IdentityServer4. Can you tell me the name of this project structure?
@glenhong8028
@glenhong8028 2 года назад
Hi...thanks for posting this. Exactly what I need. Just following along but the AddCoffeeShops is missing out of your Github? Any change of dropping that in?
@CodeWithJulian
@CodeWithJulian 2 года назад
Hi Glen, everything from the tutorial should be in the repo. Please check out the different branches (1&2 are for this tutorial). If you still can't find it, please let me know the timestamp in the video where that line is missing. Hope this helps!
@soheilrad3451
@soheilrad3451 Год назад
Great Tutorial and useful
@CodeWithJulian
@CodeWithJulian Год назад
Thanks, glad it's been useful!
@ahmedifhaam7266
@ahmedifhaam7266 Год назад
When I ran the migration commands at first, there was also a designer.cs file, it goes into more detail on how to query db to create tables and what not, but why did I get this file generated and you did not.
@Pblw
@Pblw 2 года назад
Thank you for the video! "Quickstart UI" does not contain new user registration and user management interfaces. How to "correctly" add this functionality yourself? Maybe there are some articles or videos.
@CodeWithJulian
@CodeWithJulian 2 года назад
Hi! The registration is missing deliberately from the QuickStart code. The best thing you could do in this situation is to generate and handle it with ASP.NET Core Identity. Check this out, hope it helps 👉 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5UfJeDcoC1k.html
@EminoMeneko
@EminoMeneko Год назад
Identity Server 4 is no more developed as of December 2022. Are there other alternatives (ideally usable for free or low cost for production) outside of Duende Identity Server ?
@stanleyakachukwu7881
@stanleyakachukwu7881 2 года назад
Nice tutorial! Thanks!
@CodeWithJulian
@CodeWithJulian 2 года назад
You're welcome!
@srkbhayo
@srkbhayo 2 года назад
right now IdentityServer 6 version has come out, now known as Duence Identity. Can you please a tutorial to add that in .net 6 ?
@CodeWithJulian
@CodeWithJulian 2 года назад
Yes, I'll make a tutorial on this version too at some point. Thanks for your suggestion!
@mohammadjavadtavakoli7977
@mohammadjavadtavakoli7977 2 года назад
thanks for the tutorial 👍👍
@CodeWithJulian
@CodeWithJulian 2 года назад
Glad it was helpful!
@jhonnidarshan3094
@jhonnidarshan3094 Год назад
where can I find the database querry?
@kalaiArasu-j5i
@kalaiArasu-j5i Год назад
kindly provide authentication using openiddict also, it will be more helpful.
@abdulrafeyartist5025
@abdulrafeyartist5025 2 года назад
Thankyou so much
@CodeWithJulian
@CodeWithJulian 2 года назад
You're welcome!
@rezamohamadzadeh7420
@rezamohamadzadeh7420 2 года назад
Great... thanks.
@honfey
@honfey 2 года назад
Hi, Julian, found that your video has lots of 's' sounds at the end of the words, and hearing that makes the ears painful. I am not sure whether this is the recording issue...
@CodeWithJulian
@CodeWithJulian 2 года назад
Hm interesting.. It could be the microphone being too sensitive, or even my diction. I'll see if I can reduce the amplitude in editing. Thanks for letting me know!
@malathip4043
@malathip4043 2 года назад
i want to use auth plugin , vue frontend, .net core , mssql for backend, Can you suggest please.
@CodeWithJulian
@CodeWithJulian 2 года назад
What is it that you would like a suggestion for?
@ademvelikesim1578
@ademvelikesim1578 2 года назад
Thanks a lot man. Where is the Server Solution codes?
@CodeWithJulian
@CodeWithJulian 2 года назад
Hi Adem, thanks for the feedback! Here's the source code 👉 github.com/iulianoana/CoffeeShopper-IS4. Don't forget to check out all the branches to get the full picture (1-4).
@GabeHandle
@GabeHandle 2 года назад
Has classic .NET Identity been abandoned in .NET 6? Is there any reason it could not be used with Blazor?
@GabeHandle
@GabeHandle 2 года назад
@@CodeWithJulian Thanks for the response. Just to clarify why I'm wondering, it's because of the rebranding of Identity Server to Duende IdentityServer and the liscense costs coming with it. I work for a big company with a small dev team and I'm sure they'll want to try and stay on classic Identity.
@GabeHandle
@GabeHandle 2 года назад
@@CodeWithJulian I'd be interested in the OpenIdDict tutorial. You have my vote. Keep up the good work!
@treasure6759
@treasure6759 10 месяцев назад
when i execute dotnet run Server/bin/Debug/net8.0/Server/seed --project Server in package manager console acces of scopped_supported is offline and claims_supported are empty i don't know where is the probleme i follow the tutorial step by step :/
@artemkobzar
@artemkobzar 7 месяцев назад
Have you resolve problem?
@mostafat5568
@mostafat5568 2 года назад
Great Tutorial, can you tell me how to add roles into access token. I want to add authorize attribute with role or policy in api
@CodeWithJulian
@CodeWithJulian 2 года назад
Thanks for your feedback! I believe this is what you're looking for 👉 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kM1fPt1BcLc.html
@manojsaro5609
@manojsaro5609 2 года назад
Hi , I'm a beginner, please help to solve my doubt that is "In 55:46 how to add Quickstart files into the project"
@CodeWithJulian
@CodeWithJulian 2 года назад
Hi, navigate to the QuickStart repo (link in the description). Clone the code. Copy over only the following folders: Quickstart, Views and wwwroot into your Server project (where IdentityServer is installed and configured). Hope this helps
@manojsaro5609
@manojsaro5609 2 года назад
TQ sir, and now I have a new problem "InvalidOperationException: Cannot provide a value for property 'HttpClient' on type Client.pages.Coffeeshop'. There is no registered service of type 'System.Net.Http.HttpClient." how to solve this in part 3 sir
@CodeWithJulian
@CodeWithJulian 2 года назад
@Manoj Saro You've probably done the second part of this tutorial too, nice one! This issue is caused by a missing a line in your Program.cs in your Client project. Add this after _builder.Services.AddServer SideBlazor();_ -> *_builder.Services.AddHttpClient();_* This registers HttpClient in your project.
@manojsaro5609
@manojsaro5609 2 года назад
Thanks a lot sir , It's working
@ДениМарко
@ДениМарко Год назад
I don't know why but migration failed.
@chessgamesonline5867
@chessgamesonline5867 2 года назад
confusing, where is roles? and how u control roles per user?
@CodeWithJulian
@CodeWithJulian 2 года назад
I've not covered roles and permissions as part of this tutorial series. However, you could check out this video 👉 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-kM1fPt1BcLc.html
@SponsorElite
@SponsorElite 2 года назад
Why Not identity Server 6? I mean 1mio. $ have Not so many companys
@CodeWithJulian
@CodeWithJulian 2 года назад
Good observation, IdentityServer4 was requested by the community at the time. Hope this helps!
@gomriria2197
@gomriria2197 2 года назад
Identity server 4 is not maintained any more go for ids 5 or 6
@CodeWithJulian
@CodeWithJulian 2 года назад
Good observation, but it will be maintained until November 2022.
@faustogallotti2992
@faustogallotti2992 2 года назад
Hi Julian, congratulation for the tutorial and a big Thank you, I started to prototype a my own Identity Server project following your project, I found only an issue at the end, Server Project --> Program.cs file, when I try to run the projects I get 2 error when I try to use the following code app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapDefaultControllerRoute(); }); for both lines I get this error description : System.InvalidOperationException: 'Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAuthorization' in the application startup code.' I need to add the follow instruction before the app is generated, builder.Services.AddMvc(); can you have a look if is normal please?
@CodeWithJulian
@CodeWithJulian 2 года назад
Hi there, thanks for your feedback, appreciate it. This video is part one of 2 tutorials. Please check out the second prt here 👉 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-rNqgxAqGZJ8.html Also please check out the GitHub repo, it's got the complete project (branch part4). Compare line-by-line, as that project is fully working! Hope this helps!
@faustogallotti2992
@faustogallotti2992 2 года назад
@@CodeWithJulian Hi Julian you right, in the second part of the tutorial you commented out the 2 lines of code and applied the fix later on, nice one
@doanmoon191
@doanmoon191 2 года назад
When run "Add-Migration InitalIdentityServerMigration -c PersistedGrantDbContect" => I got an error "No DbContext named 'PersistedGrantDbContect' was found.". Usually, we have to create DbContext first, isn't it? Why doesn't the demo do that? Where am I wrong? This is my version: net6.0 enable enable all runtime; build; native; contentfiles; analyzers; buildtransitive
@CodeWithJulian
@CodeWithJulian 2 года назад
I see the word context is mispelled in your snippet.
@doanmoon191
@doanmoon191 2 года назад
@@CodeWithJulian Thank you. I see "Contect" mispelled ^.^
@SandstormNick_1
@SandstormNick_1 2 года назад
At 54:35 when Julian navigates to localhost:5443/.well-known/openid-configuration the returned JSON is beautified. Does anyone know how to do this? Mine is just one long string broken over several lines
@CodeWithJulian
@CodeWithJulian 2 года назад
Hey, it's a Chrime extension called JSON Formatter
Далее
Million jamoasi - Amerikaga sayohat
12:37
Просмотров 220 тыс.
САМАЯ ТУПАЯ СМЕРТЬ / ЧЕРНЕЦ
1:04:43
Do you need IdentityServer?
10:39
Просмотров 28 тыс.
Coding Short: Using Bearer Tokens in .NET 8 Identity
14:31
Creating your First IdentityServer4 Solution
30:23
Просмотров 85 тыс.
Million jamoasi - Amerikaga sayohat
12:37
Просмотров 220 тыс.