External Keycloak Oauth Issue

I have been experiencing an issue whereby once I activate OAuth / OpenId I am able to logoug as a forms authenticated user, select SSO and are able to then log in via SSO. Once I then logout from the system, I am unable to sign in again. If I use another admin user and restart the server, I am able to log in again with my original user.

Entry in logs:
backend stdout | [2022-12-13 10:46:07,615] - [90925052-51] 500 Server Error for HTTP GET “/api/v1/users/me”
backend stdout | org.springframework.security.oauth2.core.OAuth2AuthorizationException: [invalid_grant] Token is not active
backend stdout | at org.springframework.security.oauth2.client.http.OAuth2ErrorResponseErrorHandler.handleError(OAuth2ErrorResponseErrorHandler.java:64)
backend stdout | Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
backend stdout | Error has been observed at the following site(s):
backend stdout | *__checkpoint ⇢ com.appsmith.server.configurations.SessionFilter [DefaultWebFilterChain]

Hi, are you trying to do a relogin using a form login or using an SSO?

Hi, I am trying to login using an SSO

Hello! I am sorry you are facing this issue. What is your Appsmith version?
Please also send us the server logs to help us investigate the issue. You can grab the logs by running docker logs -f appsmith.
Or you could follow the steps from this guide on how to get the logs.

Hi @Amelia ,

We currently have it running on a Kubernetes cluster, to which I do not have access. I will have to revert back as soon as I am able to get the logs.