Authentication Google Oauth is a three-legged process:
- Getting request token
- Authorize this request token
- Exchange authorized request token for access token
A username and password are required at the second stage of this process, when the user, using his credentials, allows the client application to access his personal data stored on the google server.
Now to the question that @Luis has raised what is, is there a way to send username and password along with other oauth values? Answer No. None. It is not possible to send the username and password in the authorization header or in the request parameter of the authorization URI. The reason is that the user should always know that the client (which is your application) uses the user data. Therefore, the user is always redirected to a web page where he / she is asked to provide login credentials. It also allows the user to set restrictions on access control on his personal data for the application.
If the application is allowed to store and send user credentials along with Oauth authorization headers, the user will never know that the application uses its personal data and cannot set any restrictions for the application.
Hope this explanation helps.
source share