Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support email callback and password reset in widget #1014

Closed
wants to merge 1 commit into from

Conversation

aarongranick-okta
Copy link
Contributor

@aarongranick-okta aarongranick-okta commented Dec 3, 2021

  • removes stateTokenExternalId
  • email verify callback is now expected to contain two parameters: state and otp
  • adds support for passing otp to idx pipeline to statisfy credentials.passcode on a challenge authenticator of type != "password" (basically an alias for verificationCode)
  • modifies logic for shared storage - will clear shared on all states including error states. the only except is "terminal" state which will not clear shared storage so that the transaction can continue in another tab.
  • updates samples to display error message with OTP code
  • updates IDX documentation for callbacks
  • adds support for recoveryToken
  • updates to support SIW using authJS as IDX client:
    • exchangeCodeForTokens option for IDX methods (SIW will pass false, it has its own logic to support server-side web apps)
    • additional properties are returned on the IDX transaction (neededToProceed, context, actions)
    • exposes transaction meta methods on the IDX namespace
  • new option for transactionManager: saveLastResponse. if false, idx responses will not be cached

@aarongranick-okta aarongranick-okta force-pushed the ag-OKTA-449647-otp branch 2 times, most recently from 63edc19 to 7894237 Compare December 10, 2021 17:54
@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2021

Codecov Report

Merging #1014 (7f54738) into dev-6 (71f18af) will decrease coverage by 0.09%.
The diff coverage is 95.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##            dev-6    #1014      +/-   ##
==========================================
- Coverage   92.52%   92.42%   -0.10%     
==========================================
  Files         134      134              
  Lines        3664     3722      +58     
  Branches      751      775      +24     
==========================================
+ Hits         3390     3440      +50     
- Misses        274      282       +8     
Impacted Files Coverage Δ
lib/idx/remediators/Base/VerifyAuthenticator.ts 100.00% <ø> (ø)
lib/idx/types/idx-js.ts 100.00% <ø> (ø)
lib/idx/types/index.ts 100.00% <ø> (ø)
lib/options.ts 100.00% <ø> (ø)
lib/types/Transaction.ts 76.00% <ø> (ø)
lib/util/index.ts 100.00% <ø> (ø)
lib/TransactionManager.ts 90.78% <62.50%> (-1.76%) ⬇️
lib/PromiseQueue.ts 96.15% <66.66%> (-3.85%) ⬇️
lib/idx/remediate.ts 94.05% <80.00%> (-0.90%) ⬇️
lib/idx/transactionMeta.ts 93.22% <92.30%> (-6.78%) ⬇️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71f18af...7f54738. Read the comment docs.

@aarongranick-okta aarongranick-okta force-pushed the ag-OKTA-449647-otp branch 2 times, most recently from 8496b7a to 97e68ef Compare December 17, 2021 20:42
@aarongranick-okta aarongranick-okta marked this pull request as ready for review December 17, 2021 22:42
@@ -59,9 +66,77 @@ This module provides convenience methods to support popular scenarios to communi

### Concepts

#### Flow

In addition to the default authentication flow, this SDK supports several pre-defined flows, such as [register](#idxregister) and [recoverPassword](#idxrecoverpassword). A flow can be started by calling one of the available [flow entrypoints](#flow-entrypoints) or by passing a valid flow identifier string to [`startTransaction`](#idxstarttransaction). The `flow` is saved with the transaction which enables the [proceed](#idxproceed) method to corrrectly handle remediations without additional context. Starting a new flow discards any existing in-progress transaction of a different type. For example, if an authentication flow is in-progress, a call to [authenticate](#idxauthenticate) or [proceed](#idxproceed) will continue using the current transaction but a call to [register](#idxregister) or [recoverPassword](#idxrecoverpassword) will start a new transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe mention their Org configurations matter for flows like recoverPassword and register? I think authenticate is the only flow that works "out-of-the-box"

@aarongranick-okta aarongranick-okta changed the title email verify callback contains otp parameter support email callback and password reset in widget Dec 21, 2021
docs/idx.md Outdated

The `flow` will be set to `default` unless otherwise specified in [`idx.startTransaction`](#idxstarttransaction)

#### Callbacks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe Redirect Callbacks?

@aarongranick-okta aarongranick-okta force-pushed the ag-OKTA-449647-otp branch 4 times, most recently from 505a6bd to 76edf7a Compare January 7, 2022 00:15
@aarongranick-okta aarongranick-okta changed the base branch from master to dev-6 January 7, 2022 00:17
email verify callback contains otp parameter

adds new option withCredentials

adds new option codeChallenge

pass authenticator if password is provided up front

use jasmine framework in wdio

improve layout in test app

add more time for token renew tests

prefer login direct, avoid issue with popup OKTA-454796

add exchangeCodeForTokens option

loosen remediate restrictions on default flow

update samples

throw exceptions from run (breaking change)

consolidate idx interface under the idx namespace

activationToken and recoveryToken as config option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants