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

feat: remove MyInfo error_description support #1323

Merged
merged 2 commits into from
Mar 9, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Mar 9, 2021

Problem

When the MyInfo consent flow returns an error, we support both error-description (note hyphen) and error_description (note underscore) in the query parameters. This is because we were previously unsure which one would be returned - the documentation says that it should be error_description, but the sandbox and staging APIs both returned error-description. Now that we have confirmed that production returns error-description as well, we can drop support for error_description.

Part of #1234

Solution

Drop support for error_description. For safety, in case MyInfo decides to add other query parameters, also add unknown(true) to the Joi validation.

Mockpass previously returned error_description, but since this PR which went into v2.6.5, it now returns error-description, so I upgraded Mockpass to make the dev environment match production.

Tests

  • Log in to a MyInfo form but click "Cancel" on the consent page. Ensure that you see the MyInfo error when redirected back to the form, and that there is matching message in the logs (message: 'MyInfo returned error from consent flow') which contains an errorDescription.

@mantariksh mantariksh marked this pull request as ready for review March 9, 2021 08:43
Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

Remove .unknown(true) before merge? It's good as long as the parameters we're using are validated.

@mantariksh mantariksh merged commit c11581b into develop Mar 9, 2021
@mantariksh mantariksh deleted the fix/remove-error_description branch March 9, 2021 09:09
@tshuli tshuli mentioned this pull request Mar 10, 2021
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.

None yet

2 participants