As part of https://tangled.org/did:plc:epbi6paber3mxm7237xkwvj5/spec/issues/36 @bnewbold.net mentioned he thinks that the createAccount endpoint has been largely an antipattern and I’m very inclined to agree. In Tranquil we have a bunch of account level features (passkeys, totp, delegation, alternatives to email, etc) that aren’t covered by the core createAccount interface. This has meant we largely extended that interface to cover our additional features, however those extensions are of course not a protocol standard and as such aren’t very useful for ecosystem tooling that wants to remain generic.
createAccount is today used in two flows:
- Initial account (and usually identity) creation
- Account (but not identity) creation during migration
For the former we are slowly but surely aiming to standardise on adopting the existing prompt=create OAuth authorisation parameter from OICD. I think we all more or less agree that that is working quite well, but it does not cover the second use case! This is getting quite important for us at Tranquil now that we are going to remove our in-house migrator in favour of focusing community efforts on PDSMoover and the like. Not having the in-house migrator means there is no longer an option to use those extra Tranquil features from the get-go when migrating an identity. On the other hand @pds.dad doesn’t currently have an option to generically support these features in PDSMoover, so there isn’t really a good way forward.
createAccount has also over time gained a handful of fields that specifically support the reference implementations implementation specific usage of the endpoint. In my opinion these don’t belong anywhere near an endpoint in the com.atproto namespace. Having previously voiced my annoyances about that, @thisismissem.social came in to mention how she also thinks that createAccount is an antipattern we should get rid of, and that the current state of the createAccount schema is a by product of that. Which I also think is a very true assessment.
All of that is to say: I think we should try to completely kill createAccount. We’ve already begun with prompt=create! We just need to standardise that as well as a solution for account creation during migration. I believe the way forward there is also to shunt it to the OAuth level ie. a prompt=migrate of sorts. This is the level at which these potential additional implementation specific features already exist after all. The purpose of this OAuth flow would be to create the new to-be-migrated-to account and return, to the migration tool, an OAuth session for said account that’s usable for the rest of the migration flow (eg. this session must have the appropriate permissions to import the old accounts data to the new account). However this OAuth flow would also need a solution to proving control over the identity in question. createAccount is currently called via inter-service auth during migration. This works quite well but can’t be applied one-to-one to an OAuth flow. Another thing to consider there is that we ideally want this flow to work such that the actual end user only has to log in to their current account once. That’s how it currently works and i believe that to be the most user friendly option. I’m sure there are some things I’m forgetting here that also needs to be hashed out, either way I want to hear everyone else’s thoughts here.