If you’re not using the Embedded Wallet with TypeScript but instead working with the Web SDK, you can go here to see how to handle the verification process.
An example client & server demonstrating the below is available here
Implementation
Request IdToken via Client
Once a user has authenticated with an embedded wallet on the client, simply call the corresponding function in order get a JWT from Sequence.
Import JWT libraries and initialize JWKS
From our express server that the JWT was passed to, we simply import our preferred JWT library to verify the information and initialize our JWKS to verify against. It is also important to ensure that your expected audience is set correctly so that the claim will be properly verified.
Decoding JWT and Verifying Claims
Now we can parse the JWT, verify it against our JWKS URI, then validate any of the claims.