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(@aws-amplify/auth): Default hash to # when null #6279

Merged
merged 3 commits into from
Aug 10, 2020

Conversation

ericclemmons
Copy link
Contributor

Issue #, if available: Fixes #6059

Description of changes:

When a URL doesn't contain #..., parse(url) returns { hash: null }, which creates a run-time error for hash.substr(1).


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

@ericclemmons ericclemmons requested a review from elorzafe as a code owner July 9, 2020 21:12
@ericclemmons ericclemmons changed the title hash can be null, so default to # to prevent errors fix(@aws-amplify/auth): Default hash to # when null Jul 9, 2020
@ericclemmons ericclemmons self-assigned this Jul 9, 2020
@ericclemmons ericclemmons added bug Something isn't working OAuth For issues related to OAuth labels Jul 9, 2020
@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #6279 into main will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6279   +/-   ##
=======================================
  Coverage   73.26%   73.26%           
=======================================
  Files         208      208           
  Lines       12920    12920           
  Branches     2524     2525    +1     
=======================================
  Hits         9466     9466           
  Misses       3263     3263           
  Partials      191      191           
Impacted Files Coverage Δ
packages/auth/src/OAuth/OAuth.ts 56.11% <0.00%> (ø)

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 c1256bb...2ad14de. Read the comment docs.

@davewthompson
Copy link

Can we get this fix in, please? It's breaking my app at the moment.

@ericclemmons ericclemmons requested a review from iartemiev August 10, 2020 18:28
Copy link
Contributor

@ashika01 ashika01 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ericclemmons ericclemmons merged commit eb97194 into aws-amplify:main Aug 10, 2020
@ericclemmons ericclemmons deleted the 6059-fix-hash-parsing branch August 10, 2020 18:55
nubpro pushed a commit to nubpro/amplify-js that referenced this pull request Oct 2, 2020
@github-actions
Copy link

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 Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working OAuth For issues related to OAuth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pasring error in oauth callback handling
3 participants