Problem/Motivation
When the TOTP plugin is setup for the first time, the form doesn't get correctly redirected to the TFA overview form. This is because Form API doesn't see the redirect response. This leaves the visitor confused, like the TFA hasn't been setup correctly.
Steps to reproduce
Setup TFA TOTP for the first time.
Proposed resolution
Add a redirect response to the submit form.
Remaining tasks
Review and commit patch.
| Comment | File | Size | Author |
|---|
Issue fork tfa-3488682
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
dubs commentedComment #3
dubs commentedAh - wrong patch! Correct one here.
Comment #4
cmlaraIs this possibly a duplicate of #3451488: Full Setup not working on 8.x-1.7 or are they separate faults?
Drupal.org (and the TFA project) have migrated away from patch files. The infrastructure to test and merge has been replaced with Merge Requests.
More details on working with merge requests may be found in Using GitLab to Contribute to Drupal.
Setting needs-work to allow for feedback on if issues are related, and to convert to MR.
Comment #5
dubs commentedThis is a different issue here, and at somepoint I'll make a MR for this change.
Comment #6
cmlaraMight also be related to #3478989: One setup step remaining, two QR Code Scans required
Comment #7
sayan_k_dutta commentedPicking it up, creating MR.
Comment #9
sayan_k_dutta commentedCreated the MR !100.
Please anyone check for failing PHPUnit tests, as I have no knowledge of it.
Comment #10
cmlaraNeeds work as the proposed patch implies there is a deeper root fault that should be identified and fixed.
Comment #11
sayan_k_dutta commentedAgain tried to reproduce the error in Drupal 10.4.0, there seems to be no issue for 2.x branch of the modulew. On first time Tfa setup with TOTP, in Tfa configuration page if the "Redirect users on login to TFA Setup Page" option is enabled, the user is correctly redirected to the tfa overview form asking the user to set up tfa.
Comment #12
cmlara@sayan_k_dutta 'Redirect users on login to TFA Setup Page' impacts the Login logic this issue apepars to be about the Token Provisioning (TFASetupForm) which is indepdnet of the login logic.
Comment #13
cmlarasetRedirect() is overridden if the form is 're-building'. We do trigger from rebuild in multiple places. This is the most likely cause and should be investigated with a debugger to validate.