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

#8205 Makes conversion of 'true' string to boolean for user attributes case insensitive #8206

Conversation

ybonjour
Copy link
Contributor

@ybonjour ybonjour commented Apr 30, 2021

Description of changes

  • Ignores case when converting a string representing a boolean in user attributes to a boolean value. This allows the user attributes email_verified and phone_number_verified to have the value True written in Cognito without breaking the sign in flow.

Issue #, if available

8205

Description of how you validated changes

I validated the changes by adding unit tests.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ybonjour ybonjour requested a review from elorzafe as a code owner April 30, 2021 12:37
@ybonjour ybonjour changed the title #8205 Allow all cases to convert 'true' string to boolean for user attributes #8205 Makes conversion of 'true' string to boolean for user attributes case insensitive Apr 30, 2021
Copy link
Contributor

@amhinson amhinson left a comment

Choose a reason for hiding this comment

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

This looks great @ybonjour! Thanks for adding the tests as well 🙏

LGTM 👍

@codecov-commenter
Copy link

Codecov Report

Merging #8206 (c06d4df) into main (9883974) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8206      +/-   ##
==========================================
+ Coverage   77.74%   77.76%   +0.01%     
==========================================
  Files         233      233              
  Lines       16282    16283       +1     
  Branches     3474     3475       +1     
==========================================
+ Hits        12659    12662       +3     
+ Misses       3516     3514       -2     
  Partials      107      107              
Impacted Files Coverage Δ
packages/auth/src/Auth.ts 89.26% <100.00%> (+0.01%) ⬆️
...kages/amazon-cognito-identity-js/src/BigInteger.js 89.71% <0.00%> (+0.40%) ⬆️

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 9883974...c06d4df. Read the comment docs.

@github-actions
Copy link

github-actions bot commented May 5, 2022

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants