Problem/Motivation
There is an option "Redirect users on login to TFA Setup Page: If the user has the "setup own tfa" permission and has not yet configured TFA they will be redirected to the TFA overview page after login."
If enabled this does not always work.
It only works if you are logging in with a user that is required to setup TFA.
It does not work if TFA is optional for you.
Steps to reproduce
Enable "Redirect users on login to TFA Setup Page".
Login with a user that is not required to setup TFA.
You are not redirected to the TFA setup page.
Proposed resolution
I see 2 possible solutions:
1/ Update the description of this checkbox to inform that this will only redirect if the user is required to setup TFA.
2/ Make the redirect work regardless of the user being required to setup TFA.
I would prefer the 2nd option. This would allow us to make TFA optional, but each time a user logs in they will be asked to set it up.
Looking into the code I could not find an easy fix for this...
Remaining tasks
Choose to either make it work as described, or change the description.
User interface changes
Depends on the chosen solution.
API changes
None
Data model changes
None
Issue fork tfa-3605644
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 #4
mukeshaddweb commentedComment #5
cmlara#3108099: Redirect to validation setup after login without tfa for issue that added this feature. Will need to review it to see if there is any data for the actual intention.
Even if option 1 was chosen contrib modules exist for Drupal that can set a redirect target. We had to do some explicit work in #3485349: Redirect to TFA doesn't work with login destination modules to ensure we worked with them.