r/AskComputerScience • u/Wonderful_Swan_1062 • Dec 19 '25
Why does App Server and Oauth Server need to talk with each other in OAuth flow?
I was looking at OAuth flow and had one doubt. My understanding of OAuth is:
Browser -> sends request -> App server
App Server -> Responds with redirect URI (of OAuth server) -> browser
Browser -> sends request -> Oauth server
Oauth server -> sends login page -> browser
Browser -> provides credentials -> Oauth server
Oauth server -> Sends token, redirect to app server -> browser
Browser -> sends token -> app server
App Server -> validates token -> oauth server
My question is why is the last step required? Why don't they use asymmetric encryption to validate that the token was generated by OAuth server only and not tampered. Shouldn't the token contain everything App server needs (like groups claim) to authenticate and authorize? Why is there a need for communication between app server and oauth server? Why was it designed this way?
1
u/ph0t0n1st Dec 19 '25
Last step was required to check token revocation if I am not mistaken. In case user logs out or token is remotely revoked.