OAuth 2 Explained In Simple Terms

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น •

  • @anilkumar-p6d3w
    @anilkumar-p6d3w 9 หลายเดือนก่อน +133

    I think this is the only video on TH-cam, in which OAuth is explained in a very simple way.. thanks.

    • @balajik8561
      @balajik8561 9 หลายเดือนก่อน +5

      That's right! Excellent explanation

    • @philipackerley5775
      @philipackerley5775 2 หลายเดือนก่อน +1

      Totally agree, superbly explained!

  • @djplt1240
    @djplt1240 ปีที่แล้ว +118

    Great explanation! Two minor clarifications: the authorization code is sent to printMagic service via the user with a HTTP redirect rather than the auth server directly sending the authorization code to PrintMagic. Also depending on OAuth server implementation, you may not be able to revoke the access token immediately and instead have to revoke the refresh token instead.

    • @sampathsris
      @sampathsris ปีที่แล้ว +11

      This is very true, but if you try to draw arrows for all the redirects and HTTP requests, OAuth flow diagrams tend to become really convoluted.

    • @karthiksuryadevara2546
      @karthiksuryadevara2546 ปีที่แล้ว +5

      Whats the difference between oauth 1.0 and oauth 2.0

    • @henryzhang7873
      @henryzhang7873 ปีที่แล้ว +5

      There is also the server-sided flow that doesn't require a browser redirect though, where the providers can coordinate directly.

  • @nick_merchant
    @nick_merchant ปีที่แล้ว +53

    Very easy to understand, clearly spoken with good graphics and solved the mystery in my mind within 4 minutes and 30 seconds. Thank you so much.

  • @codingisamazing
    @codingisamazing 12 ชั่วโมงที่ผ่านมา +1

    I see a lot of people asking how he created these amazing animations, I can give a guess it's
    Adobe After Effects
    1- The industry standard for creating motion graphics and animations;
    2- Allows for complex animations, transitions, and effects;
    3- Often used in combination with other Adobe tools like Illustrator or Photoshop for asset creation.

  • @sheykenasababy
    @sheykenasababy ปีที่แล้ว +11

    0:40 "To scrape information from crusty old banks" I did not expect a roast this hard

  • @gsenthilkumar8139
    @gsenthilkumar8139 9 หลายเดือนก่อน +2

    00:04 OAuth 2 simplifies secure access to resources.
    00:37 OAuth 2 is like giving someone a special key for accessing specific information in another application.
    01:12 Using OAuth2 to grant permission to access Snap Store photos.
    01:39 OAuth 2 facilitates secure access to resources
    02:16 OAuth2 process flow explained
    02:50 Authorization code is exchanged for access token by the client.
    03:24 OAuth 2 protects login credentials and allows controlled access to authorized resources.
    03:58 OAuth 2 is essential for web security
    Crafted by Merlin AI.

  • @ayoolaoladipe8105
    @ayoolaoladipe8105 9 หลายเดือนก่อน +1

    The explanation is straight to the point and the graphics makes it easier to understand
    thank you

  • @boredhuman9289
    @boredhuman9289 ปีที่แล้ว +4

    Oh man, you explained this so well, I was struggling with this topic for years now, never actually understanding what is going on there! Thank you!

  • @pallavkan
    @pallavkan 8 หลายเดือนก่อน +6

    you solved my confusion in just 10 min which I was struggling after studying so many articles from medium

  • @alainpannetier2543
    @alainpannetier2543 ปีที่แล้ว +28

    1. At 2:10 third lifeline title is wrong. Should be OAuth2 server (e.g. Snapstore OAuth2 server or 3rd party [keycloak] server) instead of "Print Magic". Cut'n paste leftover probably.
    2. At 2:49 The request dialog that submits the parroval is the one that receives the authorization code in return. So the authorization code is in the browser and acquired by print magic via the redirect_uri initially specified by PrintMagic in the request for dialog. This is why we need the authorization code indirection (otherwise either there is no client auth or the browser would know the client secret).

    • @msreedaran89
      @msreedaran89 ปีที่แล้ว +6

      2:21 rather than 2:10? I came to the comments to point out the same thing

    • @OpenDeepLearning
      @OpenDeepLearning 5 หลายเดือนก่อน

      @@msreedaran89 Same here

    • @dwarslopers
      @dwarslopers 4 หลายเดือนก่อน

      Thanks! That is correct and helped me!

  • @sridharneelakanta
    @sridharneelakanta ปีที่แล้ว +13

    Thanks for the concise explanation. Appreciate it. A small correction -- the sequence diagram at 03:52 shows "PrintMagic" within the blue rectangle. It should have been "Snap Store Auth". Thanks again.

    • @devrj1679
      @devrj1679 7 หลายเดือนก่อน +4

      Yes your correct, but green rectangle. Thanks for pointing that out.

  • @charlymarchiaro
    @charlymarchiaro ปีที่แล้ว +2

    At last!!! This is by far the best explanation I've seen. Thanks a lot.

  • @PhillipKerman
    @PhillipKerman 6 หลายเดือนก่อน +4

    Of course there's tons more to know, but this probably the best description under five minutes. In about one hour Nate Barbettini covers this, along with OIDC and PKCE. After that learn about JWT and related formats and you'll have all the fundamentals.

  • @jlp2011
    @jlp2011 ปีที่แล้ว +3

    great vid. minor remark : 1st collab/msg diagram - full one - puts printmagic on 2nd n 3rd lane from left. 2nd diagram has 3rd lane being snap’s auth which makes more sense

    • @am_0x2a
      @am_0x2a ปีที่แล้ว

      I noticed this too. Great video overall though!

  • @ElvisANgoh
    @ElvisANgoh ปีที่แล้ว +12

    This was incredibly refreshing and so easy to understand. This is the first video I have watched from you, I can't wait to see more, and other topics

  • @locotx215
    @locotx215 ปีที่แล้ว +2

    You did it, you finally explained the WHY part . . . ."so you don't have to share credentials with other sties"

  • @sungjuyea4627
    @sungjuyea4627 ปีที่แล้ว +15

    I always get irritated by this complex and "seemingly" pointless process. Now it is very clear why we need it. Thanks to your explanation :)

  • @tayyabmunir6228
    @tayyabmunir6228 7 หลายเดือนก่อน +1

    Wao, I was struggling with the basic concepts of oauth2 for a long time. This video explains it really well.

  • @BilliejeanMccubbin-i6l
    @BilliejeanMccubbin-i6l 2 หลายเดือนก่อน

    Thanks for explaining everything in such simple terms!

  • @jubiaj2672
    @jubiaj2672 ปีที่แล้ว +1

    best explanation so far. thank you

  • @sollenism
    @sollenism 3 หลายเดือนก่อน

    Great explanation! and your animation is top notch. Thanks

  • @anilsonone6067
    @anilsonone6067 5 หลายเดือนก่อน

    Up to the point explanation. Very Straight forward way with good graphics. Thanks....

  • @sumanthvarma9999
    @sumanthvarma9999 ปีที่แล้ว +15

    Can you cover Kerberos authentication please

  • @saravanansomu8296
    @saravanansomu8296 11 หลายเดือนก่อน

    Very nice explanation with the perfect animation. It's slick because it doesn't need lot of implementation details here.

  • @hakkoktay7597
    @hakkoktay7597 7 หลายเดือนก่อน

    Explained in a very simple way but also excellent!

  • @madhavareddy580
    @madhavareddy580 7 หลายเดือนก่อน

    Beautiful visuals and amazing explanation.
    Thanks!

  • @thomashsu5252
    @thomashsu5252 7 หลายเดือนก่อน +1

    Super explanation. Thanks a lot for sharing

  • @codingisamazing
    @codingisamazing 11 ชั่วโมงที่ผ่านมา

    *OAuth 2.0* is an authorization framework that allows third-party applications to access user data from a service (e.g., Google, Facebook) without exposing the user’s credentials. It works by issuing **access tokens** to the application after the user grants permission. The process typically involves four roles: the **resource owner** (user), the **client** (application), the **resource server** (API hosting the data), and the **authorization server** (issues tokens). OAuth 2.0 supports multiple **grant types**, such as **authorization code** for web apps, **implicit** for mobile apps, and **client credentials** for server-to-server communication. By delegating authorization, OAuth 2.0 enhances security and simplifies integration with third-party services.

  • @sagarkalburgi
    @sagarkalburgi หลายเดือนก่อน

    Thanks this was so easy to understand

  • @itsZavier_1
    @itsZavier_1 5 หลายเดือนก่อน +1

    it's always the short videos that explain these kind of things with ease and understanding

  • @basseygodwin7384
    @basseygodwin7384 ปีที่แล้ว

    Clearest video I've seen on this

  • @andrewtcoder
    @andrewtcoder 4 หลายเดือนก่อน

    Perfect explanation! Thank you so much!

  • @valentinkrajzelman4649
    @valentinkrajzelman4649 3 หลายเดือนก่อน

    great conceptual vid, thanks

  • @wirelessnerd7131
    @wirelessnerd7131 11 หลายเดือนก่อน

    Thank you for the explanation. Simple and straight forward and btw great graphics.

  • @profindia
    @profindia 3 หลายเดือนก่อน

    explanation is great. At 3:59, the "SnapStore Auth" box is missing

  • @JinTsen
    @JinTsen ปีที่แล้ว +2

    There is a small mistake. When you first animate the flow at 2:19 , you have 2x PrintMagic, missing the (later fixed) SnapStore Auth

  • @axis0401
    @axis0401 ปีที่แล้ว

    Animation in this video is awesome

  • @nishithvyas
    @nishithvyas 4 หลายเดือนก่อน

    Superb Explanation... Now, no need to go with "What is OAuth Question" anywhere....!!!

  • @mduzair1120
    @mduzair1120 4 หลายเดือนก่อน

    Perfectly explained!

  • @ayaabdelmagied6696
    @ayaabdelmagied6696 ปีที่แล้ว

    you head nail on the head.... simple and to the point

  • @SoupTubeTV
    @SoupTubeTV ปีที่แล้ว

    This channel is invaluable. Thank you for your knowledge!

  • @ilhamiyanmaz4743
    @ilhamiyanmaz4743 4 หลายเดือนก่อน

    Thanks for this tutorial !

  • @vintagewander
    @vintagewander ปีที่แล้ว +3

    I was about to implement google login from scratch and had a lot of problems implementing it without relying on external libraries. This video helped me a lot sir, thank you for your content ❤

  • @padalaraveendra
    @padalaraveendra ปีที่แล้ว

    Breakdown of complex concepts in to digestable explanations --> Quite Appropriate wording😍

  • @The_Ape_And_Mortadello
    @The_Ape_And_Mortadello 8 หลายเดือนก่อน

    Great explanation, BUT on 3:51 the "Snap Store Auth" changes into "PrintMagic" on your sequence diagram. This makes it look like the refresh token is given to the same "PrintMagic" to get updated Access Token

  • @canhlinh
    @canhlinh 10 หลายเดือนก่อน

    Nice presentation. Thank you.

  • @MuhammadFauzan-s1r
    @MuhammadFauzan-s1r 10 วันที่ผ่านมา

    nicely explained!!

  • @oatlylatte9
    @oatlylatte9 2 หลายเดือนก่อน

    3:57 diagram shows the wrong components. but great explanations mate. always love your video

  • @ml-rj5pt
    @ml-rj5pt ปีที่แล้ว +1

    Thanks for the great video. One question though...at 3:20 when PrintMagic fetches photos with the access token, does the SnapStore Resource still need to validate the access token? If so, does it need to call SnapStore Auth api to validate?

  • @hasan_shans
    @hasan_shans 9 หลายเดือนก่อน

    Great explanation! Thanks!

  • @mahamadoutogola4001
    @mahamadoutogola4001 ปีที่แล้ว

    Great explanation 😊

  • @bhaveshmuleva2352
    @bhaveshmuleva2352 ปีที่แล้ว

    Will implement in my upcoming project

  • @slx0009
    @slx0009 7 วันที่ผ่านมา

    Could u explain why do we need Get Access Token step 3:20? Why server can’t just return Access Token after Request Approved?

  • @musaddiqueansari7695
    @musaddiqueansari7695 ปีที่แล้ว

    wow! great explanation

  • @muhammadumarsotvoldiev8768
    @muhammadumarsotvoldiev8768 ปีที่แล้ว

    Thank you very much! Very helpful!

  • @tadtab2
    @tadtab2 7 หลายเดือนก่อน

    @2:20 the 3rd column need to be renamed 'SnapStore ' instead of 'PrintMagic'?

  • @babhijit
    @babhijit 6 หลายเดือนก่อน

    At 02:29 whose client id is being referred to - PrintMagic or SnapStore ?

  • @cuybueno
    @cuybueno ปีที่แล้ว

    Another kickass video!

  • @tahiraziz193
    @tahiraziz193 ปีที่แล้ว

    Your explanation is Aws0me👍

  • @Akshay56633
    @Akshay56633 ปีที่แล้ว

    Thanks for the video! Finally I know what this OAuth 2 is.

  • @davideanguianomelendez628
    @davideanguianomelendez628 8 หลายเดือนก่อน

    It seems to me that diagrams on 2:20 and on 3:58 have a mistake: the green "PrintMagic" actor should be labeled as "SnapStore Auth", as it actually is on 3:17. Am I right?

  • @mawhadmd
    @mawhadmd 6 หลายเดือนก่อน

    Very well explained.

  • @oskarspozdnakovs6441
    @oskarspozdnakovs6441 ปีที่แล้ว

    Great video. It's Zero Auth by the way

  • @TahaBolat-sn6ib
    @TahaBolat-sn6ib 2 หลายเดือนก่อน

    This is just awesome.

  • @ronitdhingra4395
    @ronitdhingra4395 ปีที่แล้ว +7

    What tool do you use for the animations? they are great!!

    • @laserz23
      @laserz23 ปีที่แล้ว

      curious to know this too

  • @highvibr
    @highvibr 11 หลายเดือนก่อน

    Not sure I heard it right at 2:55. So, #authorizationcode IS #clientId and #clientsecret?? Or #authorizationcode WITH #clientId and #clientsecret (and are presented to authorization server?)

  • @edydon
    @edydon ปีที่แล้ว

    Very clear presentation. Keep up the great work!

  • @zehrairkicatal2156
    @zehrairkicatal2156 11 หลายเดือนก่อน

    excellent explanation

  • @deemon710
    @deemon710 10 หลายเดือนก่อน

    @3:22 That feels a tad redundant. Anyone know why SnapStore Auth doesn't immediately give the access token (in green) after the request is approved (in blue)? Why is the "Get Access Token" (in yellow) step needed?

  • @meghnamanjunatha4707
    @meghnamanjunatha4707 ปีที่แล้ว

    Thank you so much for the clear and simple explanation!

  • @systemBuilder
    @systemBuilder 8 หลายเดือนก่อน

    It would be super awesome to give an example of a barebones OAuth2 that everybody uses (like a draw webapp asking for access to your google drive with frw other assets) then we could literally watch the OAuth2 in the Chome debug window under the network tab.

  • @vicenterendo
    @vicenterendo 11 หลายเดือนก่อน

    Thank you so much, lifesaver!

  • @etshbadr
    @etshbadr ปีที่แล้ว

    Love your explanation!

  • @willpringle
    @willpringle ปีที่แล้ว

    Awesome video!

  • @uttambasak100
    @uttambasak100 ปีที่แล้ว

    3:53 both the heading is written as PrintMagic is that correct

  • @XJacksonvilleX
    @XJacksonvilleX 7 หลายเดือนก่อน

    the graphics are amazing.. how do you create them??

  • @jaiyden9888
    @jaiyden9888 ปีที่แล้ว

    Thanks for this! Great video :)

  • @suha2072
    @suha2072 6 หลายเดือนก่อน

    Thank you for the great lecture! It was very helpful. I was successful in getting the device access code, but is there a way to expire the access code or log out? We want to develop a service that allows multiple people to use one device. We need to process when the user logs out the device token.

  • @mightylb4543
    @mightylb4543 ปีที่แล้ว +6

    Why we need 2 different codes ? Authorization codes and access tokens, why was it designed this way?

    • @avidtechie9734
      @avidtechie9734 ปีที่แล้ว +4

      an authorization code is a temporary credential that serves as proof of the user's consent to access their protected resources. It plays a crucial role in the OAuth flow and is used to obtain an access token, which is then used to make authenticated API requests on behalf of the user.
      The authorization code flow adds an extra layer of security to the OAuth process. Instead of directly exchanging user credentials (e.g., username and password) for an access token, the authorization code flow separates the authorization and token exchange steps. This way, the access token is not exposed to the client application, reducing the risk of unauthorized access or token leakage.
      OAuth: Authorization Code Importance
      In OAuth, an authorization code is a temporary credential that serves as proof of the user's consent to access their protected resources. It plays a crucial role in the OAuth flow and is used to obtain an access token, which is then used to make authenticated API requests on behalf of the user.
      Here's an overview of why an authorization code is needed in OAuth:
      User Consent: OAuth is designed to protect user data and privacy. Before an application can access a user's protected resources (such as their profile or data), the user must explicitly grant consent. The authorization code serves as evidence that the user has granted permission for the application to access their resources.
      Security: The authorization code flow adds an extra layer of security to the OAuth process. Instead of directly exchanging user credentials (e.g., username and password) for an access token, the authorization code flow separates the authorization and token exchange steps. This way, the access token is not exposed to the client application, reducing the risk of unauthorized access or token leakage.
      Limited Lifetime: Authorization codes have a limited lifetime, typically short-lived, making them less susceptible to misuse. Once an authorization code is issued, it has a short validity period, usually a few minutes. This helps mitigate security risks and reduces the window of opportunity for attackers to intercept and abuse the code.
      Authorization Code Exchange: After obtaining the authorization code, the client application sends it to the authorization server, along with its client credentials, to exchange it for an access token. This token can then be used to make authenticated API requests on behalf of the user.
      By using an authorization code, OAuth ensures that the user's consent is obtained, enhances security by separating authorization and token exchange steps, and provides a limited and controlled means of obtaining access tokens.
      In Authorisation code flow this happens. There are various authentication / authorisation flow available.
      In the above video authorisation code flow is explained.
      In which authorisation code is returned after successful authentication. Then authorisation code + client id + secret key is sent to the server which validates that the user is the same as authorization key is the same and it is not tempered. And then the server returns 3 tokens. (1.Access tokens which contain scopes/ permission used for sending requests to get resources. 2.Id token which contain user information/ claims. 3. Refresh token - this is optional.)

    • @tsunghan_yu
      @tsunghan_yu ปีที่แล้ว

      Mainly two security benefits:
      1. we can avoid sending the access token, which is sensitive information, in the front channel and send it in the back channel instead.
      2. we can authenticate the client as well by requiring the client to send client_id and client_secret (along with authorization code) to request the access token.
      Here's a video that directly answers your question:
      th-cam.com/video/996OiexHze0/w-d-xo.html
      And here's a good illustration of the whole flow:
      th-cam.com/video/PfvSD6MmEmQ/w-d-xo.html

    • @henryzhang7873
      @henryzhang7873 ปีที่แล้ว

      This prevents the client from knowing the token. The services may not trust the client or want to charge money for operations without the risk of spoofing.

  • @trickytricktwo
    @trickytricktwo 11 หลายเดือนก่อน

    very nice explanation

  • @bhagyeshpatel18
    @bhagyeshpatel18 4 หลายเดือนก่อน

    There is problem in the image at 3:54 second. Third Entity should be SnapStore Auth Server. NOT PrintMagic.

  • @himanshujain5670
    @himanshujain5670 ปีที่แล้ว

    simple and crisp explanation

  • @nemonemo6285
    @nemonemo6285 6 หลายเดือนก่อน

    Perfect, thank you.

  • @bhagyeshpatel18
    @bhagyeshpatel18 4 หลายเดือนก่อน

    I love your content and really easy to understand.I HAVE REQUEST THAT YOUR DIAGRAM/ ANNIMATION HAS MOTION/ZOOM OUT-IN/ which makes me keep eye and It is difficult to focus. Just advice, if you can stop using the motion/zoom out-in , just show still annimation. Thanks

  • @somnathgolui2912
    @somnathgolui2912 ปีที่แล้ว +1

    Thanks for the video.

  • @user-sb6mb4rp7h
    @user-sb6mb4rp7h หลายเดือนก่อน

    Can I know what is the software you have used to create the presentation and animations?

  • @abdoyones1983
    @abdoyones1983 10 หลายเดือนก่อน

    is there a mistake in the diagram @ 2:19 ?

  • @l3zhang392
    @l3zhang392 หลายเดือนก่อน

    Explain of PermissionGranted in as a senario: After Request Approved in the SnapStroe Auth dialog, SnapStore Auth redirects the user back to PrintMagid with an authorization code.

  • @BehniaFB
    @BehniaFB ปีที่แล้ว

    I liked the animations

  • @NallapuSrinivas-k1p
    @NallapuSrinivas-k1p ปีที่แล้ว

    when oAuth is enabled, the client software first requests for authorisation from the auth server & auth server asks the user for approval and when approved, auth server gives an access token to the client software and client can make requests and get responses

  • @HikeWkam
    @HikeWkam 3 หลายเดือนก่อน

    That was awesome

  • @carlotadias9335
    @carlotadias9335 2 หลายเดือนก่อน

    Hello, thank you for the video
    About this subject I would also to like to know a bit more about Auth2.0 servers
    Are they third party servers : which ones exist, or which ones do you recommend, are they secure ? If private, how would that be implemented ?
    Thank you

  • @Marksmwangi
    @Marksmwangi 6 หลายเดือนก่อน

    easy to understand

  • @yogavedfood
    @yogavedfood 3 หลายเดือนก่อน

    @ByteByteGo what is the use of state variable in OAuth2 and how to handle its storage in a stateless multi machine UI server because the callback can go to any of the servers if stored at server side.

  • @7tsh
    @7tsh ปีที่แล้ว

    The video looks great. would you mind telling me which tool does you use to create the video ?

  • @RamChandran-s1e
    @RamChandran-s1e ปีที่แล้ว

    Great Explanation👏. One question what happens if refresh token expires, will the user have to go through oauth process again.I'm just curious.

  • @fong555
    @fong555 ปีที่แล้ว +1

    Another great video! Thank you for your time and effort! Could you please share or make a video about what tool and how you made those animated diagrams? Appreciated so much!

  • @twinkleverma2945
    @twinkleverma2945 ปีที่แล้ว

    Hi @ByteByteGo ... @3.51 the 3rd tower's name is incorrect. It should be "SnapStore Auth" instead of "PrintMagic". It becomes confusing at this point.

  • @testtest-c4z
    @testtest-c4z ปีที่แล้ว

    Very good video, I have a question if I am developing an app, my server would do authentication service based on what I implement and authorization server, right? In the latter I should implement the access by roles, within the same token as information I would get the scope to compare whether or not you have access to the resource?
    Thank you very much

  • @ngamlenmangtouthang4507
    @ngamlenmangtouthang4507 ปีที่แล้ว

    please make a video on access token and refresh token :)