From 7ac3a0fec4e147fcbd8365b355af04732f0309f7 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Fri, 4 Feb 2022 10:34:09 -0500 Subject: [PATCH 1/2] fix: signInOptions context type --- lib/types/api.ts | 4 +++- test/types/auth.test-d.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/types/api.ts b/lib/types/api.ts index 850b7b1bc..883f310a2 100644 --- a/lib/types/api.ts +++ b/lib/types/api.ts @@ -235,7 +235,9 @@ export interface SigninOptions extends AuthenticationOptions { // Only used in Authn V1 relayState?: string; - context?: string; + context?: { + deviceToken?: string; + }; sendFingerprint?: boolean; } diff --git a/test/types/auth.test-d.ts b/test/types/auth.test-d.ts index b37a2c95f..4faa3c023 100644 --- a/test/types/auth.test-d.ts +++ b/test/types/auth.test-d.ts @@ -53,7 +53,10 @@ const authorizeOptions2: TokenParams = { expectType(await authClient.signInWithCredentials({ username: 'some-username', password: 'some-password', - sendFingerprint: true + sendFingerprint: true, + context: { + deviceToken: 'device-1' + } })); expectType(await authClient.signInWithRedirect()); expectType(await authClient.signInWithRedirect({ From 8113c5eb00d5a41f6c29114e7f63c7a40303a473 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Fri, 4 Feb 2022 10:37:05 -0500 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49c9e7d7e..3a7b3f6ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Fixes - [#1071](https://github.com/okta/okta-auth-js/pull/1071) TypeScript: Adds fields for `Input` type in NextStep object +- [#1094](https://github.com/okta/okta-auth-js/pull/1094) TypeScript: Fixes `SigninOptions.context` type ## 6.0.0