Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows_live: client ID required in the request made to Microsoft #2002

Open
BenoitDuffez opened this issue May 30, 2024 · 5 comments
Open

Comments

@BenoitDuffez
Copy link

Q A
Bug? yes
New Feature? no
Support question? yes
Version 2.2.0

Actual Behavior

What is the actual behavior?

Similar to comment #1425 (comment) but did not solve my issue.

When logging in with a properly (?? I may have made a mistake though!) configured windows_live, the request fails silently after logging in on Microsoft side.

The Symfony profiler shows the response sent by Microsoft:

[▼
  "info" => [▶]
  "response_headers" => [▶]
  "response_json" => [▼
    "error" => "invalid_client"
    "error_description" => "The provided request must include a 'client_id' input parameter."
    "correlation_id" => "xx-xx-xx-xx-xx"
  ]
]

Expected Behavior

What is the behavior you expect?

I think it should have worked

Steps to Reproduce

I don't have reproduction code as I followed the docs however I debugged the call stack of this error and how the HTTP request is built, and adding these two lines fixes the issue:

 // GenericOAuth2ResourceOwner.php
 public function getAccessToken(HttpRequest $request, $redirectUri, array $extraParameters = [])
 {
     OAuthErrorHandler::handleOAuthError($request);
     $parameters = array_merge([
         'code' => $request->query->get('code'),
         'grant_type' => 'authorization_code',
         'redirect_uri' => $redirectUri,
+        'client_id' => $this->options['client_id'],
+        'client_secret' => $this->options['client_secret'],
     ], $extraParameters);
     $response = $this->doGetTokenRequest($this->options['access_token_url'], $parameters);
     $response = $this->getResponseContent($response);
     $this->validateResponseContent($response);
     return $response;
 }

Possible Solutions

I don't know if my proposal above is bogus because I did not configure the bundle properly (most likely) or if there was a change somewhere in the API?

@BenoitDuffez
Copy link
Author

Is there anything I can do to make this ticket move forward? – Thanks

Copy link

Message to comment on stale issues. If none provided, will not mark issues stale

@github-actions github-actions bot added the Stale label Sep 28, 2024
@BenoitDuffez
Copy link
Author

Any update? How can I help? (hi GitHub bot)

@github-actions github-actions bot removed the Stale label Sep 29, 2024
Copy link

Message to comment on stale issues. If none provided, will not mark issues stale

@github-actions github-actions bot added the Stale label Nov 28, 2024
@BenoitDuffez
Copy link
Author

Would you accept a MR?

@github-actions github-actions bot removed the Stale label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant