-
Notifications
You must be signed in to change notification settings - Fork 39
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
Having named route azure.callback fails callback now #56
Comments
@RmK9 I am sorry that you are having issues. I have a major demo in the morning for a client & we are polishing off a few things. I will try to read this over tonight, but maybe tomorrow. @jaredrhodes I am running the code in a dev branch, but there was a tweak that was requested in the review. I need to make 100% sure that I did not do something lame & not make that change in my dev branch of my project. |
No worries at all, thanks for checking on this and good luck with the demo! |
@RmK9 sorry to hear that, I put it on the |
Hey guys, been a while. I'm coming back to this after having a lot of side experience with Azure oath2 workflow and processes. Can tell what went wrong with the #53 PR. Maybe @jimmypuckett had an override of the azurecallback method in his own extended middleware and forgot about this little detail, not quite sure. You will also want to add a conditional addition of this |
Hello. I also stumbled on this issue. I also need multiple redirect uris from one app. So for me changing 'form_params' in the azurecallback function (similar to the handle function): $formParams = [
'grant_type' => 'authorization_code',
'client_id' => config('azure.client.id'),
'client_secret' => config('azure.client.secret'),
'code' => $code,
'resource' => config('azure.resource'),
];
if(Route::has('azure.callback')) {
$formParams['redirect_uri'] = route('azure.callback');
}
$response = $client->request('POST', $this->baseUrl . config('azure.tenant_id') . $this->route . "token", [
'form_params' => $formParams
]); does the job. Would be great if there would be a new release if this was fixed! Thank you. |
Related to PR #53
First of all big thanks for @jimmypuckett for working on that PR, I was just looking at having this setup and did not even think about having multiple apps in Azure, we still just have 1 and with multiple redirect URLs, so this is an amazing inclusion.
For some reason though the callback fails after adding "->name('azure.callback')" - which is directly activating the "redirect_uri" addition (as per Jimmy not to break any older implementations).
Below is the error that is being received:
And here is the final request URL:
https://login.microsoftonline.com/aaaaaaaa-1689-41e9-a95f-c131ceb881b9/oauth2/v2.0/authorize?response_type=code&client_id=aaaaaaaa-7878-aaaa-899c-8b394971d964&domain_hint=domain.com&scope=User.Read&redirect_uri=https%3A%2F%2Flocalhost%2Flogin%2Fazurecallback
(modified IDs and domain_hint for privacy reasons)
Decoded URI is https://localhost/login/azurecallback which is an exact match to the one in Azure Portal:
Is there something that I am doing wrong here? Pulled 'dev-master' version with composer and even used original routes as per Readme (instead of custom AppAzure middleware) and still the same.
Any help would be greatly appreciated, thank you!
The text was updated successfully, but these errors were encountered: