Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Idmt.Plugin/Services/IdmtLinkGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public string GenerateConfirmEmailApiLink(string email, string token)

var routeValues = new RouteValueDictionary()
{
[GetTenantRouteParameter()] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["tenantIdentifier"] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["email"] = email,
["token"] = token,
Expand Down Expand Up @@ -61,6 +62,7 @@ public string GenerateConfirmEmailFormLink(string email, string token)

var queryParams = new Dictionary<string, string?>
{
[GetTenantRouteParameter()] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["tenantIdentifier"] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["email"] = email,
["token"] = token,
Expand All @@ -85,6 +87,7 @@ public string GeneratePasswordResetApiLink(string email, string token)
// Generate password setup URL
var routeValues = new RouteValueDictionary()
{
[GetTenantRouteParameter()] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["tenantIdentifier"] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["email"] = email,
["token"] = token,
Expand Down Expand Up @@ -118,6 +121,7 @@ public string GeneratePasswordResetFormLink(string email, string token)

var queryParams = new Dictionary<string, string?>
{
[GetTenantRouteParameter()] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["tenantIdentifier"] = multiTenantContextAccessor.MultiTenantContext?.TenantInfo?.Identifier ?? string.Empty,
["email"] = email,
["token"] = token,
Expand All @@ -131,4 +135,7 @@ public string GeneratePasswordResetFormLink(string email, string token)

return uri;
}

private string GetTenantRouteParameter() =>
options.Value.MultiTenant.StrategyOptions.GetValueOrDefault(IdmtMultiTenantStrategy.Route, IdmtMultiTenantStrategy.DefaultRouteParameter);
}