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

fix key name and username swap #861

Merged
merged 1 commit into from Jun 15, 2023
Merged

fix key name and username swap #861

merged 1 commit into from Jun 15, 2023

Conversation

TylerNoblett
Copy link
Collaborator

Fix a bug where, when adding a second credential, the credential name was replaced by the username

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -388,7 +388,7 @@ func (a WebAuthn) beginRegistration(w http.ResponseWriter, r *http.Request, brid
} else if info.RegistrationType == LinkCredential {
user = makeLinkingWebAuthnUser(info.UserID, info.Username, info.CredentialName)
} else { // Add Credential
user = makeAddCredentialWebAuthnUser(info.UserID, info.CredentialName, info.Username, info.ExistingCredentials)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easy fix - these arguments were just in the wrong order

func makeAddCredentialWebAuthnUser(userID int64, username, credentialName string, creds []AShirtWebauthnCredential)...

@jkennedyvz jkennedyvz merged commit d18bd8e into main Jun 15, 2023
9 checks passed
@TylerNoblett TylerNoblett deleted the tn/fix-key-name-error branch October 18, 2023 14:30
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.

None yet

2 participants