Someone gets an access token from an IDP. I have an application (backend) that receives this in a request and verifies it against the IDP's published data (/userinfo Endpoint).
As I do not want to make a call to the userinfo endpoint every time a request comes in, I want to save the access_token as key with the value of the Token Endpoint Output with a TTL of the Token Expiry (in Redis). This way, I have a fast lookup time and do not have to request the userinfo every time.
Is there some type of security issue, or is this a common architecture? I could only find information on caching JWTs as blacklisting in the perspective of the IDP itself.
Edit:
I think it is called BFF Pattern. The React Frontend is the OIDC Client that handles the Refresh and Token Logic. The question is, that if an independent Backend (that uses the data in the token / from the /userinfo Endpoint) should implement Caching of the userinfo data or what the usual architecture is for this kind.