Comments (10)
{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter: 'code'. Trace ID: 2a44b1bc-f60b-405a-aa21-1397c4bbc200 Correlation ID: a585739a-1c4f-4cca-b318-08ffc71b95fd Timestamp: 2023-11-23 14:13:09Z","error_codes":[900144],"timestamp":"2023-11-23 14:13:09Z","trace_id":"2a44b1bc-f60b-405a-aa21-1397c4bbc200","correlation_id":"a585739a-1c4f-4cca-b318-08ffc71b95fd","error_uri":"https://login.microsoftonline.com/error?code=900144"}
is the full untruncated response i get back. This happens even though all the necessary is entered. This happens to some users, even using the same credentials.
from providers.
Exception is raised by the ->user()
method.
Dump of the full request:
GuzzleHttp\Psr7\Request {#313 ▼ // app/Http/Controllers/AuthController.php:29
-method: "POST"
-requestTarget: null
-uri: GuzzleHttp\Psr7\Uri {#309 ▼
-scheme: "https"
-userInfo: ""
-host: "login.microsoftonline.com"
-port: null
-path: "/common/oauth2/v2.0/token"
-query: ""
-fragment: ""
-composedComponents: "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
-headers: array:4 [▼
"User-Agent" => array:1 [▼
0 => "GuzzleHttp/7"
]
"Content-Type" => array:1 [▼
0 => "application/x-www-form-urlencoded"
]
"Host" => array:1 [▼
0 => "login.microsoftonline.com"
]
"Accept" => array:1 [▼
0 => "application/json"
]
]
-headerNames: array:4 [▼
"user-agent" => "User-Agent"
"content-type" => "Content-Type"
"host" => "Host"
"accept" => "Accept"
]
-protocol: "1.1"
-stream: GuzzleHttp\Psr7\Stream {#311 ▼
-stream: stream resource @8 ▼
wrapper_type: "PHP"
stream_type: "TEMP"
mode: "w+b"
unread_bytes: 0
seekable: true
uri: "php://temp"
options: []
}
-size: 219
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
}
Request body dump (truncated):
"grant_type=authorization_code&client_id=...&client_secret=...&redirect_uri=...&scope=User.Read ◀" // app/Http/Controllers/AuthController.php:29
from providers.
Same for me !
from providers.
I got the same issue, and i have no clue why this is happening with some users.
Im at the point im just going to ditch this code and do my own implementation.
from providers.
Can you log the request query params? I'm using the provider in prod without issues.
Is it only happening for some users?
from providers.
@atymic yes it is only happening for some users. how do I log the query params? I only do Socialite::driver($provider)->redirect();
from providers.
Same issue here. was working yesterday, then it stopped working.
@atymic if I run dd($request->getUri())
, I receive the following dump:
GuzzleHttp\Psr7\Uri {#309 ▼ // app/Http/Controllers/AuthController.php:28
-scheme: "https"
-userInfo: ""
-host: "login.microsoftonline.com"
-port: null
-path: "/common/oauth2/v2.0/token"
-query: ""
-fragment: ""
-composedComponents: "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
It seems like, there is no query attached at all.
from providers.
Found a fix for my issue, based on this: https://stackoverflow.com/a/38754821/9337116
I've renamed the config option services.microsoft.tenant
to services.microsoft.tenant_id
in config/services.php
for another Service and forgot, that it is used for this Provider too. Therefore it has used the fallback common
instead of the real tenant id.
Reverting that back to the original name, fixed it in my case. So probably it is just a missing (but documented as optional) tenant id.
from providers.
@dallyger could you PR a fix to the docs? Thanks!
from providers.
@atymic this is a fix for my specific use-case (just login, single tenant, no other features used). I do not really understand what is going on here, just that it works in my case. That is probably not enough to submit a PR.
However, I've tried to look into it and stumbled upon this comment (#1029 (comment)) in another issue.
It seems like that one commit from it (SocialiteProviders/Microsoft@ed3fd7f) is the exact changes you'd want. But cannot really confirm due to lack in knowledge. Maybe you can cherry-pick that?
from providers.
Related Issues (20)
- Azure B2C provider failing with not supported? HOT 6
- Upgrade monorepo-builder to v11
- SAML2 provider - can't configure repeated_id_ttl and clock_skew HOT 1
- PKCE crashes when using stateless
- Azure B2C provider puts scope incorrectly HOT 1
- AzureADB2C has error in emails mapping HOT 3
- SAML2 Driver HOT 2
- Azure: Add support for optional post_logout_redirect_uri HOT 2
- Docs on how to use `SocialiteWasCalled[]` in Laravel 11 HOT 3
- Microsoft not returning `id_token` when using `refresh_token` HOT 1
- Apple Provider Regenerates the Session HOT 8
- Microsoft-azure laravel 11 support HOT 5
- HubSpot redirect without specifying scope throws an error
- composer require socialiteproviders/twitter SocialiteProviders\Twitter\Provider does not extend Laravel\Socialite\Two\AbstractProvider HOT 5
- Azure AD B2C mapping fails after upgrade from 4.1.1 to 4.3.0 HOT 1
- 500 Server Error with TikTok HOT 9
- Could not find a matching version of package socialiteproviders/claveunica HOT 1
- ClaveUnica Provider: new release HOT 1
- How should we be implementing Microsoft Azure's Front-channel logout URL?
- Facebook Limited Login support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from providers.