update: add more auth meta

This commit is contained in:
tokumeikoi 2022-12-15 23:16:06 +08:00
parent 57ef51f5d1
commit cc43ae5d38

View File

@ -27,7 +27,9 @@ class AuthService
'session' => $guid, 'session' => $guid,
], config('app.key'), 'HS256'); ], config('app.key'), 'HS256');
self::addSession($this->user->id, $guid, [ self::addSession($this->user->id, $guid, [
'ip' => $request->ip() 'ip' => $request->ip(),
'login_at' => time(),
'ua' => $request->userAgent()
]); ]);
return [ return [
'token' => $this->user->token, 'token' => $this->user->token,