Skip to content

服务端session过期,客户端不能正常登出 #17

@jc91715

Description

@jc91715

leo你好

当服务端sessio过期时,此时用户停留在客户端登录后的页面。
这时当用户点击退出按钮时,报错

session_destroy(): Session object destruction failed

我的代码

 $this->initCAS();
  phpCAS::logoutWithRedirectService(route('welcome'));

当我试图用捕获错误的方法不终止代码运行,重定向到欢迎页

try{
                    $this->initCAS();
                    phpCAS::logoutWithRedirectService(route('welcome'));
                    info('cas成功登出');
                    return;
                }catch(\Exception $e){
                    info('cas error');
                    info($e->getMessage());
                }
                return redirect()->route('welcome');

此时页面返回
image

是否有个接口去判断服务端的session已经过期?之后在进行其他操作

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions