# st.user

Source: https://docs.streamlit.io/develop/api-reference/user/st.user

* Function signature:

   ```python
   st.user()
   ```

* Parameters:

   | name | type | default | description |
   |---|---|---|---|
   | is_logged_in | bool |  | Whether a user is logged in. For a locally running app, this attribute is only available when authentication (st.login()) is configured in secrets.toml. Otherwise, it does not exist. |
   | tokens | TokensProxy |  | A read-only, dict-like object for accessing exposed tokens from the identity provider. |

* Function signature:

   ```python
   TokensProxy
   ```

* Parameters:

   | name | type | default | description |
   |---|---|---|---|
   | id | str |  | The identity token. This is only available if "id" is in expose_tokens. |
   | access | str |  | The access token. This is only available if "access" is in expose_tokens. |

### Community Cloud

Starting from Streamlit version 1.42.0, you can't use `st.user` to retrieve a user's Community Cloud account email. To access user information, you must set up an identity provider and configure authentication (`[auth]`) in your app's secrets. Remember to update your identity provider's configuration and your app's secrets to allow your new domain. A list of [IP addresses](https://docs.streamlit.io/deploy/streamlit-community-cloud/status#ip-addresses) used by Community Cloud is available if needed. An authentication-configured app counts as your single allowed private app.

* Function signature:

   ```python
   st.user.to_dict()
   ```

* Returns: Dict[str,str]

    A dictionary of the current user's information.
