Skip to content

Commit

Permalink
#16: fix "can't finish registration: Error validating origin" error
Browse files Browse the repository at this point in the history
  • Loading branch information
egregors committed Aug 8, 2024
1 parent 899d4b6 commit 3d20f59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions _example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
const userKey = "pkUser"

func main() {
proto := "http"
host := "localhost"
port := ":8080"
origin := fmt.Sprintf("%s://%s%s", proto, host, port)
proto := "http" // "http" | "https"
sub := "" // "" | "login."
host := "localhost" // "localhost" | "example.com"
port := ":8080" // port needs only for starting the server, WebauthnConfig.RPOrigins should not contain port
origin := fmt.Sprintf("%s://%s%s", proto, sub, host)

storage := NewStorage()

Expand Down

0 comments on commit 3d20f59

Please sign in to comment.