Skip to content

Commit d3e30f1

Browse files
committed
fix: set webAuthn rpId to top-level domain
1 parent 7434dc0 commit d3e30f1

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"sql-formatter": "^15.6.12",
3131
"tailwind-merge": "^3.4.0",
3232
"tailwindcss": "^4.1.18",
33-
"tempo.ts": "^0.13.0",
33+
"tempo.ts": "^0.14.0",
3434
"unplugin-auto-import": "^20.3.0",
3535
"unplugin-icons": "^22.5.0",
3636
"viem": "^2.44.4",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wagmi.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ import { KeyManager, webAuthn } from 'wagmi/tempo'
66

77
const feeToken = '0x20c0000000000000000000000000000000000001'
88

9+
const rpId = (() => {
10+
const hostname = globalThis.location?.hostname
11+
if (!hostname) return undefined
12+
const parts = hostname.split('.')
13+
return parts.length > 2 ? parts.slice(-2).join('.') : hostname
14+
})()
15+
916
export function getConfig(options: getConfig.Options = {}) {
1017
const { multiInjectedProviderDiscovery } = options
1118
return createConfig({
@@ -22,7 +29,8 @@ export function getConfig(options: getConfig.Options = {}) {
2229
connectors: [
2330
webAuthn({
2431
grantAccessKey: true,
25-
keyManager: KeyManager.http('https://keys.tempo.xyz'),
32+
keyManager: KeyManager.http('https://key-manager.porto.workers.dev'),
33+
rpId,
2634
}),
2735
],
2836
multiInjectedProviderDiscovery,

0 commit comments

Comments
 (0)