Thanks to these videos I finally ACTUALLY understand how auth flow is supposed to work. About 3 years ago I thought it was as simple as sending post requests, hashing passwords, then sending back a session cookie (all done manually in poorly written PHP). I now understand when and why you should use certain levels of auth management and how to properly implement it (or when you shouldn't).
@AhmedMohammed232 жыл бұрын
is he dancing i feel like he is dancing 😅😅
@RawCoding2 жыл бұрын
it's hard not to dance when I stand
@AhmedMohammed232 жыл бұрын
@@RawCoding i feel you most people tell me to stop moving or set down when i'm talking to them because i keep moving in place
@coleworld30612 жыл бұрын
Thank you … not introducing unnecessary complexity into the stack is a skill I’m trying to improve. All the tools … All the shiny things
@RawCoding2 жыл бұрын
Not all that shines is gold...
@fieryscorpion2 жыл бұрын
This is great video. I needed some guidance in its use cases. I'll watch it again to fully absorb it. Since I'm a visual person, can you please create videos like this using some diagrams? Diagrams would be immensely helpful in understanding topics like this. Thank you!
@iri5621 Жыл бұрын
Jeez, finally a simple explanation of this holly mess of auth options! You helped me a lot to make make an informed decision on what I actually need for my app
@RawCoding Жыл бұрын
Glad you liked it, if you want more auth videos check out my recent playlist
@shucaybmili2 жыл бұрын
thanks, you've just talked about my frustrations, thanks for clarifying it
@cicpolk Жыл бұрын
Really useful explanation Anton. Thanks!
@frankhaugen Жыл бұрын
"need identity server" and "need an identity server" is quite confusing, as Identity Server is a product, but have a service/server for managing identity is a good idea always as it can be given it's own infrastructure that is more resilient and secure than the rest of your application, so even if you are doing simple email and a password hash for authentication, this should be compartmentalized and regardless of what technology you are doing authentication with
@hendrik27652 жыл бұрын
Nice to see you again, have to join the streams again ^^
@RawCoding2 жыл бұрын
Hey man, you’re always welcome )
@brandonpearman92182 жыл бұрын
I dont understand why this type of thinking is not more common in software development. Everyone always says "it depends" but never says what it depends on, they never seem to expand on why you should not use something.
@robertroxxor2 жыл бұрын
great. spent a full day researching and copy-pasting tutorial code, repeatedly asking myself "do i even need this". i'm deving a spa app with a single database backend and probably some rest api in the future. guess this falls into the "no" category. thanks for this video :)
@RawCoding2 жыл бұрын
Exactly glad I could spare the pain
@anurag34872 жыл бұрын
its good to see you posting regularly. As always great content, very informative.
@rade60632 жыл бұрын
Nice to see your videos again
@dmtuan2 жыл бұрын
Very useful summary!
@RawCoding2 жыл бұрын
Thank you
@allinvanguard2 жыл бұрын
I like this new format, happy to see you uploading regularily again! Couldn't agree more on the content
@gerarduab99602 жыл бұрын
In my point of view. I think that the problem comes from net. I think there aren't a simple solution in order to implement a sso into spa and the team of Microsoft have to do more effort. No I don't need a identity server but what other settings exists in order to have a secure jwt into a web app with sso?
@codewkarim2 жыл бұрын
Nice video, nicer wall tag!
@RawCoding2 жыл бұрын
Cheers)
@dilankabc2 жыл бұрын
Great Explanation!!! Thank you
@michaelsniknejs6326 Жыл бұрын
Great video, thanks for making it :) Btw what country is your accent from?
@marna_li2 жыл бұрын
Unless you need go be a fancy Auth Provider that store your own data, then you don’t need one. Identity Server is hard to wrap your head around since there are so many use case mainly for bigger applications.
@RawCoding2 жыл бұрын
Exactly
@huzzah41392 жыл бұрын
Thank you, this is exactly what I needed! I just have a question regarding sso for multiple apps in different subdomains. The apps are owned and developed by the same company, they are under the same domain but different subdomains. You mentioned that since it's not cut by domain its easy to implement sso without IdentityServer. Could you share how that could be done? Every solution I came up seemed like it involved a lot of custom implementation and I was wondering if I missed something.
@RawCoding2 жыл бұрын
1) share data protection key's between identity and other apps: docs.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-6.0#setapplicationname 2) issue cookie to main domain on identity broker component services.ConfigureApplicationCookie(o => { o.Cookie.Name = "cookiename"; o.Cookie.Domain = ".mydomain.com"; }); 3) configure to accept said cookie on the app side services.AddAuthentication("anything") .AddCookie("anything", options => { options.Cookie.Name ="cookiename"; });
@huzzah41392 жыл бұрын
Thanks!
@alperyesilyurt33742 жыл бұрын
@@RawCoding This explanation is great. With simple cookie configuration it is possible to obtain sso easily under such a scenario
@diegomelgar2696 Жыл бұрын
Hi, What about solutions where you have one frontend and multiple backend services that this frontend consumes in which every service requires a user to be authenticated? Frontend X make requests to: Service A: Authenticating users and managing roles and permissions. (Authentication can be database, azure AD, etc.) Management of roles and permissions is custom Service B: Products service (only authenticated users from Service A can access) Service C: Orders service (only authenticated users from Service A can access) Service C communicates with Service B (validating product stock, etc.), so Firewall infrastructure can be suitable instead of client credentials flow. So, would I need Identity server for this scenario? If no, what can we use/do in such scenario?
@IndieBeto2 жыл бұрын
Damn, you got a new camera man? Looks dope. Been missing hanging on with you on twitch though. Cheers!
@RawCoding2 жыл бұрын
Thank you, I'll stream more been busy with the course
@dariuszlenartowicz Жыл бұрын
Thank you!!!
@kevinwang36742 жыл бұрын
bro, i like your wall😆
@Folsets2 жыл бұрын
Hello, I'm happy to see you
@Wfmike2 жыл бұрын
The recent trend especially with ID5 is to move away from client side jwt due to token exfiltration and use server side cookie when possible.
@RawCoding2 жыл бұрын
yesir
@paulo_pastore2 жыл бұрын
what about using jwt token in cookies in a secure mode as I know it is the safest approach
@RawCoding2 жыл бұрын
That works
@shahzeb51302 жыл бұрын
i started your authentication and authorization series. i still didn't got what is the best case to use identity server 4. Just wondering have you correctly use in one your series
@RawCoding2 жыл бұрын
when clients have a many to many relationships with the api's or your application is being extended by other apps.
@mateuszfryc48 Жыл бұрын
I got to say I almost got sea seek from watching how you rock left and right almost as if on the boat. Did any one tried to put some rap music to your videos? Otherwise great explanation, thank you so much.
@blankhh77972 жыл бұрын
Openiddict is another option. it's free OpenID Connect server library
@RawCoding2 жыл бұрын
tisis
@lukedjuuuu2 жыл бұрын
this is gold
@RawCoding2 жыл бұрын
Ta
@ebrahimalkadim75512 жыл бұрын
IMHO I think it would be perfect to use if you have multiple clients(e.g. Bank with multiple branches, e.g. Assume you own Google or Facebook ,etc xD), otherwise no need to add more complexity to your project,
@RawCoding2 жыл бұрын
Exactly
@КостяБондаренко-м8в2 жыл бұрын
Instant like for dancing
@RawCoding2 жыл бұрын
pasib
@diligencehumility69712 жыл бұрын
When you talk about Identity Server, do you mean the one from duende software? Or just the regular Identity Core library?
@samettt542 жыл бұрын
Around 04:10 he says "Asp .Net Core has its own jwt management API you dont need Identity Server" something along these lines. So I believe he talks about Identity Server from duende when he says Identity Server and he started his speech calling it "Identity Server 4"
@prathameshshende42 жыл бұрын
Can you provide sso without indentity server examples video?
@algarud2 жыл бұрын
Хорошо разложил. Жопа на стене тоже хорошая.
@RawCoding2 жыл бұрын
Жопа вообще лучшая
@Programmer7775 ай бұрын
What about csrf attack?
@TheAzerue2 жыл бұрын
Hi Great video. Just one question. If i have 3 services in .Net, Java and python. And Java and python need to validate jwt produced by .Net. Then do i need Identity server 4 as it can get public certificate from {domain-name}/.well-known/openid-configuration/jwks and can validate token or we implement our self. What are your thoughts on this
@RawCoding2 жыл бұрын
Well you got the public key, you got the algo in the jwt header, slap the 2 together against the token and you should be able to validate it.
@Tymonello Жыл бұрын
So if I have a WebAPI and Blazor ServerSide application, and only the frontend is public, I can use only .NET Identity for user authentication and that's it? Because the frontend fill communicate with API through local network only.
@RawCoding Жыл бұрын
Exactly, David fowler has an example that shows how to do it with JWT tokens, and it’s way too complex you don’t need it. Service to service just use firewall
@Tymonello Жыл бұрын
@@RawCoding ok thanks!
@AdamCiszewski2 жыл бұрын
The life of IS4 support seems to be running out. IS5 is a paid solution. Do you see any alternative of a similar format? Azure B2C? Auth0?
@RawCoding2 жыл бұрын
Did you not watch the video? It’s free while you earn less than a mil
@youseff10152 жыл бұрын
Omg thank you, please explain this more.. if you Google API authentication, jwt pops up. my question is, if we are using jwt do we need refresh tokens? Do we write our own implementation of refresh tokens? Writing refresh token implementation is fishy because everyone implements it differently and I don't know what to believe anymore
@youseff10152 жыл бұрын
So my thinking be like : if refresh token implementation is not very clear, then we use identify server to do it for us ! Right? Wrong according to what you said Then we just implement our own fishy refresh token implementation?
@RawCoding2 жыл бұрын
If you are using JWT, you do not need a refresh token. datatracker.ietf.org/doc/html/rfc6749#section-1.5 > Issuing a refresh token is optional at the discretion of the authorization server. If the authorization server issues a refresh token, it is included when issuing an access token > A refresh token is a string representing the authorization granted to the client by the resource owner. The string is usually opaque to the client. The token denotes an identifier used to retrieve the authorization information. Unlike access tokens, refresh tokens are intended for use only with authorization servers and are never sent to resource servers. a refresh token is a string with an expiry value in the database.
@youseff10152 жыл бұрын
@@RawCoding thanks for response, if I'm not using refresh token instead long lived JWT and someone changes their password, how do I invalidate their active session with the old password?
@RawCoding2 жыл бұрын
A database record of jwt which you invalidate if password is changed, or a hash claim based on the user password hash, if that changes token becomes invalid.
@SomeRandomDudeAF2 жыл бұрын
it's like walking into a tech store. Do i need to buy this thing? No! Am i GOING to buy this thing? Yepp! So what has I learned? That I am going to use IDP. Not because I need it, but because i want it. So weak minded...
@AzaKyd2 жыл бұрын
How are you? We missed you.
@RawCoding2 жыл бұрын
Thank you
@YashwantMestry2 жыл бұрын
What about sticky sessions problem with Cookie authentication. If we scale up application then cookie auth creates problem. Because session data stored on one server and problem comes client request passed to other server.
@RawCoding2 жыл бұрын
Cookies are stateless
@paulo_pastore2 жыл бұрын
@@RawCoding what is the difference between stateless cookies from jwt tokens?
@RawCoding2 жыл бұрын
Cookies get handled automatically by the browser.
@Mo-ef9yt2 жыл бұрын
I have an web api backend and blazor server on frontend. I have used jwt which works fine. However due to having blazor server at frontend it is impossible for me to have jwt refresh token working on the blazor server. If I had chosen identity server I wouldn't be in t this situation.
@TheRockbio2 жыл бұрын
Can you do a series on cookie authentication with webapi and spa?
@joehernandez32312 жыл бұрын
I was wondering if maybe he's done one already and would link to it in the video. And include a mobile app too. It would be great to see these pieces without IdentityServer because I too came to believe that as soon as you throw in web api and some client then you need some dedicated identity provider.
@RawCoding2 жыл бұрын
authentication series from cookie to identity server kzbin.info/aero/PLOeFnOV9YBa7dnrjpOG6lMpcyd7Wn7E8V
@RawCoding2 жыл бұрын
otherwise you do: fetch("/login", { method: 'POST', body: JSON.stringify({u:"username", p:"password"})})
@TheRockbio2 жыл бұрын
The problem is everywhere I worked they have spa and webapi are on different domain. Therefore do not know how cookie would ever work from webapi, as they except it to be stateless.
@RawCoding2 жыл бұрын
Cookie is just a value in the header ;)
@AzizjanAyupov_leo9 ай бұрын
are you alive dude? do we need to make a standalone api microservice for authantication ?
@RawCoding9 ай бұрын
Yea, and whats a microservice?
@AzizjanAyupov_leo9 ай бұрын
@@RawCoding I wanna create a .net web api microservice for authorization purposes. But I don't know how to make it properly using public key and asymmetric algorythm
@RawCoding9 ай бұрын
Sounds like you have a lot of learning to do!
@AzizjanAyupov_leo9 ай бұрын
@@RawCoding maybe... Gonna teach me?
@lflewwelling22 жыл бұрын
Ok, so how do I get rid of my Identity Server? lol
@RawCoding2 жыл бұрын
RIP
@Дима-ч3у3х2 жыл бұрын
Thank you! I have a question. I need to implement microservices app(back-end). I also have angular app(front-end). And i need to authenticate and authorize users. My mentor says me, that i need to implement authentication logic using IS4. But i dont see any sence to do that. My application will not allows third party application be integrated. How should i implemet authentication and authorization logic? (I want to use JWT)
@RawCoding2 жыл бұрын
Create a jwt token and return it in a header or body.
@adamc16942 жыл бұрын
Azure has out of the box OAuth solution.
@matej254sk2 жыл бұрын
Add dentityServer just in case :D
@mikhailslinko6322 жыл бұрын
I'm only sure that the subtitles you don't write will help a lot of people.
@stanleysane71602 жыл бұрын
Am I only see C# Rap Stand-up?..
@xxyxungxxraimexx72422 жыл бұрын
Anton cool dawg 🦾🥰
@clearlyunwell2 жыл бұрын
👍🏽
@cocoscacao61022 жыл бұрын
Well, if *your* company needs an identity server, I think it is safe to say that at that point, you'll have a security expert employee, so *you* don't need to learn identity server 😉 On a more serious note, those videos helped me a quite a bit, since a lot of the things apply to the Azure's identity framework, which probably uses identity server in the background.
@RawCoding2 жыл бұрын
> I think it is safe to say that at that point, you'll have a security expert employee couldn't be further from the truth, unfortunately.
@cocoscacao61022 жыл бұрын
@@RawCoding Then I assume that's how you've learned it. Thrown into the fire eh?