okta-react icon indicating copy to clipboard operation
okta-react copied to clipboard

"Remember Me" Not Working

Open david-goldberg opened this issue 2 years ago • 3 comments

Describe the bug

My team is working on a ReactJS single page app. The "Remember Me" checkbox in the signin widget does not appear to be working. Even after logging out, users are still forced to enter their username again. We have the Remember user on sign in and Show option for "Keep me signed in" options enabled for the Okta application. Can I get some guidance on what might still prevent this feature from working?

Reproduction Steps?

In the application, enter the user's username and password into the signin widget, and check the "remember me" checkbox. Finish signing in with 2FA Log out and view the signin page again

SDK Versions

@okta/okta-auth-js 7.2.0 @okta/okta-react 6.7.0 @okta/okta-signin-widget 7.2.1

Additional Information

No response

david-goldberg avatar Jan 22 '24 16:01 david-goldberg

Are you referring to features.rememberMe (saves username to cookie with key ln) or checkbox Keep me signed in?

How "Keep me signed in" works

screenshot_2024-01-22_at_9 11 43_am (1)

screenshot_2024-01-22_at_9 11 43_am

Screenshot 2024-01-26 at 15 40 31

denysoblohin-okta avatar Jan 26 '24 13:01 denysoblohin-okta

I was referring to the "remember me" checkbox on the login screen. It doesn't appear to do anything, and users are forced to re-enter their usernames. This isn't earth-shattering, but we'd like to get this working, as some customers have noticed and reported it broken. image

In reference to features.rememberMe that you mentioned - does that need to be added to the config we pass to the Okta signin widget?

david-goldberg avatar Jan 29 '24 12:01 david-goldberg

I assume you don't use OIE, you use widget v1.

In reference to features.rememberMe that you mentioned - does that need to be added to the config we pass to the Okta signin widget?

Yes.

https://github.com/okta/okta-signin-widget/blob/master/src/v1/models/PrimaryAuth.js#L157 https://github.com/okta/okta-signin-widget/blob/master/src/v2/controllers/FormController.ts#L260

denysoblohin-okta avatar Jan 29 '24 14:01 denysoblohin-okta