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

Fix decoding jwt when encoded payload contains utf8 characters #101

Merged
merged 2 commits into from
Dec 5, 2019
Merged

Fix decoding jwt when encoded payload contains utf8 characters #101

merged 2 commits into from
Dec 5, 2019

Conversation

abelptvts
Copy link
Contributor

@abelptvts abelptvts commented Dec 3, 2019

Description

This PR fixes a bug where social logins or sign ups do not work when the name of a given account contains utf-8 characters, like 'Á'.

References

Closes #100

Testing

See Issue #100

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • none required
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@abelptvts abelptvts requested a review from a team December 3, 2019 08:37
@joshcanhelp
Copy link
Contributor

@abelptvts - Really appreciate the fix here! Can you add a test case for the special characters that this handles?

@joshcanhelp joshcanhelp requested review from joshcanhelp and removed request for a team December 3, 2019 16:56
@abelptvts
Copy link
Contributor Author

@joshcanhelp thanks, will do as soon as I can.

@abelptvts
Copy link
Contributor Author

@joshcanhelp I added a test case, which fails with
Buffer.from(data, 'base64').toString('ascii')
but passes if used with 'utf8'. Thanks in advance!

Copy link
Contributor

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

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

@abelptvts - Thank you!

@joshcanhelp joshcanhelp merged commit 7928648 into auth0:master Dec 5, 2019
@joshcanhelp joshcanhelp added CH: Fixed tiny Tiny review labels Dec 5, 2019
@joshcanhelp
Copy link
Contributor

Forced a rebase for an incomplete CI check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Social login breaks when account name contains utf-8 characters.
2 participants