Тёмный

OAuth Authorization code flow 

Jan Goebel
Подписаться 12 тыс.
Просмотров 52 тыс.
50% 1

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

 

10 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@jgoebel
@jgoebel 3 года назад
What do you think about this? Please let me know in the comments below.
@nicktacora
@nicktacora 2 года назад
amazing bro!
@jgoebel
@jgoebel 2 года назад
@@nicktacora thx
@OgnyanDimitrov
@OgnyanDimitrov Год назад
The explanation is clear. Thank you!
@backendbuddy
@backendbuddy Год назад
Bro very nice explanation in detail. Keep it up
@prakashsundra6667
@prakashsundra6667 3 года назад
The details were superb.. you clearly explained the flow. Great job ProductionCoder!
@umairyetoo9545
@umairyetoo9545 Год назад
Man, I am a backend dev with 4 yrs of exp. but believe me man I always get lost in this Oauth Grants. I always need to re do all R&D again. But here you explained very well mate, I must say perfectly explained. Kepp it up
@jgoebel
@jgoebel Год назад
thx Umair, I'm glad it helped
@MAxAMILLIoN757
@MAxAMILLIoN757 Год назад
Can you share a read-only link to that drawio doc? Would be very helpful.
@shubhamrokz12
@shubhamrokz12 Год назад
Agree, this would be very helpful.
@chrislaneyphotography
@chrislaneyphotography 2 года назад
Greatly appreciate this. Explanation of this flow brought it home for me on understanding
@shanerigsby9030
@shanerigsby9030 Год назад
Your approach to explaining this is excellent. Thank you!
@jgoebel
@jgoebel Год назад
Glad you enjoyed it!
@azgharkhan4498
@azgharkhan4498 Год назад
The auth code flow explanation was really great. However the part where you explained about client secret is not very clear. perhaps little more detailed explanation would have helped me
@jgoebel
@jgoebel Год назад
Think of client id as a username and client secret as a password. OAuth 2.0 also supports stronger means of authentication against the token endpoint such as mTLS or JWT assertions
@marcus-vg8ft
@marcus-vg8ft 8 месяцев назад
@@jgoebel Absolutely awesome series of videos!! Thank you Jan! -- One question regarding this: Why is important to keep the client_secret as a pw? After all, even if an attacker gets it, it will still need the user to authenticate.
@jgoebel
@jgoebel 8 месяцев назад
@@marcus-vg8ft if you have the client secret, then you can impersonate an app. I.e. an attacker could pretend that he is the app for which he has obtained the client secret and get access to the user's data
@marcus-vg8ft
@marcus-vg8ft 8 месяцев назад
Thanks Jan! If it is for what Google calls "A desktop app" where the user will store the secret on his own computer, is this still risky? I thought with PKCE it should be safe no matter what. @@jgoebel
@jgoebel
@jgoebel 7 месяцев назад
@@marcus-vg8ft an attacker could impersonate the app and get access to the user's data on the resource server
@m.k.bearit
@m.k.bearit 2 месяца назад
thanks! well prepared and informative, made my life much easier :)
@jgoebel
@jgoebel Месяц назад
You're welcome!
@vineetchaurasia7460
@vineetchaurasia7460 Год назад
One of the greatest content on oauth i ever found on RU-vid, Thanks bud, for this wonderful content
@jgoebel
@jgoebel Год назад
thx, I'm glad you found it useful
@alastairtheduke
@alastairtheduke 6 месяцев назад
Great explanation
@jgoebel
@jgoebel 6 месяцев назад
Glad you liked it
@supa1009
@supa1009 9 месяцев назад
best explanation on youtube, thank you!
@jgoebel
@jgoebel 9 месяцев назад
Glad it was helpful!
@madrag
@madrag Год назад
Finally explanation I was looking for, thanks!
@andrebittencourt5512
@andrebittencourt5512 3 года назад
This video was incredible!! Thank you for share so much knowledge!
@jgoebel
@jgoebel 3 года назад
thx André, I'm glad you found it useful 👍
@VitalikAwesome
@VitalikAwesome 3 года назад
I came here to put like! Everything clear I have no questions Thanks for video
@jgoebel
@jgoebel 3 года назад
Thx Віталік, I'm glad it helped!
@entropy1088
@entropy1088 Год назад
Hey, I really love this video especially because it show visually whats going on instead of just tossing jargon around. What wasnt entirely clear though is WHY the code / token exchange is happening. Like, I dont understand how that extra steps adds additional security compared to the implicit flow for example. Any chance you could give me a hint here?
@mdamirhossain9376
@mdamirhossain9376 Год назад
So far, its seems excellent tutorial to me. I bet, these video should have more like and subs...
@jgoebel
@jgoebel Год назад
Glad it was helpful!
@JedGrant
@JedGrant Год назад
Great video. Would love to watch a follow up with a react app creating or updating a Google Doc.
@drizztyang9502
@drizztyang9502 Год назад
Explained so clear!!!
@jgoebel
@jgoebel Год назад
thx
@boomboom-9451
@boomboom-9451 Год назад
Great video, thanks for explaining that way!
@jgoebel
@jgoebel Год назад
thx
@911Neunelfer
@911Neunelfer 3 года назад
Very understandable, thanks for your efforts!
@jgoebel
@jgoebel 3 года назад
you're welcome Konstantin 👍
@HappyTest-rr3jq
@HappyTest-rr3jq 4 месяца назад
hey i get that oauth2 is required by third party to access api, example when i say continue with google for the first time it will get my email name profile photo and all, this will help in getting those data and creating user but how login happens with "login with google" button.
@muzamilshaikh838
@muzamilshaikh838 11 месяцев назад
our approach to explaining this is excellent❤ and plzz can you give me your explaination sheet
@feysalmama1800
@feysalmama1800 Год назад
Amazing explanation!. Thank you for your effort.
@jgoebel
@jgoebel Год назад
Glad you liked it
@jeno101
@jeno101 Год назад
We get "redirect uri " two times within your UC diagram .. which is the one actually registered with the server initially ?
@brunogiovagnoli3022
@brunogiovagnoli3022 Год назад
Amazing explanation.
@jgoebel
@jgoebel Год назад
Glad you liked it
@muralikumara9881
@muralikumara9881 Год назад
The details are well explained , thank you. Would be helpful if you share the diagram which is referenced in this tutorial.
@rodinCodin
@rodinCodin Год назад
awesome explanation, thank you, you've got another subscriber!
@jgoebel
@jgoebel Год назад
great, thx Yegor
@user-gp5xz
@user-gp5xz Год назад
Thanks for this great content.
@jgoebel
@jgoebel Год назад
Thx Mohamed
@Uzair_Anwar2299
@Uzair_Anwar2299 2 года назад
amazing explaination
@jgoebel
@jgoebel 2 года назад
thx
@kirstinebrrup9656
@kirstinebrrup9656 3 месяца назад
Great video.
@satwikmanitiwari6020
@satwikmanitiwari6020 2 года назад
very nicely explained. great work !!
@jgoebel
@jgoebel 2 года назад
thx Satwik
@thereseparish3541
@thereseparish3541 2 года назад
This was an awesome explanation of grant type authorization code flow. Thank you so much! One question I have is how does this flow work when you have one API that needs authorization to access another API where there is no "user" login involved? For example, I have a Spring REST web service that a vendor cloud app (Dell Boomi app) needs to access. In the past, I've used password grant type, which I know is not best practice. Sorry if this is a basic question.... I'm new to auth code grant type flow.
@jgoebel
@jgoebel 2 года назад
Hi Therese, the authorization code grant is only used with a user together (someone clicks approve on a screen). For server to server communication OAuth2 offers the client credentials flow. Ultimately it is a judgement call. Basic Auth is way simpler to implement because it is just username / password. With OAuth you need an authorization server. So unless you don't already support OAuth, I would rather go with Basic Auth. You might also want to take a look at using JWTs for server to server communication (I have a video series about this). This is probably better in terms of security, but more work to implement. You need to decide if it would be worth doing.
@nglara
@nglara Год назад
Please help. Is there a sample angular application that implements this? I need to learn it. Thanks!
@KavinChakaravarthi
@KavinChakaravarthi Год назад
what should be the redirect_url be like. how it was determined ? can you give me the example
@baustin612
@baustin612 9 месяцев назад
is the diagram shown in the video available anywhere?
@user-mf2po5mf7g
@user-mf2po5mf7g 2 года назад
Good work, thanx a lot!
@jgoebel
@jgoebel 2 года назад
You are welcome!
@ralphanthonyplanteras6246
@ralphanthonyplanteras6246 11 месяцев назад
how can you get the code from the authorization? automatically, noy by copying it from the browser?
@jgoebel
@jgoebel 7 месяцев назад
you can access the browser's URL and get the code from the query parameters
@SentinelMoonlight
@SentinelMoonlight 2 года назад
All clear)thanks)!
@jgoebel
@jgoebel 2 года назад
Glad it helped!
@divyeshkumarbalar7732
@divyeshkumarbalar7732 7 месяцев назад
did you said, authorization code flow clients does not need a secret? Dont we need the secret to exchange the code for access token?
@divyeshkumarbalar7732
@divyeshkumarbalar7732 7 месяцев назад
sorry commented too early before watching the whole video
@kemalgenc7117
@kemalgenc7117 Год назад
Thank you for a detailed explanation. My question is how the resource server validates the access token? We need a call from resource server to auth server in order to validate right? Do we have a standart for this communication?
@jgoebel
@jgoebel 11 месяцев назад
I explained it here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-q3FiuTZlroE.htmlsi=Vp_lWURCU0-HbG2Q&t=404 Either via a call to the authorization server or - if the token is structured (e.g. a JWT), then by validating the token's signature with a public key
@pradyun679
@pradyun679 Год назад
Can you please share the drawing? It would be really helpful.
@anushkashrivastava9035
@anushkashrivastava9035 Год назад
I love fight club too XD
@jgoebel
@jgoebel 11 месяцев назад
best movie ever
@siwarhadjali354
@siwarhadjali354 2 года назад
thannk youu
@jgoebel
@jgoebel 2 года назад
You're welcome!
@memester3199
@memester3199 Год назад
It has given me an authorization code, but where do I paste the code in?
@jgoebel
@jgoebel Год назад
the authoriztion code is sent to the token endpoint of the authorization server to obtain an access and / or refresh token.
@ThoDaGeEtKuDunGi
@ThoDaGeEtKuDunGi 2 года назад
how do i take code and state parameter to the backend in python
@jgoebel
@jgoebel 2 года назад
you would make a REST call to your backend
@DMoots
@DMoots Год назад
Thanks for the video this has been very helpful for me. I've one question I hope you can answer for me. Once I've passed authentication and have received the token back on the client, and then the client makes a request to the RESOURCE server. Does the resource server need to check the token against the auth server with every request?
@jgoebel
@jgoebel Год назад
Most servies use structured tokens, i.e. JWTs, so you can validate the token without making a REST call to the authorization server. There are a few edge cases you could run into however, .e.g if a token is revoked you might accept it on your service. Therefore, for critical actions like purchasing sth. you can use token introspection endpoint of the authorization server where you can have a token validated
@DMoots
@DMoots Год назад
@@jgoebel thanks for the explanation 👍
@user-gw8qe6nr9m
@user-gw8qe6nr9m 5 месяцев назад
wow...
@critical5555
@critical5555 Год назад
So server side rendered apps don't use a state parameter because using a client secret makes it secure enough already? Also, if anyone has any resources explained how to decide what the redirect URL should be, please link (I am new to this and I suspect it may be obvious to many)
@chechochimes
@chechochimes 2 года назад
Thanks for this! Right now I need implement an app that create some google-calendar events but for a ServiceAccount. I saw many examples in docs that creates/uses AuthorizationCodeInstalledApp (or similar) to create a 'credential' instance (com.google.api.client.auth.oauth2.Credential) but it works for regular user accounts and not for ServiceAccount (I already have the JSON file with key info from my ServiceAccount) . Do you know where I can find some examples for what i'm looking for? Something like this: final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport(); JsonFactory jsonFactory = GsonFactory.getDefaultInstance(); GoogleCredentials credential = GoogleCredentials.fromStream(new FileInputStream(jsonPath)) .createScoped(Collections.singleton(CalendarScopes.CALENDAR)); Calendar calendar = new Calendar.Builder(HTTP_TRANSPORT, jsonFactory, credential) .setApplicationName(APPLICATION_NAME) .build(); (this example isn't working because Calendar.Builder needs some Credential obj as a third param)
Далее
OAuth 2.0 - a dead simple explanation
9:16
Просмотров 19 тыс.
Oauth 2.0 Authorization Code Flow | Microsoft Graph
15:52
OAuth implicit flow
6:41
Просмотров 11 тыс.
OAuth 2.0 explained with examples
10:03
Просмотров 130 тыс.
OAuth 2.0 Pushed Authorization Requests
9:35
Просмотров 3,5 тыс.
OAuth explained | OAuth 2.0
8:47
Просмотров 39 тыс.
An Illustrated Guide to OAuth and OpenID Connect
16:36
Просмотров 585 тыс.
OAuth Grant Types simplified for decision makers
13:16