Skip to content
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

Merged
merged 23 commits into from
Nov 6, 2023
Merged

Conversation

dholms
Copy link
Collaborator

@dholms dholms commented Nov 1, 2023

No description provided.

@dholms dholms mentioned this pull request Nov 1, 2023
@dholms dholms changed the base branch from main to import-repo November 1, 2023 16:21
Base automatically changed from import-repo to pds-v2 November 6, 2023 19:43
@dholms dholms merged commit 844c659 into pds-v2 Nov 6, 2023
11 checks passed
@dholms dholms deleted the delegate-create-account branch November 6, 2023 19:43
const { did, handle, email, password, inviteCode, signingKey, plcOp } =
ctx.entrywayAgent
? await validateInputsForEntrywayPds(ctx, input.body)
: await validateInputsForLocalPds(ctx, input.body)
Copy link
Contributor

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?

Copy link
Collaborator

@devinivy devinivy Dec 20, 2023

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())

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants