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

Use DID instead of username to identify users internally #14

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

emlun
Copy link
Member

@emlun emlun commented Sep 4, 2023

On the WebAuthn branch we saw that users signed up with only a passkey, and without a username and password at all, were not able to obtain credentials, because the backend flows crashed because the account's username was null. This fixes these issues by consistently using the DID instead of the username to identify users internally - the username is used only for login, until the user's DID can be looked up and used instead from then on.

@gkatrakazas
Copy link
Member

gkatrakazas commented Sep 5, 2023

@emlun, I'd like to suggest a potential improvement to our login/signup process. What if we utilize the user's chosen username as their unique identifier? When a user signs up, we can perform a check to ensure that the selected username is not already in use, thereby maintaining uniqueness across all accounts.

This approach offers a more user-friendly experience by allowing individuals to have distinctive usernames instead of utilizing a more complex DID.

What are your thoughts on this approach?

@emlun
Copy link
Member Author

emlun commented Sep 5, 2023

Yes, note that this PR doesn't affect how the user identifies themself during login, or what name is displayed to the user. The username is still used for that. This just modifies the internal data flows to use the DID instead of the username.

Also related: on today's meeting we decided to aim to eliminate username/password login and only offer WebAuthn login. We will still need some "name" for user accounts that we can display to the user, but we will not need that name for login and it will not need to be unique. This change would also need us to use a different identifier internally.

@gkatrakazas gkatrakazas merged commit b4c9efb into master Sep 7, 2023
2 checks passed
@emlun emlun deleted the stable-userid branch September 7, 2023 11:31
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.

2 participants