Magic link submission returns 400 when form is submitted empty #2396
Unanswered
BitwiseSang
asked this question in
Ideas and Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Submitting the magic link form without entering a code results in a 400 response due to
ActionController::ParameterMissing.This appears to be caused by the controller using
params.expect(:code), which raises when the value is an empty string, even though blank codes are otherwise handled by the authentication flow.Steps to reproduce
/sessions/newpath/sessions/magic_linkDemo
output.mp4
Observed behavior
The request fails with HTTP 400:
Expected behavior
Submitting an empty code should be handled as an invalid code and follow the normal failure path as described by the
invalid_codemethod, rather than raising and returning a 400 response.Beta Was this translation helpful? Give feedback.
All reactions