# Login With Google

The login with Google is a function in the [users](https://docs.apphive.io/apphive-documentacion/reference/funciones/users) functions which allows to the users login by identifying and authenticating themselves with a Google account.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-db312f95944710a875e74fadce8081e2547a5c86%2FCaptura%20de%20Pantalla%202020-02-10%20a%20la\(s\)%2011.05.03.png?alt=media)

### 📥 Entry vars <a href="#entry-vars" id="entry-vars"></a>

* **Should always select account:** this function allow the user to select the Google account to login in the app.

### ↗ Callbacks <a href="#entry-vars" id="entry-vars"></a>

* **Error login with google:** you can set functions after the user can't login to the app with Google.
* **In progress:** you can set functions during the user try to login in the app with Google.
* **Play services not available:** you can set functions during process to login with a Google account but the Play Services isn't available.
* **Sign in cancelled:** you can set functions after the user can't login to the app with Google account because he cancel the login.
* **Successful login wit Google:** you can set functions after the user login to the app with Google account.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-fd47221ffa06ffffc2804acad13802c357974e5e%2Fezgif.com-video-to-gif%20\(25\).gif?alt=media)

1. Select a button to add a login with Google function and select on press.
2. Activate a [toggle page loading](https://docs.apphive.io/apphive-documentacion/reference/funciones/elements/toggle-page-loading) and select only enable.
3. Add a login with Google function.
4. Activate the should always select account for user.
5. Open the callbacks and add a [toggle page loading](https://docs.apphive.io/apphive-documentacion/reference/funciones/elements/toggle-page-loading) and activate on disable in the successful login with google
6. Activate a [replace screen](https://docs.apphive.io/apphive-documentacion/reference/funciones/navigation/replace-screen) function and select which screen will go after the login with Google.

![](https://1781865142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvaO9X8rr2FG8JwKkhC-1769347644%2Fuploads%2Fgit-blob-76de37ca36e349a2328f4dad5e3b2c481baa4165%2Fezgif.com-video-to-gif%20\(17\).gif?alt=media)
