What is the earliest point in which you could check for the ID token? I am using
okta-react and the sign-in widget (though I’d be open to a more custom solution if it was necessary) and currently the user logs in and then the token is stored and the user has access. What I need to do is run a second verification where we check for the user in a specific database to make sure they are active as an employee. The API is already setup to parse the JWT token and find the user by the associated email, so I have an endpoint to do this check. However, I cannot find a good place to run this verification.
I’ve tried so many ways and I either run into errors or the verification doesn’t always run or something…I would love advice on where to put this secondary verification. Ideally the token/user verification would be ran immediately after the token is retrieved, but we need the token to identify the user so it has to be post-auth. Thank you for your help!