Laravel 5.1蒸汽登录

Jen*_*sej 1 php laravel steam

也许有人知道为什么, 登录后github invisik laravel steam auth被重定向到:

MYDOMAIN.COM /?openid.ns = HTTP%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode = id_res&openid.op_endpoint = HTTPS%3A%2F%2Fsteamcommunity.com%2Fopenid%2Flogin&openid.claimed_id = HTTP%3A %2F%2Fsteamcommunity.com%2

有人可以告诉我问题出在哪里?

SCR*_*ATK 6

我有一个视频如果有帮助https://www.youtube.com/watch?v=rfHX-Hecu3k&feature=youtu.be

我有同样的问题这是修复

确定你的config/steam-auth.php使用redirect_url作为/ login看起来像这样

<?php

return [

    /*
     * Redirect url after login
     */
    'redirect_url' => '/login',
    /*
     *  Api Key (http://steamcommunity.com/dev/apikey)
     */
    'api_key' => 'Your_API_KEY'

];
Run Code Online (Sandbox Code Playgroud)

此外,如果您希望将其保存到users表下的数据库,请将这些添加到Create_User_table Migration中.您不必拥有名称和内容,只需确保您拥有'昵称''avatar''steamid'

public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('nickname');
            $table->string('avatar');
            $table->string('steamid')->unique();
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password', 60);
            $table->rememberToken();
            $table->timestamps();
        });
    }
Run Code Online (Sandbox Code Playgroud)

您还需要转到控制器中的Auth目录,然后进入AuthController.php并添加这些行,其中显示" protected function create(array $ data) "

protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'nickname' => $data['nickname'],
            'steamid' => $data['steamid'],
            'avatar' => $data['avatar'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);
    }
}
Run Code Online (Sandbox Code Playgroud)

还需要编辑可在App Directory中找到的User.php.您需要将"用户名"'头像''steamid'添加到"protected $ fillable "

     /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['name', 'email', 'username', 'avatar', 'steamid', 'password'];
Run Code Online (Sandbox Code Playgroud)