3

I am using Azure Logic app serving a DialogFlow app. When the webhook communicates for an authorized user, it sends a payload with JWT token of the user and its details. What is the easiest way to decode the JWT token from within Logic App?

The JWT token contains user details that I wish to extract. I see libraries that are usable in node and c#. Is there any means from within Azure that can return me decoded JSON? There JWT is part of the JSON payload from the Webhook POST as below

"user": {
                "lastSeen": "2019-01-18T03:20:47Z",
                "idToken":##########JWTToken here#############",
                "locale": "en-US",
                "userId": "ABwppHExLpdPbT-LwqXEMzzN7UsdDYLsfdngTtcX-iiTpTgUUt1ZH-HFI4Ets2L3z275rqEVsRoIOmVWrMI"
            },

All resources I researched like jwt.ms decode it within the browser environment. I hope there is a better way than writing an Azure Function to do it?

Iam Techie
  • 53
  • 5
  • what kind of infos do you need ? auth token should only be used for auth/security purpose. Can you not pass the user infos in a difference way ? – Thomas Jan 20 '19 at 09:04
  • The user details are embedded as a part of the JWT token and is set so by Google's dialogflow which I dont have control over. Just need to decode the JWT token and wondering if there is a way to pass in token and get back JSON claims of key /value which would include the user profile. – Iam Techie Jan 20 '19 at 18:46
  • check this answer, not sure if it is possible: https://stackoverflow.com/questions/52753920/how-to-extract-the-email-id-and-user-name-which-is-linked-with-the-google-home. Maybe using azure b2c will help but not sure – Thomas Jan 20 '19 at 20:21

0 Answers0