Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

RedirectToPage from a form-action handler includes the formaction #6104

Closed
pranavkm opened this issue Apr 7, 2017 · 2 comments
Closed

RedirectToPage from a form-action handler includes the formaction #6104

pranavkm opened this issue Apr 7, 2017 · 2 comments

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Apr 7, 2017

// Index.cshtml
@page "{formaction?}"
public void OnGetLoginCallback()
{
    // Do sign-in stuff
   return RedirectToPage(new { message = "Hello {user}"});
}

Expected: Redirects to /Index
Actual: RedirectToPage redirects to /Index/LoginCallback (resulting in a loop).

@pranavkm
Copy link
Contributor Author

pranavkm commented Apr 7, 2017

cc @rynowak \ @DamianEdwards

@rynowak
Copy link
Member

rynowak commented Apr 11, 2017

Let's have all of our Page link generation replace the formaction route value with null if it's not explicitly specified. This means that formaction will not be 'sticky' in ambient values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

3 participants