Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(auth): T3 Connect keeps working when device clocks drift #17186

Closedevolveperformance(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/17186/headopened View on GitHub

Showing 25 changed files with 30 additions and 5 deletions (loading 22).

x
0 of 25 viewed, 25 left
13 additions and 0 deletionsapps/mobile/src/features/cloud/dpop.test.tsModified
View file
@@ -134,6 +134,19 @@
}).pipe(Effect.provide(Dpop.layer)),
​
+ it.effect("signs with the requested issued-at time", () =>
+ Effect.gen(function* () {
+ const proof = yield* createDpopProof({
+ method: "POST",
+ url: "https://desktop.example.test/oauth/token",
+ issuedAtSeconds: 1_700_000_000,
+ proofKey: yield* generateDpopProofKeyPair(),
+ });
+​
+ expect(proofIat(proof.proof)).toBe(1_700_000_000);
+ }).pipe(Effect.provide(Dpop.layer)),
+ );
+​
it.effect("signs DPoP proofs with RFC 9449 htu normalization", () =>
Effect.gen(function* () {
const proofKey = yield* generateDpopProofKeyPair();
2 additions and 1 deletionapps/mobile/src/features/cloud/dpop.tsModified
View file
@@ -247,6 +247,7 @@
readonly method: string;
readonly url: string;
readonly accessToken?: string;
+ readonly issuedAtSeconds?: number;
readonly proofKey?: DpopProofKeyPair;