OAuth Token support (#3117)

* Add oauth->token to users table

* Add oauth->token to fillableon model
This commit is contained in:
David Bomba 2019-12-04 12:14:55 +11:00 committed by GitHub
parent 75df82a71c
commit 0d15926e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -298,6 +298,7 @@ class LoginController extends BaseController
'password' => '',
'email' => $socialite_user->getEmail(),
'oauth_user_id' => $socialite_user->getId(),
'oauth_user_token' => $socialite_user->token,
'oauth_provider_id' => $provider
];
@ -346,6 +347,7 @@ class LoginController extends BaseController
'password' => '',
'email' => $socialite_user->getEmail(),
'oauth_user_id' => $socialite_user->getId(),
'oauth_user_token' => $socialite_user->token,
'oauth_provider_id' => $provider
];

View File

@ -72,6 +72,7 @@ class User extends Authenticatable implements MustVerifyEmail
'accepted_terms_version',
'oauth_user_id',
'oauth_provider_id',
'oauth_user_token',
];
/**

View File

@ -244,6 +244,7 @@ class CreateUsersTable extends Migration
$table->smallInteger('failed_logins')->nullable();
$table->string('referral_code')->nullable();
$table->string('oauth_user_id',100)->nullable();
$table->string('oauth_user_token')->nullable();
$table->string('oauth_provider_id')->nullable();
$table->string('google_2fa_secret')->nullable();
$table->string('accepted_terms_version')->nullable();