SlideShare a Scribd company logo
Prepared by – Kumaresh Chandra Baruri
Software Engineer
 Oauth 2 delegates user authentication to the service that holds user account. Like-
 Gmail account provided by Google service.
 FB account by Facebook service.
 It authorizes third-party applications to access that user account. Like- a web
application is using Oauth 2 to login and consequently to use account info.
 OAuth 2 provides authorization flows for web and desktop applications, as well as
mobile devices.
OAuth 2 is an authorization framework that enables applications
— such as Facebook, GitHub, Google or others — to obtain
limited access to user accounts on an HTTP service.
1. Resource Owner: The resource owner is the user who authorizes an
application to access their account. The application’s access to the
user’s account is limited to the scope of the authorization granted
(e.g. read or write access)
2. Client: The client is the application that wants to access the user’s
account. Before it may do so, it must be authorized by the user, and
the authorization must be validated by the API.
3. Resource Server: The resource server hosts the protected user
accounts.
4. Authorization Server: The authorization server verifies the identity of
the user then issues access tokens to the application.
There are four different roles in OAUTH 2.
The following information is required to register the application-
1. Application Name
2. Application Website
3. Redirect URI or Callback URL where the service will redirect the user
after they authorize (or deny).
App means the one which is going to use Oauth 2 for
authorization. Before using Oauth 2 with your
application, developer must register the application with
the service like- Google, FB etc.
1. Client ID
 Publicly exposed string that is used by the service API to identify the
application.
 Used to build authorization URLs that are presented to users.
2. Client Secret
 Used to authenticate the identity of the application to the service API.
 It must be kept private between the application and the API.
After registering the app, the service will issue client
credentials in the form of a client identifier and a client
secret.
1. Authorization Code: used with server-side Applications.
2. Client Credentials: used with Applications that have API access.
3. Device Code: used for devices that lack browsers or have input
limitations.
OAuth 2 supports three primary grant types.
*** This article covers Auth Code based authorization
Application
(Client)
Auth Server
(Service API)
User
(Resource
owner)
User-agent
(Web browser)
1. User authorization request
2. User authorizes Application
3. Authorization code grant
4. Access token request
5. Access token grant
1. **https://cloud.domain.com/v1/oauth/authorize**: the API authorization endpoint
2. client_id=client_id: the application’s client ID (how the API identifies the
application)
3. redirect_uri=CALLBACK_URL: where the service redirects the user-agent after
an authorization code is granted
4. response_type=code: specifies that your application is requesting an
authorization code grant
5. scope=read: specifies the level of access that the application is requesting
Link:
https://cloud.domain.com/v1/oauth/authorize?response_type=code&client_id=CLIE
NT_ID&redirect_uri=CALLBACK_URL&scope=read
1. The user will be prompted by the service to authorize or deny the application
access to their account.
2. Authorize application:
3. The application is requesting read access.
4. The user accepts and permission provided.
When the user clicks the link, button they must first log in to the service to
authenticate their identity
1. Service redirects the user-agent to the application redirect URI along with
Auth Code.
2. Redirection link-
https://app-domain.com/callback?code=AUTHORIZATION_CODE
When the use authorizes the application-
1. Requests an access token from the API by passing the authorization code
along with authentication details, including the client secret, to the API token
endpoint.
2. Access token request would be like-
https://cloud.domain.com/v1/oauth/token?client_id=CLIENT_ID&client_secret=
CLIENT_SECRET&grant_type=authorization_code&code=AUTHORIZATIO
N_CODE&redirect_uri=CALLBACK_URL
After receiving auth code, app
1. API service sends response with –
a) Access Token.
b) Refresh Token.
2. Response will be like this –
In case of valid auth code-
1. https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2
2. https://www.slideshare.net/kumareshbaruri/authentication-and-single-sign-on-sso
3. https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
Introduction to OAuth2

More Related Content

Similar to Introduction to OAuth2

OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...Good Dog Labs, Inc.
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectJacob Combs
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_appNuhil Mehdy
 
Extended Security with WSO2 API Management Platform
Extended Security with WSO2 API Management PlatformExtended Security with WSO2 API Management Platform
Extended Security with WSO2 API Management PlatformWSO2
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)Knoldus Inc.
 
Protecting your APIs with OAuth 2.0
Protecting your APIs with OAuth 2.0Protecting your APIs with OAuth 2.0
Protecting your APIs with OAuth 2.0Ubisecure
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
OAuth2 Introduction
OAuth2 IntroductionOAuth2 Introduction
OAuth2 IntroductionArpit Suthar
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsStefan Weber
 
Silicon Valley Code Camp 2009: OAuth: What, Why and How
Silicon Valley Code Camp 2009: OAuth: What, Why and HowSilicon Valley Code Camp 2009: OAuth: What, Why and How
Silicon Valley Code Camp 2009: OAuth: What, Why and HowManish Pandit
 

Similar to Introduction to OAuth2 (20)

OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
 
Oauth 2.0
Oauth 2.0Oauth 2.0
Oauth 2.0
 
Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_app
 
Extended Security with WSO2 API Management Platform
Extended Security with WSO2 API Management PlatformExtended Security with WSO2 API Management Platform
Extended Security with WSO2 API Management Platform
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Authentication and single sign on (sso)
Authentication and single sign on (sso)Authentication and single sign on (sso)
Authentication and single sign on (sso)
 
Protecting your APIs with OAuth 2.0
Protecting your APIs with OAuth 2.0Protecting your APIs with OAuth 2.0
Protecting your APIs with OAuth 2.0
 
OAuth
OAuthOAuth
OAuth
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
OAuth2 Introduction
OAuth2 IntroductionOAuth2 Introduction
OAuth2 Introduction
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated Permissions
 
OAuth Tokens
OAuth TokensOAuth Tokens
OAuth Tokens
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the Wild
 
Silicon Valley Code Camp 2009: OAuth: What, Why and How
Silicon Valley Code Camp 2009: OAuth: What, Why and HowSilicon Valley Code Camp 2009: OAuth: What, Why and How
Silicon Valley Code Camp 2009: OAuth: What, Why and How
 
OAuth v2.0 demo
OAuth v2.0 demoOAuth v2.0 demo
OAuth v2.0 demo
 

More from Kumaresh Chandra Baruri

More from Kumaresh Chandra Baruri (9)

Introduction to git, a version control system
Introduction to git, a version control systemIntroduction to git, a version control system
Introduction to git, a version control system
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Fundamentasl of DFD
Fundamentasl of DFDFundamentasl of DFD
Fundamentasl of DFD
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Variations of git merging
Variations of git mergingVariations of git merging
Variations of git merging
 
Git branching policy and review comment's prefix
Git branching policy and review comment's prefixGit branching policy and review comment's prefix
Git branching policy and review comment's prefix
 
Introduction to flutter's basic concepts
Introduction to flutter's basic conceptsIntroduction to flutter's basic concepts
Introduction to flutter's basic concepts
 
WEB API Gateway
WEB API GatewayWEB API Gateway
WEB API Gateway
 
Model based testing using finite state machine(FSM)
Model based testing using finite state machine(FSM)Model based testing using finite state machine(FSM)
Model based testing using finite state machine(FSM)
 

Recently uploaded

Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationHelp Desk Migration
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)Max Lee
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabbereGrabber
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring SoftwareMera Monitor
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzisteffenkarlsson2
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 

Recently uploaded (20)

Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring Software
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 

Introduction to OAuth2

  • 1. Prepared by – Kumaresh Chandra Baruri Software Engineer
  • 2.  Oauth 2 delegates user authentication to the service that holds user account. Like-  Gmail account provided by Google service.  FB account by Facebook service.  It authorizes third-party applications to access that user account. Like- a web application is using Oauth 2 to login and consequently to use account info.  OAuth 2 provides authorization flows for web and desktop applications, as well as mobile devices. OAuth 2 is an authorization framework that enables applications — such as Facebook, GitHub, Google or others — to obtain limited access to user accounts on an HTTP service.
  • 3. 1. Resource Owner: The resource owner is the user who authorizes an application to access their account. The application’s access to the user’s account is limited to the scope of the authorization granted (e.g. read or write access) 2. Client: The client is the application that wants to access the user’s account. Before it may do so, it must be authorized by the user, and the authorization must be validated by the API. 3. Resource Server: The resource server hosts the protected user accounts. 4. Authorization Server: The authorization server verifies the identity of the user then issues access tokens to the application. There are four different roles in OAUTH 2.
  • 4. The following information is required to register the application- 1. Application Name 2. Application Website 3. Redirect URI or Callback URL where the service will redirect the user after they authorize (or deny). App means the one which is going to use Oauth 2 for authorization. Before using Oauth 2 with your application, developer must register the application with the service like- Google, FB etc.
  • 5. 1. Client ID  Publicly exposed string that is used by the service API to identify the application.  Used to build authorization URLs that are presented to users. 2. Client Secret  Used to authenticate the identity of the application to the service API.  It must be kept private between the application and the API. After registering the app, the service will issue client credentials in the form of a client identifier and a client secret.
  • 6. 1. Authorization Code: used with server-side Applications. 2. Client Credentials: used with Applications that have API access. 3. Device Code: used for devices that lack browsers or have input limitations. OAuth 2 supports three primary grant types. *** This article covers Auth Code based authorization
  • 7. Application (Client) Auth Server (Service API) User (Resource owner) User-agent (Web browser) 1. User authorization request 2. User authorizes Application 3. Authorization code grant 4. Access token request 5. Access token grant
  • 8. 1. **https://cloud.domain.com/v1/oauth/authorize**: the API authorization endpoint 2. client_id=client_id: the application’s client ID (how the API identifies the application) 3. redirect_uri=CALLBACK_URL: where the service redirects the user-agent after an authorization code is granted 4. response_type=code: specifies that your application is requesting an authorization code grant 5. scope=read: specifies the level of access that the application is requesting Link: https://cloud.domain.com/v1/oauth/authorize?response_type=code&client_id=CLIE NT_ID&redirect_uri=CALLBACK_URL&scope=read
  • 9. 1. The user will be prompted by the service to authorize or deny the application access to their account. 2. Authorize application: 3. The application is requesting read access. 4. The user accepts and permission provided. When the user clicks the link, button they must first log in to the service to authenticate their identity
  • 10. 1. Service redirects the user-agent to the application redirect URI along with Auth Code. 2. Redirection link- https://app-domain.com/callback?code=AUTHORIZATION_CODE When the use authorizes the application-
  • 11. 1. Requests an access token from the API by passing the authorization code along with authentication details, including the client secret, to the API token endpoint. 2. Access token request would be like- https://cloud.domain.com/v1/oauth/token?client_id=CLIENT_ID&client_secret= CLIENT_SECRET&grant_type=authorization_code&code=AUTHORIZATIO N_CODE&redirect_uri=CALLBACK_URL After receiving auth code, app
  • 12. 1. API service sends response with – a) Access Token. b) Refresh Token. 2. Response will be like this – In case of valid auth code-