my system is composed of several entities
- IS - an identity provider (Identity Server 4)
- C - an hybrid client with refresh_token
EP - OAuth 2.0 external provider
When a user tries to log in C, he is redirected to IS
Once in IS, he presses EP and sign in with his credentials
using EP_code_grant, the IS can get an EP_access_token+EP_refresh_token
upon getting and parsing these, IS now trusts the user and generates a pair IS_access_token+IS_refresh_token so the user can access client C
So far, so good
my problem is when the EP entity disables the user on his system, my user will still be logged for IS_access_token lifetime and will use IS_refresh_token to generate new IS_access_tokens. therefore, potentially, the user will never be logged out from the system (only when refresh_token expires... and that can be for a long time)
Any suggestions?
My current idea is to store the EP_access_token+EP_refresh_token in a custom cookie, and before using IS_refresh_token, get a new EP_access_token+EP_refresh_token using EP_refresh_token, therefore, if the EP can actually emit a new EP_access_token+EP_refresh_token then it is safe to generate a new IS_access_token+IS_refresh_token using IS_refresh_token
If this is possible, how can I do this in Identity Server 4?
Thanks in advance