How can i logout programmatically
Hi,
The following should work: AppUI.getCurrent().getApp().logout()
or App.getInstance().logout()
.
Gleb
what is App in my code
Hi,
Could you clarify your question?
Regards,
Gleb
Hi @gorelov ,
As currently we are unable logout via REST API Endpoint (Add logout support to auth server · Issue #2189 · jmix-framework/jmix · GitHub) according this issue. So, as an alternative way, we want to logout from the Application by programmatically.
And the following code is not working on Jmix 2.5:
AppUI.getCurrent().getApp().logout()` or `App.getInstance().logout()`
We are creating a react front-end, And we are unable to logout the user. Its a major security treat for us.
So, Is there any other viable strategy that would logout an user via API or redirect URL?
Hi,
You can use the same code as LogoutAction
: io.jmix.flowui.sys.LogoutSupport#logout
.
Regards,
Gleb