Guidance for enabling "remember me" functionality for social providers

I am able to enable ‘remember me’ so that the user is not logged out when they use username/password form and check the ‘remember me’ box. I believe it sets a REMEMBER_ME cookie in the users browser

However, i am not sure how i can do this for social login (e.g. google/facebook) Is there anyway to add the ‘remember me’ checkbox for social logins, and have it behave the same way as for username/password logins?

If it is not natively supported, what parts of the code should i look at to add this functionality?

This is possible, but it is not natively supported in the Keycloak standard distribution. You would have to build a couple of custom Authenticators to store a cookie with the user’s social IdP, and do an IdP redirect when that cookie is encountered during an authentication flow. Look at these two built-in Authenticators to see how those things work:

Please let me know if there’s anything I can do to help!

1 Like