during third party consent flow one of my clients ...
# ask-a-descoper
a
during third party consent flow one of my clients is getting a
JWT Inactive for too long failed to handle third party application authorize finish logic
error. didnt find explanation for that error in the docs, can someone please elaborate on what does this error mean?
c
@Kevin Gao @Anvi Banga @Mrunank Pawar any thoughts?
m
This error indicates that the JWT was inactive or expired due to inactivity beyond the allowed time window. The token used during the third-party consent flow was idle for too long before the flow could complete, causing it to become invalid. To resolve this, you can try reinitiating the authorization process to ensure a fresh and active token is used throughout the flow. It may also help to check your token timeout configurations if this happens frequently.
a
its pretty wierd since i get this error a few seconds after initiating the auth flow. during investigation i did see that the refresh and session tokens does not contain a DCT claim even though i pass the client through a select tenant screen (with the Switch tenant component) do i need to do any other action to load the selected tenant into the DCT claim?
@Chris Carper @Mrunank Pawar - tagging you here since i noticed is now relatively not visible 🙂
m
• It’s possible that the issue is because the token is cached. The client or browser might still be using an old or expired token instead of fetching a new one. Clearing the cache or forcing a token refresh should help ensure that the latest token is being used. • For the
dct
claim to appear in the JWT, make sure it’s enabled in JWT Templates. You’ll need to turn on the “Set active tenant claim automatically” option and verify that this JWT template is applied to your project.
a
as for the first point, we cleared the cache, it worked for a while but quickly after it appeared again. as for the DCT, i have this active in my curent jwt profile
m
For the DCT, in the Authorization Claims, can you please check if the Authorization Claims Format is using the
Current Tenant, no tenant reference
?
a
actualy that would be problematic for me as i rely on having the tenants claim
c
That config still has the tenant roles/permissions on the JWT, but I am curious if the flow actually finishes since the DCT didn't update, which is kind of what Mrunank is saying. 1. I log in as a general user (not in a tenant) 2. I go to run this flow, which allows tenant select, the flow doesn't finish, so a new token isn't stored with the DCT selected. So correct me if I'm wrong, the core of it is still getting around
JWT Inactive for too long failed to handle third party application authorize finish logic
@Guy Pilosof @Tal Aharoni thoughts on this error specifically?
a
Ok that makes sense, so you guys are saying that the user is starting the auth with a cached token which is about to expire, it expires mid auth and then the flow fails. The customer is experiencing this a lot so just “try again” is a hard answer for me to give him. Is there some way that i can refresh the token or enforce re-auth in this acenario?
c
Can you share the flow? We'll take a look there. Will want to make sure it's using the load user action which should get the user's current token
a
inbound-apps-user-tenant-consent (1).json
@Chris Carper - is that what you were looking for?
c
Yes. Looking.
Reaching out internally on this and we'll circle back
🙏 1
a
Hey @Chris Carper is there any update ?
k
Hey @Asaf Rosentswaig, can you try and remove the
Load User
action from the flow, to see if that's what is causing the issue with utilizing the cached token? If removing that action fixes the problem, then we can get on a call and try to figure out why the cached token even exists to begin with. When running through a flow with inbound apps, the flow should run all of the time, maybe there's session inactivity setting that are unique to the tenant you're referring to that is causing this to happen? Something like that