Closed matheusAMDS closed 8 months ago
The isAuthenticated
method doesn't call the strategy, it only checks if the user data is in the session and returns that or null.
You need to use the authenticate
method to start the authentication flow, as you can see in the Remix Auth docs.
I was already using authenticator.authenticate
in my /signin route, but I should have used it AGAIN in the /callback route, after i'm redirected back from the Keycloak service. My mistake.
I'm trying to use this lib to connect to a Keycloak auth server. I'm not trying to expand this lib, just trying to use it as the read me shows. When clicking to authenticate, I'm redirected to the Keycloak service to authenticate and when I succeed and redirected back to my /callback route the authenticator.isAuthenticated always returns null:
Which is weird, because the cookies that the Keycloak service sets and the
_session
cookie that I configured with the remix-auth all have content. The_session
cookie is defined as:Also, the remix-auth is configured as such:
I don't think this is a problem with the Keycloak service because again, the session is created successfully.
Should I expand this lib to be able to use it with Keycloak? Or is it really something going wrong here?