Search code examples
spring-bootspring-securityoauth-2.0jwtgoogle-oauth

How google OAuth sends JWT?


I am trying to understand how google OAuth works. I have implemented this oauth tutorial from spring docs. Below is the screen shot of network traffic occurred when I selected my account from the list of accounts shown by the google.

Resource 1

enter image description here enter image description here

Resource 2

enter image description here

Resource 3

enter image description here

I guess OAuth works on JWT, and once username and password is correct, it should return JWT. However, I am not able to find JWT returned by google in above network traffic. Am I understanding it wrong?


Solution

  • OAuth2 may use JWT but it is not a requirement even though I believe (not sure on that one) that it would be used between Spring-security and Google.

    However the communication is between the server and Google so you would not get the token in the front-end. If you get a token in your front-end it would most probably one generated from your own back-end.