fix(grpc): return CredentialCreationData in webauthn public key (#1075)

This commit is contained in:
Livio Amstutz 2020-12-07 15:22:11 +01:00 committed by GitHub
parent 077a9a628e
commit 12f8c7202c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -431,7 +431,7 @@ func userChangesToAPI(changes *usr_model.UserChanges) (_ []*auth.Change) {
func verifyWebAuthNFromModel(u2f *usr_model.WebAuthNToken) *auth.WebAuthNResponse {
return &auth.WebAuthNResponse{
Id: u2f.WebAuthNTokenID,
PublicKey: u2f.PublicKey,
PublicKey: u2f.CredentialCreationData,
State: mfaStateFromModel(u2f.State),
}
}

View File

@ -1316,6 +1316,7 @@ func (es *UserEventstore) AddU2F(ctx context.Context, userID string) (*usr_model
return nil, err
}
webAuthN.WebAuthNTokenID = tokenID
webAuthN.State = usr_model.MFAStateNotReady
repoUser := model.UserFromModel(user)
repoWebAuthN := model.WebAuthNFromModel(webAuthN)