> For the complete documentation index, see [llms.txt](https://docs.floral.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.floral.fun/developer-resources/security.md).

# Security

**Your responsibilities**

* Keep `client_secret` and all tokens on your server, encrypted at rest. If you can't, use a public client, and never embed a secret in a website or app.
* Generate a new PKCE verifier and `state` for every authorization, and check `state` on return.
* Store the newest refresh token after every refresh.
* Delete a user's tokens when they disconnect from your platform, and call `/oauth/revoke`.

**What Floral enforces**

* Exact redirect URL matching, no wildcards or custom schemes, and PKCE S256 on every authorization.
* A consent screen that shows who built an application and where approval sends the user.
* Single-use authorization codes bound to your client, with refresh token rotation and reuse detection.
* User consent for every new connection, even if the user connected before.
* Immediate revocation when a user disconnects at [floral.fun/connected-apps](https://floral.fun/connected-apps), or their account is deactivated or suspended.
* Tokens that only work on the partner API, and that Floral stores only as hashes.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.floral.fun/developer-resources/security.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
