question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HandleAuthResponse clears the history.state and makes `current` undefined

See original GitHub issue

Describe the bug After authentication window.history.state gets cleared, and current route becomes undefined which causes issue for routing related features.

To Reproduce The problematic line: https://github.com/aws-amplify/amplify-js/blob/main/packages/auth/src/Auth.ts#L1942

window.history.replaceState(
    {},
    null,
    (this._config.oauth as AwsCognitoOAuthOpts).redirectSignIn
);

Expected behavior The current history should be kept. https://github.com/vuejs/vue-router-next/issues/366#issuecomment-678622415

window.history.replaceState(
  window.history.state,
  '',
  (this._config.oauth as AwsCognitoOAuthOpts).redirectSignIn
);

Code Snippet Please provide a code snippet or a link to sample code of the issue you are experiencing to help us reproduce the issue. (Be sure to remove any sensitive data)

Screenshots If applicable, add screenshots to help explain your problem.

What is Configured? NA

Smartphone (please complete the following information):

  • Device: Desktop
  • OS: Windows
  • Browser Chrome
  • Version: 84.0.4147.135

Additional context This breaks advanced features in vue-router

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sadooghicommented, Oct 10, 2022

no, it is resolved. thanks @leopsidom

0reactions
tannerabreadcommented, Oct 10, 2022

Closing this as resolved. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with more information so we can re-open this issue and assist you.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

JWT Auth giving error when attempting to login user
history is undefined . Try to wrap your login component like this. First import { withRouter } from "react-router"; on top of your...
Read more >
https://unpkg.com/@aws-amplify/auth@4.1.2/src/Auth.ts
awsCognito : undefined; if (cognitoHostedUIConfig) { const ... called when resolving the current step * @param {} reject - function called when rejecting ......
Read more >
Diff - platform/frameworks/base - Google Git
Merge "Unlock effect chains in the middle of two if's" diff --git a/api/current.txt b/api/current.txt index d034b89..137b672 100644 --- a/api/current.txt ...
Read more >
OneNote, Office365 and MS Mix Plugins now available - Moodle
Currently you can only create one site collection, but we'll look at adding that ... history as the committed dev's are working to...
Read more >
Incident Response - Hybrid Analysis
United States. fonts.googleapis.com ... TTL: 299, MarkMonitor, Inc. Flag of United States United States. fonts.gstatic.com
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found