AuthPage remember me
Hi
I'm using Antd for UI. In my default login page, I want to implement the 'Remember me' feature. I suppose this should trigger a method in the auth- provider, that would handle it? Perhaps setting it to local storage? In the documentation, I only see how to customize the styling, but I can't find any example of the implementation
https://refine.dev/docs/api-reference/core/components/auth-page/#rememberme
Can someone point me to the right direction?
Thanks
| refine
component from refine is an authentication page that can be used to login, register, forgot password, and update password.
5 Replies
Hi @jaco0670. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hi,
You're correct that the 'Remember me' feature should be handled in the
authProvider
. In the extracts provided, there's an example of how to customize the styling of the 'Remember me' component, but not the implementation itself.
However, there's an example of how the form values are passed to the authProvider
's login
method:
In this example, the remember
value is passed to the login
method. You can use this value to decide whether to store the user's authentication information in local storage or not.
Unfortunately, the provided extracts don't have a complete example of implementing the 'Remember me' feature. You can refer to the refine documentation (https://refine.dev/docs) for more information and examples.
I hope this helps!
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------Overview | refine
What is refine?
<@486442088280358912> kapa.ai is still learning and improving, please let us how it did by reacting below
deep-jade•2y ago
Hey @jaco0670,
You can customize your login page and than you can pass any parameters to
useLogin
hook after that you can handle these parameters in your authProvider
. Just like @kapa.ai said.quickest-silverOP•2y ago
thanks, somehow I missed the 'remember me ' option, to be passed to the login method