Microservice to bring 2FA to self hosted PDSes

Migration to the ref PDS's 2FA #56

Merged pds.dad
targeting main from new-2fa
Merged opened by and assigned to pds.dad
targeting main from new-2fa

As of PDS version 0.4.5036 the ref PDS now has 2FA 🥳 (thanks Emelia!)

  • Fixes a bug where PDS Gatekeeper would have worked just fine till a migration pr, but we forwarded the 2fa token on pds gatekeeper success to the PDS and since it did not see the account had 2fa turned on it denied all password logins, oauth was fine
  • Should auto migrate to use the PDS's new 2FA on start up.
  • Also added a ./examples/check_2fa_handover.sh for checks once upgraded, or if you are a larger PDS operator may be better to update the PDS, take down the PDS, and run the script to move them over then start it all back up.

After this update you can also remove these endpoints from your caddy or other proxy. PDS Gatekeeper still does Captcha's on signup so if you make use of this will probably want to keep it around

end points no longer needed to forward to PDS Gatekeeper, it will proxy them onto the PDS still if you do not remove them and upgrade gatekeeper versions

 /xrpc/com.atproto.server.getSession
 /xrpc/com.atproto.server.updateEmail
 /xrpc/com.atproto.server.createSession
 /@atproto/oauth-provider/~api/sign-in
Commits 0