laravel社交名流注销问题 [英] laravel socialite logout issue

查看:65
本文介绍了laravel社交名流注销问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用laravel社交名媛登录Google和Facebook.在后端通过admin登录后,可以使用一种方法登录Google和Microsoft.如果管理员将从Google或Microsoft登录,则与该帐户相关的所有事件都会出现,而我正在显示这些事件.我的问题是注销后,没有从Microsoft和Google注销.

I am using laravel socialite for login with google and facebook. After login from admin on the backend, there is one option to log in with Google and Microsoft. if admin will log in from Google or Microsoft then all events related to that account will come and I am displaying those events. My problem is after log out, it's not getting the log out from Microsoft and Google.

我想要从admin退出,又要从admin登录,那时候它不应该显示登录之前的事件.

I want if I logged out from admin and again if I will log in from admin, at that time it should not show events which came from before login.

对于注销,我正在使用laravel auth注销方法.

For logout, I am using laravel auth logout method.

推荐答案

AdminLoginController

public function logout(Request $request)
{
        Auth::guard('admin')->logout();
        $request->session()->flush();
        $request->session()->regenerate();
        return redirect()->guest(route( '/admin' ));
}

这篇关于laravel社交名流注销问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆