aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/webauthn/webauthn.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/auth/webauthn/webauthn.go b/modules/auth/webauthn/webauthn.go
index ec60a86100..d08f7bf7cc 100644
--- a/modules/auth/webauthn/webauthn.go
+++ b/modules/auth/webauthn/webauthn.go
@@ -6,14 +6,13 @@ package webauthn
import (
"encoding/binary"
"encoding/gob"
- "net/url"
"code.gitea.io/gitea/models/auth"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/setting"
- "github.com/duo-labs/webauthn/protocol"
- "github.com/duo-labs/webauthn/webauthn"
+ "github.com/go-webauthn/webauthn/protocol"
+ "github.com/go-webauthn/webauthn/webauthn"
)
// WebAuthn represents the global WebAuthn instance
@@ -23,13 +22,13 @@ var WebAuthn *webauthn.WebAuthn
func Init() {
gob.Register(&webauthn.SessionData{})
- appURL, _ := url.Parse(setting.AppURL)
+ appURL, _ := protocol.FullyQualifiedOrigin(setting.AppURL)
WebAuthn = &webauthn.WebAuthn{
Config: &webauthn.Config{
RPDisplayName: setting.AppName,
RPID: setting.Domain,
- RPOrigin: protocol.FullyQualifiedOrigin(appURL),
+ RPOrigin: appURL,
AuthenticatorSelection: protocol.AuthenticatorSelection{
UserVerification: "discouraged",
},