-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delegate create account from entryway #1794
Conversation
const { did, handle, email, password, inviteCode, signingKey, plcOp } = | ||
ctx.entrywayAgent | ||
? await validateInputsForEntrywayPds(ctx, input.body) | ||
: await validateInputsForLocalPds(ctx, input.body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ternary is backwards! Or rather, it logically does the right thing, but the names of the two functions are backwards. Unless I'm mistaken, validateInputsForEntrywayPds
contains the Local PDS validation logic, and vice versa. The functions should perhaps have their names swapped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's confusing! Will take a look at fixing the names, adding better comments 👍 There are three different setups kicking around, and this package handles two of them:
- Being an entryway, e.g. bsky.social (not covered here)
- Being a pds behind an entryway, e.g. the mushroom servers (
validateInputsForEntrywayPds()
) - Being a pds that doesn't use an entryway, e.g. a self-hoster (
validateInputsForLocalPds()
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh that makes sense, thanks
No description provided.