콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
14061 화면

Hi,

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


Thanks.

아바타
취소
베스트 답변

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.


아바타
취소

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

베스트 답변

You can also trigger logout in controllers with the method:

request.session.logout()

아바타
취소
관련 게시물 답글 화면 활동
1
5월 25
1271
0
2월 22
3248
2
1월 22
3433
2
1월 22
4552
1
10월 15
12607