HandleAuthResponse clears the history.state and makes `current` undefined
See original GitHub issueDescribe 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:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
no, it is resolved. thanks @leopsidom
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!