Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function oauthLogout(Request $request){
- $id = Auth::id();
- $client_id = auth()->user()->Token()->getAttribute('client_id');
- $find_client = $this->oauth->getOauthWithId($client_id);
- $access_token = Auth::user()->token();
- DB::table('oauth_access_tokens')
- ->where('id', $access_token->id)
- ->where('client_id', $access_token->client_id)
- ->where('user_id', $id)
- ->update([
- 'revoked' => true
- ]);
- DB::table('oauth_refresh_tokens')
- ->where('access_token_id', $access_token->id)
- ->update([
- 'revoked' => true
- ]);
- return redirect($find_client['redirect']);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement