Browse Source

Set returnUrl for blazor account manage button

pull/6778/head
liangshiwei 6 years ago
parent
commit
3511f866c1
  1. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Menus/MyProjectNameMenuContributor.cs
  2. 3
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/appsettings.json

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Menus/MyProjectNameMenuContributor.cs

@ -59,11 +59,10 @@ namespace MyCompanyName.MyProjectName.Blazor.Menus
context.Menu.AddItem(new ApplicationMenuItem( context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage", "Account.Manage",
accountStringLocalizer["ManageYourProfile"], accountStringLocalizer["ManageYourProfile"],
$"{identityServerUrl.EnsureEndsWith('/')}Account/Manage", $"{identityServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}",
icon: "fa fa-cog", icon: "fa fa-cog",
order: 1000, order: 1000,
null, null));
"_blank"));
} }
return Task.CompletedTask; return Task.CompletedTask;

3
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/appsettings.json

@ -1,4 +1,7 @@
{ {
"App": {
"SelfUrl": "https://localhost:44307"
},
"AuthServer": { "AuthServer": {
"Authority": "https://localhost:44305", "Authority": "https://localhost:44305",
"ClientId": "MyProjectName_Blazor", "ClientId": "MyProjectName_Blazor",

Loading…
Cancel
Save