Dynamic RememberMe outside of email + password?
What is the best way to implement this? Right now it seems it can only be set in either the auth config or the authClient.signIn method?
2 Replies
What do you mean? In the signIn.email call it accepts a rememberMe boolean. Not sure if i understand what you mean
You can sign in with other methods like Google, Email OTP. Those don't have a remember me option
If I have to use the middleware hook or something that's fine, just not sure what is the best way to go about it.
Below is a code snippet for the email otp sign in option - it ignores the 3rd parameter (dontRememberMe) for createSession for some reason. I think the plugins should enforce some kind of standard, there are some that have callbackURL for e.g. but others without it, then likewise, some with errorCallbackURL.
And in the standard email+password sign in option it uses the third parameter as shown below
In my case I have 3 sign up/in options, Google, Email OTP and Email+Password. Certain things aren't consistent between them, like remember me, which if the user deselects won't work if they use the Google or Email OTP options. I can try to work around this using the hooks possibly, but then I don't know if there is some standard method to handle this so that I avoid make changes that may easily break with updates.