implementing remember me functionality Skip to main content
https://support.okta.com/help/answers?id=9062a000000qukxqac&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Ammadul HaqAmmadul Haq 

implementing remember me functionality

Is there some build in api call available to add remember me functionality if signin widget is not used?

Thanks!
Chris HancockChris Hancock (Okta, Inc.)
Hi Ammadul Haq, 

With regards to the "Remember Me" there are two areas in which this can be used however these are not specific API's.

The first is for the username and password on your login form this is not managed by Okta and we would not be able to provide the functionality unless using the widget as such you would need to implement your own code to generate a cookie to remember the users username this way when they next navigate to your login form the username is prepopulated. We would not recommend storing the password.

The second area is the "Remember Device" this is related to Multifactor and is managed by Okta. In order for this to work you will need to have multifactor policies defined in your org along with a sign on policy that prompts for factor Per Device or Per Session. This can be defined under Admin --> Security --> Authentication --> Sign On

If you have the correct policies in place and your login form handles multifactor challenges you will need to ensure you define a unique ID for the users device and send this through in each primary authentication request. 
The second compnent is to provide the user with an option to remember device and if selected send the following parameter in the verify call.
?rememberDevice=true
/api/v1/authn/factors/:fid/verify?rememberDevice=true

We do provide documentation on the remember deive component which I have shared below, I would recommend reading through these articles and if you have any further questions related to this please feel free to log a support ticket as we can provide further assistance. 

Context Object (https://developer.okta.com/docs/api/resources/authn#context-object) - This outlines the deviceToken and recommendations on its use. In conjunction with the Primary Auth, linked below.

Primary Auth with Trusted Application (https://developer.okta.com/docs/api/resources/authn#primary-authentication-with-trusted-application) - Provides information on the authentication call and adding deviceToken and recommendation on when to use this. 

Verify Factor (https://developer.okta.com/docs/api/resources/authn.html#verify-factor) - Provides details on how to verify MFA challenges and the parameters which include rememberDevice. 

Hope the above information was helpful.

Thank you,