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

Configure code to run at non-root context #96

Open
phillipjohnson opened this issue Jun 30, 2021 · 2 comments
Open

Configure code to run at non-root context #96

phillipjohnson opened this issue Jun 30, 2021 · 2 comments

Comments

@phillipjohnson
Copy link

In the Account controller, the redirect URL is hard-coded to root, but I believe it should actually pull from the config to accommodate applications running at a given context other than root. Here is my modification:

public void SignUpSignIn(string redirectUrl)
{
    redirectUrl = redirectUrl ?? Utils.Globals.RedirectUri; // Important!

    // Use the default policy to process the sign up / sign in flow
    HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = redirectUrl });
    return;
}

There are also many Response.Redirect lines that I think should be changed to start with ~/ instead of just /. Let me know if PRs are welcome and I can submit one.

@jmprieur
Copy link
Contributor

jmprieur commented Jul 5, 2021

@phillipjohnson : thanks for raising
PRs are definitively welcome. Thanks for proposing

@phillipjohnson
Copy link
Author

Thanks, for some reason it looks like sandbox Azure AD is not working so I'll have to wait a bit on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants