FormStrategy not working. #221
Replies: 1 comment
-
This is not a bug in FormStrategy, the way Authenticator know the user is authenticated is by checking of the session has the key used to store the user data ( When you do So if you return If you know the sign in failed instead of returning throw an error from the strategy, the error will be caught by the strategy and either stored in Basically, the return is for the happy path when the user data was correctly retrieved, throw for any other case. |
Beta Was this translation helpful? Give feedback.
-
I have followed instructions as stated in official and setup my authentication using
FormStrategy
:Now this is my
/signin
routeaction
:export const action = ({ request }) => authenticator.authenticate("email-strategy", request, {
successRedirect: "/homepage"
});
User is wrongfully redirected to "/homepage" despite fact that login has failed in external with returned an undefined object.
Beta Was this translation helpful? Give feedback.
All reactions