Skip to main content

Safer account linking and sign-in method changes

Adding, changing or removing a way to sign in now asks you to confirm it is you. You can also change or remove your phone number and email, and signing in with Google, GitHub or Apple no longer attaches itself to an existing account just because the email matches.

Security​

  • What you need to do (API clients): these endpoints may now answer 403 with "code": "reauth_required": POST /api/v1/auth/:provider/bind-url, DELETE /api/v1/user/identities/:id, POST and DELETE /api/v1/user/bind/phone, POST and DELETE /api/v1/user/bind/email, POST /api/v1/user/password/set, POST /api/v1/user/setup, and POST /api/v1/user/2fa/enable/start. Call POST /api/v1/user/reauth, then resend the request with the returned token in the X-Reauth-Token header. Requests made within 10 minutes of signing in do not need this step.
  • POST /api/v1/user/reauth accepts your password or a code from POST /api/v1/user/reauth/code, plus your authenticator code or a recovery code when two-factor authentication is on. The token lasts 5 minutes and only works in the session that requested it. Five failed attempts within 15 minutes pause this verification for the rest of that window; wrong passwords sent to POST /api/v1/user/password/change and POST /api/v1/user/2fa/disable count toward the same limit (429, "code": "reauth_locked"). A wrong password and a wrong second factor return the same invalid_credentials.
  • Codes for this check are only sent to the phone number or email already on your account.
  • Changing or removing a verified phone number or email, or removing a linked Google, GitHub or Apple account, signs out your other devices.

Changed​

  • What you need to do: if you signed in with Google, GitHub or Apple using the email of an existing account that has not linked that provider, sign in the way you originally did, then link the provider from your account security settings. Accounts that are already linked keep working.
  • Signing in with a third-party account whose verified email already belongs to an account now stops with a message (/auth/callback?error=email_exists) instead of linking automatically, so an unlinked provider stays unlinked.
  • POST /api/v1/user/bind/phone and POST /api/v1/user/bind/email now replace an already bound phone number or email instead of refusing. The response includes changed.
  • Errors from the phone and email endpoints now include a stable code next to error: phone_taken, email_taken, phone_unchanged, email_unchanged, invalid_code, invalid_phone, no_phone, no_email, last_login_method.

Added​

  • DELETE /api/v1/user/bind/phone and DELETE /api/v1/user/bind/email remove a phone number or email, as long as another way to sign in remains.
  • The account security page offers Change and Remove for phone and email, and asks you to confirm your identity when needed.

Fixed​

  • Email addresses are matched regardless of letter case, so a differently capitalized address no longer causes a failed binding, a failed sign-in or a duplicate account.
  • Requesting another email code within a minute no longer invalidates the code you already received.
  • The send-code button in the phone and email dialogs no longer stays disabled with a countdown after the dialog is closed and reopened.
  • An unlinked Google account no longer reappears after a service restart.
  • Binding a phone number or email that another account holds returns a clear error instead of a server error, including when two requests arrive at the same time.
  • Signing in, binding a phone number or email, or setting or resetting a password no longer undoes another change made to the account at the same moment.
  • Removing a phone number, an email or a linked account is refused when the password left behind could not be used to sign in, since password sign-in always needs a phone number or email.