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