Hi Imesh Gunaratne, I am struggling a little bit to understand the Authorization Code Grant. Let me try and describe my confusion.

My understanding from your article is that:

  1. browser redirects user to auth server
  2. user authenticates using his/her credentials
  3. auth server redirects user to client (backend) with authorization code
  4. backend uses this authorizarion code along with client creds to fetch an access token and refresh token from auth server
  5. let’ say now client displays a “welcome page” to user
  6. User clicks on a button to fetch some data from a resource provider.
    How does this work? The button is on the browser. And so far browser doesn’t have any tokens, codes or secrets stored. So it sends an unsecured request to backend? But that can’t be the case because that means backend has unsecured open endpoints.

I must be missing something.. I just cant figure out what it is.

Scala | Akka | Functional Programming | Distributed Systems

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store