Update to login and session APIs: “Email 2FA” #2435
pfrazee
announced in
Dev Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all! Quick update on some changes rolling out to the session APIs. We are currently putting the final touches on OAuth, which is going to fully replace the session management in atproto.
However, we decided to roll out an interim “Email 2FA” feature for some added security. The email auth factor is not applied to app password logins, so unless you’re asking users to input their primary credentials, you do not need to do anything to handle these cases. (Note: We highly recommend using app passwords for your clients.)
Here’s the effects this update had:
emailAuthFactor?: boolean
to the output ofgetSession
andcreateSession
to indicate to the client whether the user uses an email auth factor during login.createSession
will throw an errorAuthFactorTokenRequired
indicating that an email has been sent to the user containing an auth token.createSession
endpoint may then be hit again including both the password and auth tokenauthFactorToken
, which should successfully create the session.updateEmail
endpoint may be used to enable the email factor, passingemailAuthFactor: true
.Again, the email auth factor is not applied to app password logins, so unless you’re asking users to input their primary credentials, you do not need to do anything to handle this update. You can see how we implemented these updates in our client here: bluesky-social/social-app#3602
Beta Was this translation helpful? Give feedback.
All reactions