> For the complete documentation index, see [llms.txt](https://docs.cotter.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cotter.app/sdk-reference/web/web-sdk-passwordless-login/advanced-customization-for-pop-up-authentication-prompt.md).

# Advanced Customization for Pop Up Authentication Prompt

The configuration for the Pop Up Prompt is using the configuration for the Login Form, so you can use the [attributes explained in the Login Form.](/sdk-reference/web/web-sdk-passwordless-login/advanced-customization.md)

```javascript
var configAuthRequest = {
  // Required config
  ApiKeyID: "<your-api-key-id>",
  Identifier: "<your-user-email-or-phone>",
  IdentifierType: "EMAIL", // or PHONE
  UserID: "<your-user-id>",
  OnSuccess: payload => {
    console.log(payload);
    if (payload.approved) {
      setTimeout(() => {
        console.log("hel");
      }, 3000);
      // window.location.href = "/";
    }
  }
  //------
  
  // Allow OTP fallback for Trusted Device
  AllowOTPFallback: true,
  
  // Styling
  ButtonBackgroundColor: "#000000",
  ButtonTextColor: "#ffffff",
  ErrorColor: "#ff0000",
  AccentColor: "#fff000",
  ButtonText: "Authenticate",
  
  // Change the prompt message
  AuthRequestText: {
    title: "Approve this login from your phone",
    subtitle: "A notification is sent to your trusted device to confirm it's you",
    image: "https://yourwebsite.com/image.png",
    titleError: "Something went wrong",
    subtitleError: "We are unable to confirm it's you, please try again",
    imageError: "https://yourwebsite.com/image.png",
    imageSuccess: "https://yourwebsite.com/image.png",
    switchOTPText: "Authenticate with OTP instead"
  },
  
  // Event Name in the Event Response
  EventName: "TRANSACTION",
};
```

Read the specifications for each of these attributes in the [config for Login Form](/sdk-reference/web/web-sdk-passwordless-login/advanced-customization.md#description).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cotter.app/sdk-reference/web/web-sdk-passwordless-login/advanced-customization-for-pop-up-authentication-prompt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
