> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/login-and-authentication.md).

# Login & authentication

Canonical SONIC v1.0.0 authentication, identity bootstrap, workspace access, session security, welcome mail and wallet-link boundaries.

SONIC separates authentication, application identity, workspace membership, roles, entitlements, wallet ownership, transaction authorization and ZK eligibility.

## Canonical authority chain

```
Clerk authentication
→ SONIC user ID
→ workspace membership
→ workspace role
→ permission/entitlement policy
→ product access
```

Clerk remains the production session authority. Provider IDs, email addresses and wallet addresses are bindings to the canonical SONIC user; they are not the SONIC user primary key.

## Signup and onboarding

```
Create account
→ verify email
→ create SONIC identity
→ create/join workspace
→ provision embedded wallet when configured
→ enqueue welcome email
→ bootstrap private SONIA welcome chat
→ resolve plan/access
→ enter application
```

Welcome mail is asynchronous. A transient mail-provider outage must not invalidate a successfully created account.

## Developer onboarding

A user may be assigned the `DEVELOPER` workspace role by an authorized workspace administrator or through an approved invitation policy. The role does not automatically create Live API keys or grant billing/provider administration.

```
verified account
→ workspace membership
→ DEVELOPER role
→ developer permissions
→ test/live environment policy
→ scoped API key creation
```

## Session security

Sensitive role changes, API-key operations, wallet changes, payouts and administrative mutations can require fresh re-authentication/AAL according to policy. Sessions are revocable and account recovery is separate from wallet recovery.

## Mail security

Templates receive only the minimum data required for rendering. Mail provider credentials remain server-only. Do not log reset tokens, magic links, raw session tokens, wallet signatures, recovery material or MFA secrets.

## Wallet ownership

External wallet linking uses a short-lived server challenge and Ed25519 signature verification. Address connection alone is not authentication and never authorizes future transfers.


---

# 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://sonic-ai-works.gitbook.io/sonic-networks-docs/documentation/application-and-website/login-and-authentication.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.
