Closed robincodex closed 8 years ago
Hello,I don't know why the login is successful but get user info is empty.
private $steam; public function __construct(SteamAuth $steam) { $this->steam = $steam; } public function login() { if ($this->steam->validate()) { $info = $this->steam->getUserInfo(); if (!is_null($info)) { $user = User::where('steamid', $info->getSteamID64())->first(); if (is_null($user)) { $user = User::create([ 'username' => $info->getNick(), 'avatar' => $info->getProfilePictureFull(), 'steamid' => $info->getSteamID64() ]); Log::info("steamid:".$this->steam->getSteamId()); Log::info("parseInfo:".$this->steam->parseInfo()); Log::info("getUserInfo:".json_encode($this->steam->getUserInfo())); Log::info("getAuthUrl:".$this->steam->getAuthUrl()); } Auth::login($user, true); return redirect('/'); // redirect to site } } return $this->steam->redirect(); // redirect to Steam login page }
the log output:
[2016-08-04 22:38:15] local.INFO: steamid:76561198095715299 [2016-08-04 22:38:15] local.INFO: parseInfo: [2016-08-04 22:38:15] local.INFO: getUserInfo:{} [2016-08-04 22:38:15] local.INFO: getAuthUrl:
my mysql
Ok, this is my problem.
Hello,I don't know why the login is successful but get user info is empty.
the log output:
my mysql