Skip to content

Instantly share code, notes, and snippets.

@DavidKlempfner
Created October 22, 2023 05:08
Show Gist options
  • Save DavidKlempfner/62111e72fc2614a6de0fcc665966ca2d to your computer and use it in GitHub Desktop.
Save DavidKlempfner/62111e72fc2614a6de0fcc665966ca2d to your computer and use it in GitHub Desktop.
EditPaymentInfo
$scope.editPaymentInfo = function () {
$q.when(api.hasUserRecentlyDone2fa()).then(function (data) {
if (!data.HasUserRecentlyDone2fa) {
// Redirect the browser to Okta for 2FA
const returnUrl = window.location.pathname + '?showPaymentInfoDialog=true';
window.location.href = '/Authentication/StepUpAuthentication?returnUrl=' + encodeURIComponent(returnUrl);
}
else {
// Show edit payment details dialog
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment