Search code examples
laravelscopeoauth-2.0laravel-passport

Laravel passport default scopes using Password Grant Client


I would like to assign a scope that is equal to user's id_groups field with every token generated by Password Grant Client.

I know that I can generate custom tokens by using Personal Access Tokens, but what about Password Grant Client?


Solution

  • I used token created event (built in passport) to update the scope after creation. Dirty but working solution