Skip to content

Commit 8ca89e5

Browse files
committed
Merge branch 'task/webauthn-rporigins' into staging
2 parents d9052f8 + 9776871 commit 8ca89e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • api/internal/middleware/auth

api/internal/middleware/auth/auth.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ func NewCookiePASession(id string) *fiber.Cookie {
139139
func NewWebAuthn(cfg config.APIConfig) *webauthn.WebAuthn {
140140
var webAuthn *webauthn.WebAuthn
141141
config := &webauthn.Config{
142-
RPDisplayName: cfg.Name, // Display Name for your site
143-
RPID: cfg.FQDN, // Generally the FQDN for your site
144-
RPOrigins: []string{cfg.ApiAllowOrigin}, // The origin URLs allowed for WebAuthn requests
142+
RPDisplayName: cfg.Name, // Display Name for your site
143+
RPID: cfg.FQDN, // Generally the FQDN for your site
144+
RPOrigins: strings.Split(cfg.ApiAllowOrigin, ","), // The origin URLs allowed for WebAuthn requests
145145
}
146146

147147
webAuthn, err := webauthn.New(config)

0 commit comments

Comments
 (0)