YouTube2Text

OAuth 2.0 Rapid Fire πŸ”₯ | Java & Spring Security #shorts β€” Transcript

by The Curious Coder Β· 342 words Β· 56 segments Β· language en Β· Watch on YouTube

Full transcript

  1. 0:00What is OAuth 2 in Spring Security?
  2. 0:02>> It is an authorization framework used
  3. 0:04for third-party login. Imagine you are
  4. 0:06on LeetCode's website, you want to sign
  5. 0:08in. You click on sign in with Google.
  6. 0:11Does Google share your credentials to
  7. 0:13LeetCode? No. Google never shares
  8. 0:15credentials to any third-party client
  9. 0:17because it can be risky. Instead, Google
  10. 0:20follows a secure protocol for this
  11. 0:21process. This protocol is called OAuth
  12. 0:242.
  13. 0:25>> How does this protocol work?
  14. 0:27>> Instead of sharing the credentials,
  15. 0:29Google shares an access token. LeetCode
  16. 0:31then uses this access token to access
  17. 0:33user's resources. This process includes
  18. 0:36four steps internally.
  19. 0:38>> Explain step one.
  20. 0:39>> Google has an authorization API. When
  21. 0:41user clicks on sign in with Google,
  22. 0:43LeetCode hits this API. In the payload,
  23. 0:46it sends the client ID, callback URL,
  24. 0:48and few other details. Client ID is an
  25. 0:51identifier of the client. LeetCode must
  26. 0:53have registered itself as a third-party
  27. 0:55client for Google. That's why it has a
  28. 0:57client ID and a client secret. Callback
  29. 1:00URL is LeetCode's API which Google will
  30. 1:02hit in step three.
  31. 1:03>> Explain step two.
  32. 1:05>> Google does not share access token yet.
  33. 1:07It opens up a consent screen. It informs
  34. 1:10the user that LeetCode is requesting
  35. 1:12access. The user can choose whether to
  36. 1:14allow or deny the request.
  37. 1:16>> Explain step three.
  38. 1:17>> If permission is given, Google hits the
  39. 1:20callback API. It sends an authorization
  40. 1:22code in this API.
  41. 1:24>> Explain step four.
  42. 1:25>> LeetCode uses this authorization code to
  43. 1:28fetch the access token. It passes this
  44. 1:30auth code in Google's fetch token API
  45. 1:33and gets the access token.
  46. 1:34>> Why doesn't Google share the access
  47. 1:36token directly in step three?
  48. 1:38>> Because step three runs in the browser.
  49. 1:40One could inspect element and steal the
  50. 1:42token from the browser. Hence, token is
  51. 1:44fetched by LeetCode's backend server.
  52. 1:47>> But someone could steal auth code then.
  53. 1:49>> Even if they do, fetch token API
  54. 1:51requires client secret key as well. This
  55. 1:53key is stored in the backend server
  56. 1:55only.

About this transcript

This page contains the full transcript of OAuth 2.0 Rapid Fire πŸ”₯ | Java & Spring Security #shorts by The Curious Coder, generated from the public captions YouTube serves with the video. The transcript has 342 words across 56 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator β€” no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.