Sandbox mode (OURA_SANDBOX=1)
Syncing Oura's generated fake data from
/v2/sandbox/usercollection — no ring, account, or OAuth
needed. A placeholder connection is created on first sync.
{% endif %}
{% if connection and connection.status == 'active' %}
Sleep (and readiness) data only reaches Oura's cloud when you
open the Oura app and it syncs your ring — do that first, then sync
here. Daily activity and heart rate sync in the background.
{% if connection.is_token_expired %}
Access token expired.
A sync will try to refresh it; Oura refresh tokens are
single-use and rotate on every refresh, so if the stored one was
already spent elsewhere, re-authorize to mint a new pair.
{% if connection %}
Oura {{ connection.status }}.
This connection can no longer sync. Re-authorize to resume.
{% else %}
Not connected to Oura.
You'll be sent to Oura for consent, then back here.
{% endif %}