In my application, I am using Passport for Authentication. I have created a Password grant client for generating access tokens for our mobile and web app.
Now I have to add a third-party client that can access some of our resources. For this, I created a client.
Now for a user that can authorize this third-party client for access the resources on behalf of him have to come to our website and login and then needs to authorize to get the authorization code. This I want to do in our own web app. For that, I need to create an API where as a request I will receive client_id, client_secret, grant_type, redirect_url, scopes, etc and return the authorization code.
But nowhere I see an option to create a custom API for generating the authorization code?
-- Edited
https://laravel.com/docs/9.x/passport#approving-the-request
As mentioned here Passport will automatically display a template to the user allowing them to approve or deny the authorization request
We have our own SPA, we can't use the template provided by Passport. Somehow we need to override this and create an API that our SPA can call for authoring or denying the authorization request.
0 comments:
Post a Comment
Thanks