I have a Nest JS API project in which I've done all my normal auth and CRUD endpoints working good! I have all the endpoints shown in Swagger UI using Nest JS's SwaggerModule. Now I have to add google login to the Swagger UI of this project but IDK how to do it?? I haven't found a clear setup explanation on the web so I can understand how to do this?
This project does not have a front end, so I need like a button from the Swagger UI to access the google login page and then redirect to an endpoint into my project so I can return the token generated by google, copy it and add it into the authorization token in Swagger UI.
Here are some pictures of what I have and what I need so you can better understand in what I need help, please guys:
Here is my Swagger Setup: Nest JS main.ts file wit Swagger Setup
Here we have:
- Normal auth endpoints working.
- Button to add auth token so I can use protected endpoints.
- What I need, like a google login button that allows me to use a google account and redirect to an endpoint of my API to get the auth token and add it into the 2. button so I can use my protected endpoints. What I have and what I need
Is it possible to achieve what I'm asking for? This is the first time I'm using Nest JS and Swagger UI.
Thanks!