File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,6 @@ service of type 'CashFlowAnalyzer.Client.Services.AccountService'. *@
4444 private async Task Logout()
4545 {
4646 await AccountService.Logout();
47- Navigation.NavigateTo("/Identity/Account/ Login");
47+ Navigation.NavigateTo("/Login");
4848 }
4949} *@
Original file line number Diff line number Diff line change 1- @page " /Identity/Account/ Login"
1+ @page " /Login"
22@* custom loginForm paths issue: *@
33@* https://github.com/dotnet/aspnetcore/issues/58811 *@
44@using CashFlowAnalyzer .Client .Services
Original file line number Diff line number Diff line change 5555 var result = await AccountService .Register (registerModel );
5656 if (result .Success )
5757 {
58- Navigation .NavigateTo ($" /Identity/Account/ Login?returnUrl={returnUrl }" );
58+ Navigation .NavigateTo ($" /Login?returnUrl={returnUrl }" );
5959 }
6060 else
6161 {
Original file line number Diff line number Diff line change 1919// Supply HttpClient instances that include access tokens when making requests to the server project
2020builder . Services . AddScoped ( sp => sp . GetRequiredService < IHttpClientFactory > ( ) . CreateClient ( "CashFlowAnalyzer.ServerAPI" ) ) ;
2121
22- builder . Services . AddApiAuthorization ( options =>
23- {
24- // https://github.com/dotnet/AspNetCore.Docs/blob/b1e1428d5899fda009f65e2c4e41dac6a60df7b6/aspnetcore/blazor/security/webassembly/additional-scenarios.md#customize-app-routes
25- // doesn't work because of auto interactivity, see https://github.com/dotnet/aspnetcore/issues/58811
26- options . AuthenticationPaths . LogInPath = "security/login" ;
27- options . AuthenticationPaths . RegisterPath = "security/register" ;
28- } ) ;
29-
3022await builder . Build ( ) . RunAsync ( ) ;
Original file line number Diff line number Diff line change 2828 options . Cookie . SameSite = SameSiteMode . Lax ;
2929 options . ExpireTimeSpan = TimeSpan . FromDays ( 14 ) ;
3030 options . SlidingExpiration = true ;
31+ options . LoginPath = "/Login" ;
32+ options . LogoutPath = "/Logout" ;
3133} ) ;
3234
3335builder . Services . AddControllers ( ) ;
You can’t perform that action at this time.
0 commit comments