The No-PII user registration JWT for adding a user in Twilio's authy requires us to build a JWT from scratch.
I tried looking everywhere on how to get a JWT created using Google Apps Script but wasn't to find the right way to make that happen. It specifically needs to be of HS256 alg.
I require the final payload to look exactly like this -
// Example Payload
{
"iss": "My Authy App",
"iat": 1554395479,
"exp": 1554395879,
"context": {
"custom_user_id": "3YgAIZklGPHmwpJfIC0PDy0E7l763OF3BHZo1p2xKhY",
"authy_app_id": "1111111"
}
}
// Example Header
{
"alg": "HS256",
"typ": "JWT"
}
Can someone please help me with this or perhaps point me to an appropriate article/documentation for this??