Skip to content

Fix: Cross Origin Authorization Error.#85

Merged
dcblogdev merged 3 commits intodcblogdev:masterfrom
ousid:fix/cross-origin-authorization
Nov 14, 2024
Merged

Fix: Cross Origin Authorization Error.#85
dcblogdev merged 3 commits intodcblogdev:masterfrom
ousid:fix/cross-origin-authorization

Conversation

@ousid
Copy link
Copy Markdown
Contributor

@ousid ousid commented Nov 12, 2024

This PR solves AADSTS9002325 Error Code, when you are trying to authenticate (connect) the user, and redirect to the authorization URL.

Steps to produce

  • Define the connect route
Route::group([
'prefix' => 'msgraph',
], function () {
   Route::get('connect', AccountEmailConnect::class);
});
  • Create the method
use Dcblogdev\MsGraph\Facades\MsGraph;

public function __invoke()
{
  return MsGraph::connect();
}
  • Access The URL
  • Authorize The Account
  • You will get the following Error Code message

image

Solution

This PR, add the code challenge param, into the authorization URL, in order to solve the above issue.

Comment thread src/MsGraph.php
public function contacts(): Contacts
{
return new Contacts();
return new Contacts;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styling.

@dcblogdev dcblogdev merged commit e95e057 into dcblogdev:master Nov 14, 2024
@dcblogdev
Copy link
Copy Markdown
Owner

thank you!

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

Successfully merging this pull request may close these issues.

2 participants