diff --git a/app/Http/Auth/Socialite/GameShardProvider.php b/app/Http/Auth/Socialite/GameShardProvider.php index 72b9fc0..2ebe2ab 100644 --- a/app/Http/Auth/Socialite/GameShardProvider.php +++ b/app/Http/Auth/Socialite/GameShardProvider.php @@ -47,12 +47,15 @@ protected function getUserByToken($token): array */ protected function mapUserToObject(array $user): User { + // TODO: download avatar and then save it in local + // $user['data']['avatar'] ?? null + return (new User)->setRaw($user)->map([ 'id' => $user['data']['id'], 'nickname' => $user['data']['username'], 'name' => $user['data']['first_name'] . ' ' . $user['data']['last_name'], 'email' => $user['data']['email'], - 'avatar' => $user['data']['avatar'] ?? null, + 'avatar' => null, ]); } diff --git a/database/migrations/2020_12_22_000000_create_connected_accounts_table.php b/database/migrations/2020_12_22_000000_create_connected_accounts_table.php index 66d53d8..8107e19 100644 --- a/database/migrations/2020_12_22_000000_create_connected_accounts_table.php +++ b/database/migrations/2020_12_22_000000_create_connected_accounts_table.php @@ -21,9 +21,9 @@ public function up(): void $table->string('email')->nullable(); $table->string('telephone')->nullable(); $table->text('avatar_path')->nullable(); - $table->string('token', 1000); + $table->string('token', 1100); $table->string('secret')->nullable(); // OAuth1 - $table->string('refresh_token', 1000)->nullable(); // OAuth2 + $table->string('refresh_token', 1100)->nullable(); // OAuth2 $table->dateTime('expires_at')->nullable(); // OAuth2 $table->timestamps();