Skip to content

Commit

Permalink
docs: improve SecurityError error message for ory elements local (#4205)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Nov 27, 2024
1 parent e6d2d4d commit 0062d45
Show file tree
Hide file tree
Showing 28 changed files with 33 additions and 27 deletions.
1 change: 1 addition & 0 deletions internal/client-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"node_type": "script"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"node_type": "script"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"async": true,
"referrerpolicy": "no-referrer",
"crossorigin": "anonymous",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"type": "text/javascript",
"id": "webauthn_script",
"node_type": "script"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"async": true,
"crossorigin": "anonymous",
"id": "webauthn_script",
"integrity": "sha512-tNeczCRytwdJg3Ncuj/DqWtyToUJS9Nnvt0FUbtglMgj8rowm19qLRKdWebaaDhpxiWxIi/6piZrgEUjOu/MCA==",
"integrity": "sha512-3Z1fDRo1yulzEUWcPb/35UhuKYyNgM/z70Pnidfr1pQGtRZz2xaFinaEyIiolwRTx+0B43ATFQcMsyaDJxC0tA==",
"node_type": "script",
"referrerpolicy": "no-referrer",
"type": "text/javascript"
Expand Down
7 changes: 6 additions & 1 deletion x/webauthnx/js/webauthn.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,12 @@
})
.catch((err) => {
// Calling this again will enable the autocomplete once again.
console.error(err)
if (err instanceof DOMException && err.name === "SecurityError") {
console.error(`A security exception occurred while loading Passkeys / WebAuthn. To troubleshoot, please head over to https://www.ory.sh/docs/troubleshooting/passkeys-webauthn-security-error. The original error message is: ${err.message}`)
} else {
console.error("[Ory/Passkey] An unknown error occurred while getting passkey credentials", err)
}

console.trace(err)
window.abortPasskeyConditionalUI && __oryPasskeyLoginAutocompleteInit()
})
Expand Down

0 comments on commit 0062d45

Please sign in to comment.