Authentication¶
Invora uses OpenID Connect (OIDC) for authentication. All API calls require a valid JWT bearer token.
Authentication Methods¶
1. Client Credentials (Machine-to-Machine)¶
For server-to-server integrations. Uses the OIDC client credentials you received during registration.
2. Authorization Code + PKCE (User-Facing Apps)¶
For Flutter/web apps where a user logs in interactively.
- Redirect to:
https://auth.invora.app/oauth/v2/authorize?client_id=...&response_type=code&code_challenge=...&redirect_uri=...&scope=openid profile email - User authenticates via Invora's identity provider
- Exchange the authorization code for tokens at
/oauth/v2/token
3. Personal Access Token (Development Only)¶
Development only
Personal Access Tokens are intended for local testing and quick debugging only. Do not use them in production integrations or automated systems.
For quick testing. Create a PAT in the Invora admin console under your machine user.
Using the Token¶
Include the JWT in every API request:
Multi-Org Access¶
Invora supports cross-organization access. To act on behalf of a different org (e.g., a platform managing its connected businesses):
The calling user must have appropriate roles granted on the target organization.
Token Claims¶
The JWT contains:
| Claim | Description |
|---|---|
sub |
User ID |
org_id |
User's home organization ID |
roles |
Granted roles per organization |
Scopes¶
Each API endpoint requires a specific scope (e.g., Invora.Simple.Invoices.v1.Modify.Create). Scopes are checked against the authz rules engine at runtime. The super admin can modify which roles grant which scopes without code changes.
Token Refresh¶
Access tokens expire after 12 hours by default. Use the refresh token to get a new access token:
OIDC Endpoints¶
| Endpoint | URL |
|---|---|
| Discovery | https://auth.invora.app/.well-known/openid-configuration |
| Authorization | https://auth.invora.app/oauth/v2/authorize |
| Token | https://auth.invora.app/oauth/v2/token |
| Userinfo | https://auth.invora.app/oidc/v1/userinfo |
| JWKS | https://auth.invora.app/oauth/v2/keys |