Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
// Import the private JWK to a CryptoKey for signing using the stored algorithm
const signingKey = await jose.importJWK(privateKey, algorithm || 'EdDSA');
// Create a minimal DPoP proof JWT (RFC 9449)
// Generate SHA256 hash of the code for c_hash
// Generate SHA256 hash of the code for c_s256
// Convert to BASE64URL as per spec section 1.8
const codeHash = await crypto.subtle
.digest('SHA-256', new TextEncoder().encode(code))
Expand All @@ -239,7 +239,7 @@
);

const dpopPayload = {
c_hash: codeHash,
c_s256: codeHash,
jti: crypto.randomUUID(),
iat: Math.floor(Date.now() / 1000),
htu: url.href,
Expand Down Expand Up @@ -360,7 +360,7 @@
'Content-Type': 'application/x-www-form-urlencoded'
};

// Generate DPoP proof for refresh (no c_hash needed)
// Generate DPoP proof for refresh (no c_s256 needed)
const isDpopEnabled =
selectedScopes.includes('bound_key') && selectedProtocolParams.includes('dpop_jkt');
if (isDpopEnabled) {
Expand Down