Skip to content

Instantly share code, notes, and snippets.

@sandeepb1
Created August 8, 2019 20:06
Show Gist options
  • Save sandeepb1/ad9ab88baba023ebf56a415df0df4611 to your computer and use it in GitHub Desktop.
Save sandeepb1/ad9ab88baba023ebf56a415df0df4611 to your computer and use it in GitHub Desktop.
Postman v2.1 Collection to perform a Passwordless verification with Auth0
{
"info": {
"_postman_id": "5e946c22-f739-4a79-b052-ec05ca61ebf8",
"name": "Auth0 Passwordless",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "1. Send Code",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"client_id\": \"CLIENT_ID_HERE\",\n \"connection\": \"email\",\n \"email\": \"s@ndeep.me\",\n \"send\": \"code\",\n \"authParams\": {\n \"scope\": \"openid profile email\",\n \"state\": \"PLPOKL\"\n }\n}"
},
"url": {
"raw": "https://DOMAIN.auth0.com/passwordless/start",
"protocol": "https",
"host": [
"DOMAIN",
"auth0",
"com"
],
"path": [
"passwordless",
"start"
]
},
"description": "Using the Passwordless Start endpoint to send a code to the email address or phone number provided."
},
"response": [
{
"name": "1. Send Code",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"client_id\": \"CLIENT_ID_HERE\",\n \"connection\": \"email\",\n \"email\": \"EMAIL@DOMAIN.COM\",\n \"send\": \"code\",\n \"authParams\": {\n \"scope\": \"openid profile email\",\n \"state\": \"PLPOKL\"\n }\n}"
},
"url": {
"raw": "https://DOMAIN.auth0.com/passwordless/start",
"protocol": "https",
"host": [
"DOMAIN",
"auth0",
"com"
],
"path": [
"passwordless",
"start"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Thu, 08 Aug 2019 19:42:40 GMT"
},
{
"key": "Content-Type",
"value": "application/json; charset=utf-8"
},
{
"key": "Content-Length",
"value": "78"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "ot-tracer-spanid",
"value": "39fcc07d1300e38b"
},
{
"key": "ot-tracer-traceid",
"value": "6c524ffa6845e54b"
},
{
"key": "ot-tracer-sampled",
"value": "true"
},
{
"key": "X-Auth0-RequestId",
"value": "42d257e7d800dbfd9410"
},
{
"key": "X-RateLimit-Limit",
"value": "50"
},
{
"key": "X-RateLimit-Remaining",
"value": "49"
},
{
"key": "X-RateLimit-Reset",
"value": "1565293432"
},
{
"key": "Cache-Control",
"value": "private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15724800"
},
{
"key": "X-Robots-Tag",
"value": "noindex, nofollow, nosnippet, noarchive"
}
],
"cookie": [],
"body": "{\n \"_id\": \"5d3e04d70275194013d2f7c3\",\n \"email\": \"EMAIL@DOMAIN.COM\",\n \"email_verified\": false\n}"
}
]
},
{
"name": "2. Verify",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"client_id\": \"CLIENT_ID_HERE\",\n \"connection\": \"email\",\n \"password\": \"CODE_FROM_EMAIL\",\n \"username\": \"EMAIL@DOMAIN.COM\",\n \"scope\": \"openid offline_access\",\n \"response_token\": \"token\",\n \"sso\": \"false\",\n \"grant_type\": \"password\"\n}"
},
"url": {
"raw": "https://DOMAIN.auth0.com/oauth/token",
"protocol": "https",
"host": [
"DOMAIN",
"auth0",
"com"
],
"path": [
"oauth",
"token"
]
},
"description": "Using the OAuth based endpoints to verify the retrieved code"
},
"response": [
{
"name": "Verification",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"client_id\": \"CLIENT_ID_HERE\",\n \"connection\": \"email\",\n \"password\": \"CODE_FROM_EMAIL\",\n \"username\": \"EMAIL@DOMAIN.COM\",\n \"scope\": \"openid offline_access\",\n \"response_token\": \"token\",\n \"sso\": \"false\",\n \"grant_type\": \"password\"\n}"
},
"url": {
"raw": "https://DOMAIN.auth0.com/oauth/token",
"protocol": "https",
"host": [
"DOMAIN",
"auth0",
"com"
],
"path": [
"oauth",
"token"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Thu, 08 Aug 2019 19:48:49 GMT"
},
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Content-Length",
"value": "2567"
},
{
"key": "Connection",
"value": "keep-alive"
},
{
"key": "ot-tracer-spanid",
"value": "6a74304d3e4f0029"
},
{
"key": "ot-tracer-traceid",
"value": "0720da1a66573510"
},
{
"key": "ot-tracer-sampled",
"value": "true"
},
{
"key": "X-Auth0-RequestId",
"value": "cd01ad711719489e8885"
},
{
"key": "X-RateLimit-Limit",
"value": "100"
},
{
"key": "X-RateLimit-Remaining",
"value": "98"
},
{
"key": "X-RateLimit-Reset",
"value": "1565295412"
},
{
"key": "Cache-Control",
"value": "private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=15724800"
},
{
"key": "X-Robots-Tag",
"value": "noindex, nofollow, nosnippet, noarchive"
}
],
"cookie": [],
"body": "{\n \"access_token\": \"ACCESS_TOKEN_GOES_HERE\",\n \"refresh_token\": \"REFRESH_TOKEN_HERE\",\n \"id_token\": \"ID_TOKEN_HERE\",\n \"scope\": \"openid profile email address phone read:current_user update:current_user_metadata delete:current_user_metadata create:current_user_metadata create:current_user_device_credentials delete:current_user_device_credentials update:current_user_identities offline_access\",\n \"expires_in\": 86400,\n \"token_type\": \"Bearer\"\n}"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment