public async Task <IActionResult> Portal() { var userId = User.FindFirst(OpenIdClaims.Subject).Value; var redirectUrl = await appPlansBillingManager.GetPortalLinkAsync(userId); return(Redirect(redirectUrl)); }
public async Task Invoke(HttpContext context) { if (context.Request.Path == "/") { var userId = context.User.FindFirst(OpenIdClaims.Subject).Value; context.Response.RedirectToAbsoluteUrl(await appPlansBillingManager.GetPortalLinkAsync(userId)); } }
public async Task Invoke(HttpContext context) { if (context.Request.Path == "/") { var userIdClaim = context.User.FindFirst(ClaimTypes.NameIdentifier); if (userIdClaim != null) { context.Response.RedirectToAbsoluteUrl(await appPlansBillingManager.GetPortalLinkAsync(userIdClaim.Value)); } } }