Ok, I've managed to attach an event handler to the Manage Account button via its Id "MenuItem_Account_Manage", still wary that the redirect will trigger before the new handler has completed but is working for now.
The Logout button however doesn't have an Id or any classes or any other parameters to make it easy to attach event handlers to. Can the next version add an Id to that button please?
In your example none of your parameters are named *Id.
Creating an ABP service with the following setup triggers the bug:
public interface IBookAppService : IApplicationService {
Task<string> FetchBooks(int? bookGenreId = null);
}
And that generates the following route as shown in Swagger:
The nullable parameter with a default value is now a required parameter and a part of the path.
If you then inject that service and call FetchBooks using the default value the result just hangs, no errors are thrown.
Convention is dictating that any service methods with an *Id parameter get added to to the path for that service, i.e. /api/app/widget/fetch/{*Id}
However if that parameter is optional and provided a default value it is still added to the path, i.e. /api/app/widget/fetch/{typeId=null}
Intention is to use that optional *Id parameter as a filter, however because it is added to the path it becomes required (even Swagger stating as such).
The ABP service injected into the Client doesn't recognise this however, so calling one of these methods and not providing the optional parameter causes it to fail to find the correct route. But this doesn't cause an error, instead as an async method it just returns a Task that never completes, causing the method calling it to hang.
Workaround is to replace the parameters with a proper filter DTO, although renaming the parameter probably also works (I didn't test that however).
The ABP Toolbar is useful but we have a number of actions we want to perform on Logout or navigation to the My Account pages that exist on the host.
I can't find any way to hook into those actions to perform actions before redirection. For Logout I've hooked into the OpenIddict event handlers to cleanup stuff but for the My Account link I can't find any events to hook into so have had to resort to some obvious error messages to alleviate issues users may face when returning to the main application.
Regardless hooking into the OpenIddict events on the Host side requires exposing more services to perform the needed actions, services already available on the client side.
Is there any way to hook into those actions on the client before redirection to the host?
So once thing I just noticed is a solid disconnect between our HttpApi.Host and the Blazor.Client. Restarting the API in debugging mode causes the authenticated user to not longer be logged in on the host side, but that same user can still use the Client page without reauthenticating and without any issue. This may be related to the fact that every login generates two sessions, which I assumed was normal behaviour (one for host and one for client) but now I'm not so sure.
Good Morning
We're prepping for a production deployment and were expecting 8.3 Final to be released last week, instead we got rc3. Is there a new release date scheduled for when 8.3 Final will be finished and released? Thanks.
This still isn't working.
I've got the Sessions correctly being removed from the database on user login in-line with the Logout from All Devices setting but those users still have access to the system. It times out after an hour of inactivity but users with an active valid session also are timing out after an hour of inactivity.
Have upgraded to v8.3.0-rc.3 but still cannot see any changes between a new generated project and our solution in regards to modules imported and middleware being started.
What specific part of the Blazor.Client is checking the session validity? Or is it going back to the Host running OpenIddict to check that?
Have been comparing with a newly generated v8.3.0-rc.1 project, no major differences in any of the module configurations (other than the new DynamicClaims which I've implemented with no change).
Where is the Session checking actually implemented in the client projects?
End result is four active working browsers (2 in Chrome, 1 in Chrome Incognito, 1 in Firefox) with zero active sessions and Prevent Concurrent Login turned on. Refreshing any of the browsers causes the WASM page to reload, creating new sessions without asking for credentials.
Have logged on / off and restarted the Blazor and HttpApi.Host instance and rebuilt the project after setting the Prevent Concurrent Logins. Deleting all sessions out of the AbpSessions table also leaves all browsers active and logged in.