2

Postman pre-request script to automatically get an id_token from AWS Cognito usi...

 1 year ago
source link: https://gist.github.com/DanielLaberge/5c311b7adb835efc004fcc8e1ea7822a
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Instantly share code, notes, and snippets.

Postman pre-request script to automatically get an id_token from AWS Cognito using a Refresh Token and save it for reuse

mevansLA commented on Aug 13, 2021

edited

Was having an issue with an invalid refresh token (line return at the end of the variable). Took a while to track down, I suggest updating line 51-52 with the following:

        if (err || res.code != 200) { 
            if(!err)
                console.log(res.status);
            else
                console.log(err);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK