# Google One Tap

**Initialization Process:** To initialize Google One Tap login, use the following parameters:

```javascript
csc('google-one-tap', {
    clientId,
    contentId: storyContent,
    successCallback: (data: {
	loggedIn:true,
        userId:string,
	email:string,
	name:string,
	phoneNumber:string}) 
		=> {
      console.log(data.loggedIn);
    },
    oneTapArgs: (data: argsObject) => {
      console.log(data);
    },
});
```

| Parameter       | Description                                                                                                                                    |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| clientId        | The unique identifier provided by Conscent for authenticating the client.                                                                      |
| contentId       | The ID of the content where the One Tap login is integrated.                                                                                   |
| successCallback | A callback function is triggered upon successful user login.                                                                                   |
| oneTapArgs      | A callback function returns information related to the One Tap process, including any errors or reasons for not displaying the One Tap prompt. |

**Parameters Overview**

The argsObject will return the following object type:

```javascript
argsObject = {
    getNotDisplayedReason: "browser_not_supported" || "Missing_client_id" || "Opt_out_or_no_session" || "Secure_http_required" || "Suppressed_by_user" || "Unregistered_origin" || "Unknown_reason",
    isDisplayed: true || false,
    isNotDisplayed: true || false,
    getSkippedReason: "auto_cancel" || "user_cancel" || "tap_outside" || "issuing_failed"
};
```

* **getNotDisplayedReason**: Provides reasons for not displaying the One Tap prompt. Choose from the available options.
* **isDisplayed**: Indicates whether the One Tap prompt is displayed.
* **isNotDisplayed**: Indicates whether the One Tap prompt is not displayed.
* **getSkippedReason**: Provides reasons for skipping the One Tap prompt.

#### URL Whitelisting on GCP

Ensure the following URLs are whitelisted according to the environment:

* **Sandbox**: `https://`sandbox-sso-v2.netlify.app`/`
* **Production**: `https://`slp-v2.netlify.app`/`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.conscent.ai/version-2.0/google-one-tap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
