NOTE: This implementation isn't RFC-compliant
because it isn't running over HTTPS.
Source: RFC 6749 section 4.3
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret&
client_secret=Es1JuAIbb7QRikQAN5wfbZPBLJA...
POST https://my-auth-provider.com/oauth/token
grant_type=password&
client_id=first-party&
username=superuser&
password=super-secret&
client_secret=Es1JuAIbb7QRikQAN5wfbZPBLJA...&
scope=me.name me.hash
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.appdata
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.metadata
https://www.googleapis.com/auth/drive.metadata.readonly
https://www.googleapis.com/auth/drive.photos.readonly
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.scripts
{ "token_type": "Bearer", "expires_in": 3600, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N...", "refresh_token": "def502009dbc45718a2f75c4660f136e...", }
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N...",
"refresh_token": "def502009dbc45718a2f75c4660f136e...",
}
{ "token_type": "Bearer", "expires_in": 3600, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N...", "refresh_token": "def502009dbc45718a2f75c4660f136e...", }
{ "token_type": "Bearer", "expires_in": 3600, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N...", "refresh_token": "def502009dbc45718a2f75c4660f136e...", }
{ "aud": "first-party", "jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...", "iat": 1579872090, "nbf": 1579872090, "exp": 1579875690, "sub": "1", "scopes": ["me.name"] }
{
"aud": "first-party",
"jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...",
"iat": 1579872090,
"nbf": 1579872090,
"exp": 1579875690,
"sub": "1",
"scopes": ["me.name"]
}
{ "aud": "first-party", "jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...", "iat": 1579872090, "nbf": 1579872090, "exp": 1579875690, "sub": "1", "scopes": ["me.name"] }
{ "aud": "first-party", "jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...", "iat": 1579872090, "nbf": 1579872090, "exp": 1579875690, "sub": "1", "scopes": ["me.name"] }
{ "aud": "first-party", "jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...", "iat": 1579872090, "nbf": 1579872090, "exp": 1579875690, "sub": "1", "scopes": ["me.name"] }
{
"aud": "first-party",
"jti": "396485e81a10b18a26af53ea04bd672edb635c5c34d...",
"iat": 1579872090,
"nbf": 1579872090,
"exp": 1579875690,
"sub": "1",
"scopes": ["me.name"]
}
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N...",
"refresh_token": "def502009dbc45718a2f75c4660f136e...",
}
POST https://my-auth-provider.com/oauth/token
client_id=first-party&
grant_type=refresh_token&
refresh_token=def502009dbc45718a2f75c4660f136e...
POST https://my-auth-provider.com/oauth/token
client_id=first-party&
grant_type=refresh_token&
refresh_token=def502009dbc45718a2f75c4660f136e...
POST https://my-auth-provider.com/oauth/token
grant_type=client_credentials&
client_id=machine-to-machine&
client_secret=super-secret-client-secret-string
POST https://my-auth-provider.com/oauth/token
grant_type=client_credentials&
client_id=machine-to-machine&
client_secret=super-secret-client-secret-string
POST https://my-auth-provider.com/oauth/token
grant_type=client_credentials&
client_id=machine-to-machine&
client_secret=super-secret-client-secret-string
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=token&
scope=me.name&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://spa.mysite.com/auth#
access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N......&
token_type=Bearer&
expires_id=3600&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://spa.mysite.com/auth#
access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N......&
token_type=Bearer&
expires_id=3600&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://spa.mysite.com/auth#
access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N......&
token_type=Bearer&
expires_id=3600&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://spa.mysite.com/auth#
access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1N......&
token_type=Bearer&
expires_id=3600&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://accounts.google.com/o/oauth2/auth?access_type=offline&
client_id=835284083712.apps.googleusercontent.com&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&
response_type=code&
scope=email+profile&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://accounts.google.com/o/oauth2/auth?access_type=offline&
client_id=835284083712.apps.googleusercontent.com&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&
response_type=code&
scope=email+profile&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://accounts.google.com/o/oauth2/auth?access_type=offline&
client_id=835284083712.apps.googleusercontent.com&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&
response_type=code&
scope=email+profile&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
https://slides.com/users/auth/google_oauth2/callback?
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
scope=email+profile+openid+...&
authuser=0&
session_state=92238ad3186b0d73713263061d6f5a0aeddbf844..78ff&
prompt=none
POST https://www.googleapis.com/oauth2/v4/token
grant_type=authorization_code&
client_id=835284083712.apps.googleusercontent.com&
client_secret=ifIhadThisIcouldImpersonateSlidesDotCom&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&code=4%2FvQFTLSQfFlG3jAzgmX2Dg...
POST https://www.googleapis.com/oauth2/v4/token
grant_type=authorization_code&
client_id=835284083712.apps.googleusercontent.com&
client_secret=ifIhadThisIcouldImpersonateSlidesDotCom&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&code=4%2FvQFTLSQfFlG3jAzgmX2Dg...
POST https://www.googleapis.com/oauth2/v4/token
grant_type=authorization_code&
client_id=835284083712.apps.googleusercontent.com&
client_secret=ifIhadThisIcouldImpersonateSlidesDotCom&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&code=4%2FvQFTLSQfFlG3jAzgmX2Dg...
POST https://www.googleapis.com/oauth2/v4/token
grant_type=authorization_code&
client_id=835284083712.apps.googleusercontent.com
&client_secret=ifIhadThisIcouldImpersonateSlidesDotCom&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&code=4%2FvQFTLSQfFlG3jAzgmX2Dg...
POST https://www.googleapis.com/oauth2/v4/token
grant_type=authorization_code&
client_id=835284083712.apps.googleusercontent.com&
client_secret=ifIhadThisIcouldImpersonateSlidesDotCom&
redirect_uri=https%3A%2F%2Fslides.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...
{ "token_type": "Bearer", "expires_in": 3600, "access_token": "xtnYoXsKMQSAR4kA0RlV4SxDERpcVTtYi...", "refresh_token": "o62ibFrTJmea3gTivWOih54Anujelg5A...", "id_token": "JZzEAMTgCcK3vPBkzby.KzwcoAd3Cji.TgK3vP..." }
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "xtnYoXsKMQSAR4kA0RlV4SxDERpcVTtYi...",
"refresh_token": "o62ibFrTJmea3gTivWOih54Anujelg5A...",
"id_token": "JZzEAMTgCcK3vPBkzby.KzwcoAd3Cji.TgK3vP..."
}
{ "iss": "https://accounts.google.com", "azp": "1234987819200.apps.googleusercontent.com", "aud": "1234987819200.apps.googleusercontent.com", "sub": "10769150350006150715113082367", "at_hash": "HK6E_P6Dh8Y93mRNtsDB1Q", "hd": "example.com", "email": "jsmith@example.com", "email_verified": "true", "iat": 1353601026, "exp": 1353604926, "nonce": "0394852-3190485-2490358" }
{ "iss": "https://accounts.google.com", "azp": "1234987819200.apps.googleusercontent.com", "aud": "1234987819200.apps.googleusercontent.com", "sub": "10769150350006150715113082367", "at_hash": "HK6E_P6Dh8Y93mRNtsDB1Q", "hd": "example.com", "email": "jsmith@example.com", "email_verified": "true", "iat": 1353601026, "exp": 1353604926, "nonce": "0394852-3190485-2490358" }
{
"iss": "https://accounts.google.com",
"azp": "1234987819200.apps.googleusercontent.com",
"aud": "1234987819200.apps.googleusercontent.com",
"sub": "10769150350006150715113082367",
"at_hash": "HK6E_P6Dh8Y93mRNtsDB1Q",
"hd": "example.com",
"email": "jsmith@example.com",
"email_verified": "true",
"iat": 1353601026,
"exp": 1353604926,
"nonce": "0394852-3190485-2490358"
}
{ "iss": "https://accounts.google.com", "azp": "1234987819200.apps.googleusercontent.com", "aud": "1234987819200.apps.googleusercontent.com", "sub": "10769150350006150715113082367", "at_hash": "HK6E_P6Dh8Y93mRNtsDB1Q", "hd": "example.com", "email": "jsmith@example.com", "email_verified": "true", "iat": 1353601026, "exp": 1353604926, "nonce": "0394852-3190485-2490358" }
{ "iss": "https://accounts.google.com", "azp": "1234987819200.apps.googleusercontent.com", "aud": "1234987819200.apps.googleusercontent.com", "sub": "10769150350006150715113082367", "at_hash": "HK6E_P6Dh8Y93mRNtsDB1Q", "hd": "example.com", "email": "jsmith@example.com", "email_verified": "true", "iat": 1353601026, "exp": 1353604926, "nonce": "0394852-3190485-2490358" }
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=code&
code_challenge=XsgVoUAhKm9ZIDP3N53P2crEiz2X3KszLhIPKN...&
code_challenge_method=S256
scope=me.name me.hash&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=code&
code_challenge=XsgVoUAhKm9ZIDP3N53P2crEiz2X3KszLhIPKN...&
code_challenge_method=S256
scope=me.name me.hash&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
https://my-auth-provider.com/oauth/authorize&
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
response_type=code&
code_challenge=XsgVoUAhKm9ZIDP3N53P2crEiz2X3KszLhIPKN...&
code_challenge_method=S256
scope=me.name me.hash&
state=214c1e90730143beca60feb6e9da0807fa68f7be82ef34fa
POST https://my-auth-provider.com/oauth/token
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
grant_type=authorization_code&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
code_verifier=ovMQw176WZXkkm3uFQ4PtwKV...
POST https://my-auth-provider.com/oauth/token
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
grant_type=authorization_code&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
code_verifier=ovMQw176WZXkkm3uFQ4PtwKV...
POST https://my-auth-provider.com/oauth/token
client_id=single-page-app&
redirect_uri=https%3A%2F%2Fspa.mysite.com%2Fauth&
grant_type=authorization_code&
code=4%2FvQFTLSQfFlG3jAzgmX2Dg...&
code_verifier=ovMQw176WZXkkm3uFQ4PtwKV...