This implements 2FA (email only at the moment).
I have run this on my test account and tested various flows:
- Turning 2FA on and off through the Bluesky app
- Turning 2FA on and the updating my email address to a new one, and observing that 2FA is disabled
- Logging in with 2FA enabled
- Using a 3rd party app (tangled) to log into my account via OAuth and being able to provide the 2FA token (including providing the wrong password and token as well to ensure that when the correct password and token is provided, the flow continues as normal)
- Logging into my PDS directly via the
/account/loginroute with 2FA turned on - Create a new account and observing that the
two_factor_typeis preset tonone
The UI for the the PDS /account/login screen is far from perfect and could use some improvements. For example once you're entered the handle and password, the page refreshes with the new token input, but the handle and password fields are now empty :(
i can deal with the merge conflict, that just poor timing haha