Search code examples
angularauthenticationgoogle-oauthweb-deploymentgoogle-api-js-client

How to authenticate to google in background?


I have build a google authentication as shown in this blog.

https://jorgecf.github.io/2020/04/18/google-oauth-angular

The problem is that it always shows an pop up so that users can login. But I want that login to happen in background where I will be passing the username and password.

Are there a solution for this problem?


Solution

  • Probably not, due to security reason Google Authentication does not allow pass username and password silently. It works with the help of Authentication Token, that you can store and get rid of username and password prompt if it asked every time, and once it expired you need to authenticate again.