Skip to content

Commit

Permalink
Removing microseconds so that Sign in with Apple works again
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbussmann committed Jan 17, 2021
1 parent a08ded7 commit 95cc38c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Provider/Apple.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ public function getAccessToken($grant, array $options = [])
{
$configuration = $this->getConfiguration();
$time = new \DateTimeImmutable();
$time = $time->setTime($time->format('H'), $time->format('i'), $time->format('s'));
$expiresAt = $time->modify('+1 Hour');
$expiresAt = $expiresAt->setTime($expiresAt->format('H'), $expiresAt->format('i'), $expiresAt->format('s'));

$token = $configuration->builder()
->issuedBy($this->teamId)
Expand Down
2 changes: 1 addition & 1 deletion src/Token/AppleAccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function getAppleKey()
return JWK::parseKeySet(json_decode($response->getBody()->getContents(), true));
}

return false;
return [];
}

/**
Expand Down

0 comments on commit 95cc38c

Please sign in to comment.