Skip to the content.

Code 301 Class 15 Reading Notes

What is OAuth

  1. What is OAuth? Allows websites and services to share assets among users. It is widely accepted, but has vulnerabilities.
    • An open-standard authorization protocol or framework that describes how unrelated servers and services can safely allow authenticated access to their assets without actually sharing the initial, related, single logon credential.

  2. Give an example of what using OAuth would look like. When you go to log onto a website and it offers on or more opportunities to log on using another website’s/service’s logon. You then click on the button linked to the other website, the other website authenticates you, and the website you were originally connecting to logs you on itself afterward using permission gained from the second website.

  3. How does OAuth work? What are the steps that it takes to authenticate the user?
    • The first website connects to the second website on behalf of the user, using OAuth, providing the user’s verified identity.
    • The second site generates a one-time token and a one-time secret unique to the transaction and parties involved.
    • The first site gives this token and secret to the initiating user’s client software.
    • The client’s software presents the request token and secret to their authorization provider.
    • After authentication, the client is asked to approve th authorization transaction to the second website.
    • USer approves a particular transaction type at first website.
    • User is given the approved access token
    • User gives the approved access token to the first website.
    • First website gives the access token to the second website as proof of authentication on behalf of the user.
    • Second website lets the first website access their site on behalf of the user.
    • User sees a successfully completed transaction occurring.
  4. What is OpenID?
    • “OpenID is for humans logging into machines, OAuth is for machines logging into machines on behalf of humans” - Commenter on StackOverflow.

    • It’s about authentication, something that OAuth is not about.

Authorization and Authentication flows

  1. What is the difference between authorization and authentication? Authentication verifies users, and authorization provides ‘security’ to access protected resources.
  2. What is Authorization Code Flow? Exchanges an Authorization code for a token
  3. What is Authorization Code Flow with Proof Key for Code Exchange (PKCE)? Proof Key for Code Exchange is used to mitigate additional security during authentication for mobile and native applications that use Authorization Code flow.
  4. What is implicit Flow with Form Post? it offers a streamlined workflow if the application needs only an ID token to perform user authentication.
  5. What is Client Credentials Flow? M2M apps use Client Credentials flow for systems authenticating and authorizing the app rather than a user.
  6. What is Device Authorization Flow? When the device asks the user to go to a link on their computer or smartphone and authorize the device.
  7. What is Resource Owner Password Flow? This requests that users provide credentials (password and username) using an interactive form.

Things I want to know more about

<—BACK