İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
14036 Görünümler

Hi,

I want to have a button to trigger a session logout? Is this possible?


Thanks.

Avatar
Vazgeç
En İyi Yanıt

you can trigger logout by going to the following web link (either using ordinary link or button or whatever you like, you can even type it in address bar when you're logged in and follow the link):

/web/session/logout

here you can use redirect argument in order to specify where user should be redirected after logout:

/web/session/logout?redirect=/web

here is ordinary html link example:

<a href="/web/session/logout?redirect=/web">Logout</a>

you can use similar approach in button as well... there is multiple possibilities to implement this, adapt it per your requirements.


Avatar
Vazgeç

Yes. It working fine. Great ......,

En İyi Yanıt

You can also trigger logout in controllers with the method:

request.session.logout()

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
May 25
1231
0
Şub 22
3224
2
Oca 22
3386
2
Oca 22
4521
1
Eki 15
12567