pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
648 stars 154 forks source link

Add tf-setup endpoint that uses a state_token. #991

Closed jwag956 closed 5 months ago

jwag956 commented 5 months ago

/tf-setup now returns a state_token (in addition to prior behavior of setting state in the session). This state_token can be used at /tf-setup/ to complete a 2FA setup. This enables /tf-setup with an authentication token and no session cookie - and follows the same model as /us-setup.

Notes: actual 2FA code validation during login still requires a session. The old session way of /tf-setup is still there - no backwards compat issues.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.45%. Comparing base (4c33560) to head (cc9c5dc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #991 +/- ## ========================================== + Coverage 98.44% 98.45% +0.01% ========================================== Files 36 36 Lines 4622 4667 +45 ========================================== + Hits 4550 4595 +45 Misses 72 72 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.