Problem/Motivation
I need to programmatically generate access_token & refresh_token for a user. I will know the users id & client_id against which the user has to be authenticated. As done from backend, we wont have and need the users password.
I tried using the class use
League\OAuth2\Server\Grant\AbstractGrant;
And then tried to access the logic for token as below:
$access_token = $this->issueAccessToken(
$accessTokenTTL,
$client,
$this->getDefaultUser($client),
$finalized_scopes
);
After several hours of attempts, I am still stuck. Is there a easy way to do this? In my site, users authenticate via SMS and wont't have a password.
Comments
Comment #2
esafwan commentedIs this something that is technically doable?
Comment #3
e0ipsoHello!
Did you try creating a new grant plugin, like the other grants shipped by the module?
Comment #4
e0ipsoI would be interested in adding more grants to the module if it's general and you care to share.
Setting to Needs Work awaiting for feedback.
Comment #5
bradjones1Comment #6
bradjones1Closing as duplicate of other support request - I think the OP's issue is with implementing the abstract grant class?