Skip to content

Commit

Permalink
Accept Android app origin in the other two WebAuthn ceremonies too
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Nov 26, 2024
1 parent 82bd83f commit 58f473f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/routers/user.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ noAuthUserController.post('/login-webauthn-finish', async (req: Request, res: Re
clientExtensionResults: credential.clientExtensionResults,
},
expectedChallenge: base64url.encode(challenge.challenge),
expectedOrigin: config.webauthn.origin,
expectedOrigin: [
config.webauthn.origin,
"android:apk-key-hash:DEvegOak87MZWC6pGyDa3hqKnNwptRv8iTeQssaM2ME", // TODO: Extract to config?
],
expectedRPID: config.webauthn.rp.id,
requireUserVerification: true,
authenticator: {
Expand Down Expand Up @@ -416,7 +419,10 @@ userController.post('/webauthn/register-finish', async (req: Request, res: Respo
clientExtensionResults: credential.clientExtensionResults,
},
expectedChallenge: base64url.encode(challenge.challenge),
expectedOrigin: config.webauthn.origin,
expectedOrigin: [
config.webauthn.origin,
"android:apk-key-hash:DEvegOak87MZWC6pGyDa3hqKnNwptRv8iTeQssaM2ME", // TODO: Extract to config?
],
expectedRPID: config.webauthn.rp.id,
});

Expand Down

0 comments on commit 58f473f

Please sign in to comment.