BeforeLogoutFunction
BeforeLogoutFunction = (
params) =>Promise<void>
Called when user logs out, before AdminForth removes auth cookie. Useful for cleanup of things issued for the session (e.g. revoking tokens on external identity provider, removing custom cookies set by plugins) or for logging logout event.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | { adminforth: IAdminForth; adminUser: AdminUser | null; extra: HttpExtra; tr: ITranslateFunction; } | - |
params.adminforth | IAdminForth | Adminforth instance. |
params.adminUser | AdminUser | null | User which is logging out. Is null when session was already expired or invalid at the moment of logout. |
params.extra | HttpExtra | Extra HTTP information of logout request. Use extra.response to set custom status, headers or cookies. |
params.tr | ITranslateFunction | Translate function, respects language of logout request. |
Returns
Promise<void>