# Troubleshooting

## **Unknown error during login**

When setting up Single Sign-On, you might encounter the general error *"Unknown error during login."* This issue can stem from various causes. In such instances, the recommended course of action is to check the logs of the `bakery-back` container. For Docker Compose setups, execute the following commands:

1. Identify and copy the container ID for the `bakery-back` container using the `docker ps` command.
2. Display the logs with the command: `docker logs CONTAINER_ID`

## Proxy configuration

If you are utilizing a proxy in your system, requests from the UI Bakery server to your Identity Provider may encounter failures. To resolve this, set the following environment variable to enable the UI Bakery server to use your proxy::

```bash
JAVA_OPTS='-Dhttps.proxyHost=local-proxy.default -Dhttps.proxyPort=3128 -Dhttps.proxySet=true'
```

## Hiding email and password inputs

To conceal email and password inputs, utilize the following environment variable:

```bash
UI_BAKERY_EMAIL_AUTH_ENABLED=false
```

## Allowing custom emails to join workspace

By default, only users with emails on "example.com" can join the workspace if the **Allow auto-sign up with domain.com emails** workspace setting is enabled. If you need to allow users with custom emails to join your workspace you can use the `UI_BAKERY_SSO_WORKSPACE_CLAIM` environment variable.

If you set the variable value to "*workspace"* and then include the *"workspace"* claim with the *"your workspace URL"* value, then during registration the user will be automatically assigned to the specified workspace. \
For example, `UI_BAKERY_SSO_WORKSPACE_CLAIM=myworkspace`, where `myworkspace=example` , *example* here is equal to your **workspace URL** in UI Bakery.

## Adjusting NGINX for Larger Headers

When using NGINX as a reverse proxy for UI Bakery, you may need to increase the client header buffer. Incorporate the following lines into your NGINX server configuration:

```
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
```


---

# 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.uibakery.io/on-premise/sso/troubleshooting.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.
