I have a web app which uses Google OAuth2 for security. There are many API endpoints which I need to test through postman, but they require the user to authenticate using google.
When I access some API, say localhost:8080/user
, the web app redirects to google login page if the user is not authenticated, and sends results after authentication. Otherwise, if the user is already authenticated, it simply sends back the results. I can also use localhost:8080/login
to explicitly login the user(which is what the login button does on the homepage). This works fine for browsers, but it does not work in postman.
How do I do the same in Postman? Trying to access the API returns the google login page, but there is no way to provide credentials(username, password and OTP). Is there a way by which I could login using the localhost:8080/login
endpoint?