Id token as jwt ,how to extract

Hi All,

Using open id I want to redirect to URL for authentication and in response will get the idtoken ,accesstoken ,refreshtoken and other parameter.

How to extract the IDtoken as JWT ,Sub here is the userID ,

How to use this SUB to login back again in outssytem.

Please suggest 

Hi,

there are many forge components which handle oauth flows for you. eg. The Microsoft Login Reactive components if you want to use azure ad.

if you want to do it on your own you can use this JWT component from forge to decode and optionally validate a JSON web token. You can then use the decoded claims for any authorization tasks you need. For an OutSystems login you would take the sub claim, then query the User entity (from System) to lookup the user and then use the User_Login server action (also from System) to perform the actual login.

Best

Stefan

PS: You can also create a user of course :-)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.