Skip to content

Commit

Permalink
Increase token length
Browse files Browse the repository at this point in the history
  • Loading branch information
Simoneu01 committed Oct 8, 2023
1 parent f321bdb commit 9bce34e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/Http/Auth/Socialite/GameShardProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 9bce34e

Please sign in to comment.