Skip to content

Instantly share code, notes, and snippets.

@callezenwaka
Created December 17, 2021 00:12
Show Gist options
  • Save callezenwaka/14826372ee971af5bc18e980999c0721 to your computer and use it in GitHub Desktop.
Save callezenwaka/14826372ee971af5bc18e980999c0721 to your computer and use it in GitHub Desktop.
Setup a POST => request;
Replace firebase api key in the url => "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key={FIREBASE_API_KEY}"
Pass the following params in the body of the request
{
"email": "<email>",
"password": "<password>",
"returnSecureToken": true
}
To create an automated setting of this token, you can add the following code in the Tests tab of your auth request:
var jsonData = JSON.parse(responseBody);
pm.globals.set("id_token", jsonData.idToken);
Send the post request to generate token
For your Postman requests, on another tab:
set the Bearer Token in Authorization to {{id_token}}
Test token by logging with console.log(pm.globals.get("id_token"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment