Skip to content

fix: ensure to use pathname instead of '/' when clearing query parameters#544

Open
frederikprijck wants to merge 1 commit intomainfrom
fix/pathname
Open

fix: ensure to use pathname instead of '/' when clearing query parameters#544
frederikprijck wants to merge 1 commit intomainfrom
fix/pathname

Conversation

@frederikprijck
Copy link
Copy Markdown
Member

Changes

Using window.history.replaceState({}, '', '/'); can, and will cause issues when the application is not served from root.

That particular code has the only purpose to remove the query string, not change the URL. Changing the URL happens only when we are using the router.

Whenever a user would handle the code exchange on https://example.com/foo?code=abc, we would update the URL to be https://example.com, instead of https://example.com/foo.

References

Closes #424

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

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.

URL is trimmed to '/' during handleRedirectCallback() invoke

1 participant