Hello, is it possible to add a claim to an access token that contains the user’s ip address? I am considering making the JWT “IP Address Bound” so that you could essentially give your JWT to someone and they couldn’t use it from another place. The receiving API endpoint would validate the IP of the request matches that in the token. I have a way to do this but it’s a bit messy, we consume the OKTA system log and from the log have the IP address of the user when the JWT was issued but it would be simpler to stuff the address in the JWT itself.
The ipAddress should map to the address of your client. Within the hook you can extract this value and then create a new claim with it. Information on creating a token hook can be found in the docs.