> ## Documentation Index
> Fetch the complete documentation index at: https://docs.volanti.aero/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign in with Volanti

> Let people sign in to your application with their Volanti account, using OAuth 2.0.

Pilots and club members use one Volanti account for Volanti, Events.Aero and Split My Flight. Your application can let them sign in with it too, so they have no new password to set up, and you can read their name and email address once they approve.

It's a standard OAuth 2.0 authorisation server, so most OAuth libraries work with it as they are.

## Getting access

Volanti issues OAuth clients by arrangement, so there's no self-service registration. Email [support@volanti.aero](mailto:support@volanti.aero) with your application's name and its redirect URL, and we'll send you a client ID (and a client secret, if your application can keep one private).

## The flow

Sign in uses the authorisation code flow. Applications that can't keep a secret (a mobile app, a single-page app) add PKCE with the `S256` method.

**1. Send the person to Volanti**

Redirect them to the authorisation endpoint:

```text theme={null}
https://identity.volanti.aero/oauth/authorize
  ?response_type=code
  &client_id=YOUR_CLIENT_ID
  &redirect_uri=https://your-app.example/callback
  &state=RANDOM_VALUE
  &code_challenge=CODE_CHALLENGE
  &code_challenge_method=S256
```

Leave out the two `code_challenge` parameters if your client has a secret.

**2. They sign in and approve**

Volanti asks them to sign in, then to approve your application. They come back to your `redirect_uri` with `code` and your `state`. Check that `state` matches the value you sent.

**3. Exchange the code for tokens**

```bash theme={null}
curl -X POST https://identity.volanti.aero/oauth/token \
  -d grant_type=authorization_code \
  -d client_id=YOUR_CLIENT_ID \
  -d client_secret=YOUR_CLIENT_SECRET \
  -d redirect_uri=https://your-app.example/callback \
  -d code=CODE_FROM_THE_REDIRECT
```

A public client sends `code_verifier` instead of `client_secret`.

**4. Ask who signed in**

Call [Get authenticated user](https://docs.volanti.aero/api-reference/identity/get-user.md) with the access token:

```bash theme={null}
curl https://identity.volanti.aero/api/user \
  -H "Authorization: Bearer ACCESS_TOKEN"
```

## Token lifetimes

| Token | Lasts |
| - | - |
| Access token | 1 hour |
| Refresh token | 30 days |

When an access token expires, get a new one from the same token endpoint with `grant_type=refresh_token` and the refresh token.

## What this covers

This reference covers signing a person in and reading their profile. Identity has no other public endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.