Skip to content

Commit b8e3808

Browse files
committed
update migration guide with more scenarios
1 parent 7597b26 commit b8e3808

2 files changed

Lines changed: 369 additions & 21 deletions

File tree

embedded-wallets/authentication/id-token.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,24 +191,24 @@ export async function POST(req: NextRequest) {
191191

192192
// Find matching wallet in JWT
193193
const wallets = (payload as any).wallets || []
194-
const normalizedappKey = appPubKey.toLowerCase().replace(/^0x/, '')
194+
const normalizedAppKey = appPubKey.toLowerCase().replace(/^0x/, '')
195195

196196
const isValid = wallets.some((wallet: any) => {
197197
if (wallet.type !== 'web3auth_app_key') return false
198198

199199
const walletKey = wallet.public_key.toLowerCase()
200200

201201
// Direct key comparison for ed25519 keys
202-
if (walletKey === normalizedappKey) return true
202+
if (walletKey === normalizedAppKey) return true
203203

204204
// Handle compressed secp256k1 keys
205205
if (
206206
wallet.curve === 'secp256k1' &&
207207
walletKey.length === 66 &&
208-
normalizedappKey.length === 128
208+
normalizedAppKey.length === 128
209209
) {
210210
const compressedWithoutPrefix = walletKey.substring(2)
211-
return normalizedappKey.startsWith(compressedWithoutPrefix)
211+
return normalizedAppKey.startsWith(compressedWithoutPrefix)
212212
}
213213

214214
return false

0 commit comments

Comments
 (0)