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(request) avoid using request url in the ui. fixes #289 #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edlerd
Copy link
Contributor

@edlerd edlerd commented Sep 30, 2024

Done

  • fix(request) avoid using request url in the ui.

fixes #289

@edlerd edlerd requested a review from a team as a code owner September 30, 2024 14:16
Copy link
Contributor

@nsklikas nsklikas left a comment

Choose a reason for hiding this comment

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

I thought setting the flow=<flow_id> in the url was intentional, are we sure we want to remove that?

Signed-off-by: David Edler <david.edler@canonical.com>
@edlerd
Copy link
Contributor Author

edlerd commented Sep 30, 2024

I thought setting the flow=<flow_id> in the url was intentional, are we sure we want to remove that?

Yes, you are right. Changed the approach and unified a bit across all pages.

Copy link
Contributor

@nsklikas nsklikas left a comment

Choose a reason for hiding this comment

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

lgtm, but I have a question

Comment on lines -56 to +54
await router.replace(
{
pathname: window.location.pathname,
query: router.query,
},
undefined,
{ shallow: true },
);
.then(({ data }) => {
const pwParam = pwChanged ? `&pw_changed=${pwChanged.toString()}` : "";
if (flowId !== data.id) {
window.history.replaceState(
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Is router.replace and window.history.replaceState the same API and the 1st is the nextjs way of interacting with the history API? In that case why don't we use the tool provided from the framework?

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.

Invalid checks/redirects in UI
2 participants