mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: add User-Agent and Platform to session
This commit is contained in:
@@ -5,13 +5,9 @@ import (
|
||||
"github.com/go-webauthn/webauthn/protocol/webauthncose"
|
||||
)
|
||||
|
||||
func NewCredentialCreationOptions(subject, address string) (*protocol.PublicKeyCredentialCreationOptions, error) {
|
||||
chl, err := protocol.CreateChallenge()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
func NewCredentialCreationOptions(subject, address string, challenge protocol.URLEncodedBase64) *protocol.PublicKeyCredentialCreationOptions {
|
||||
return &protocol.PublicKeyCredentialCreationOptions{
|
||||
Challenge: chl,
|
||||
Challenge: challenge,
|
||||
User: protocol.UserEntity{
|
||||
DisplayName: subject,
|
||||
ID: address,
|
||||
@@ -19,7 +15,7 @@ func NewCredentialCreationOptions(subject, address string) (*protocol.PublicKeyC
|
||||
Attestation: defaultAttestation(),
|
||||
AuthenticatorSelection: defaultAuthenticatorSelection(),
|
||||
Parameters: defaultCredentialParameters(),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func buildUserEntity(userID string) protocol.UserEntity {
|
||||
|
||||
Reference in New Issue
Block a user