Hi @Gerarca,
From the example you shared, the user wouldn’t be ‘logged in’ in the backend server. This API is simply authenticating tokens and returning errors/resources to the front end.
You could return an error and handle it/logout in the front end.
Otherwise, look in to OIDC Back-Channel Logout.