Sorry for the late reply for the last few questions. The best way to know exactly what URL and other parameters you need is to check out the source code of this extension as well as the documentation for the league oauth2 library that's used behind the scenes.
This extension's oauth provider basically just extends League's AbstractProvider
by using the provided URL for getResourceOwnerDetailsUrl
. We also use the BearerAuthorizationTrait
trait that sends the token as part of an Authorization: Bearer token
header, like Laravel's Passport does.
The expected response type is JSON. We're not using the ACCESS_TOKEN_RESOURCE_OWNER_ID
feature of League's oauth package. Maybe we should, but while the ID is stored it's not actually used by Flarum later on at this point. The important bit is that we access the email
and name
attributes of the JSON object via ResourceOwner. We also trigger an event that could be used to alter the response in case your JSON object doesn't match what this extension expects. It's very likely that name
isn't actually used by Flarum, so that basically leaves only email
that's really required.
If your oauth system doesn't work with this extension, it should be quite easy to fork it, then customize the oauth provider and/or resourceowner code.
I hope this clarifies things.