thephpleague / oauth2-client

Easy integration with OAuth 2.0 service providers.
http://oauth2-client.thephpleague.com
MIT License
3.66k stars 754 forks source link

ID Token for access token possible? #976

Open t3touch opened 2 years ago

t3touch commented 2 years ago

How can I add an ID Token to the access tokens?

t3touch commented 2 years ago

I think I got it 😃 Or is another way recommended?

// Try to respond to the request
$result = $server->respondToAccessTokenRequest($request, $response);
$result->getBody()->write(json_encode(['id_token' => 'test'])); // this is the line that adds the id_token to the response