Azure-Samples / Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi
Configure code to run at non-root context
- Dominant language
- JavaScript
- Stars
- 282
- Forks
- 236
- PR merge metrics
- No merged PRs in 30d
Description
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:
```csharp
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.