User78 I am getting this as well, but to elaborate a bit more on my current issue:
I am attempting to use this with Phabricator, since it provides an OAuth Server (as per their documentation, which doesn't actually mention any scopes). I've managed to pin-point my specific issue down to src/Controllers/PassportController.php
on line 88
, where $user->getId()
is returning null, because the response it is getting is:
object(Flagrow\Passport\ResourceOwner)#781 (1) { ["response":"Flagrow\Passport\ResourceOwner":private]=> array(3) { ["result"]=> NULL ["error_code"]=> string(19) "ERR-INVALID-SESSION" ["error_info"]=> string(27) "Session key is not present." } }
This seems like a fairly common issue when I searched for it in conjunction with Phabricator. After digging through the code, I'm not actually sure it's being passed the access_token
, or if it is then it's failing to get the user and attempts session-based auth instead of token-based auth to perform the conduit API call and load the user, presumably because Phabricator is likely using Conduit internally in the user.whoami
endpoint.
Some of the scopes I'm passing, though I'm not entirely sure how many of them (if any) work: user.username,user.userName,email.address,user.realName,user.id
I know this extension is not at all intended / designed to work with Phabricator, but the last time I wrote anything in PHP was like...8 years ago at the least, the likes of oauth2-phabricator are pretty dead, etc. so if there are any details I could provide to @luceos to enable the use of this extension with Phabricator, I'd be happy to provide it (I'm on the Flarum Discord server, so I am readily accessible).