It is recommended to use <aclass="reference external"href="https://datatracker.ietf.org/doc/html/rfc7636">PKCE</a>
to provide a better security.</p>
<p>The following scopes are available:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">application:write</span></code>: grants write access to application configuration (only for users with administration rights),</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">profile:read</span></code>: grants read access to auth endpoints,</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">profile:write</span></code>: grants write access to auth endpoints,</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">users:read</span></code>: grants read access to users endpoints,</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">users:write</span></code>: grants write access to users endpoints,</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">workouts:read</span></code>: grants read access to workouts-related endpoints,</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">workouts:write</span></code>: grants write access to workouts-related endpoints.</p></li>
</ul>
<figureclass="align-default">
<imgalt="OAuth2 client creation on FitTrackee"src="_images/fittrackee_screenshot-07.png"/>
<p>OAuth2 support is implemented with <aclass="reference external"href="https://docs.authlib.org/en/latest/">Authlib</a> library.</p>
</div>
<divclass="admonition warning">
<pclass="admonition-title">Warning</p>
<divclass="line-block">
<divclass="line">If FitTrackee is running behind a proxy, the <codeclass="docutils literal notranslate"><spanclass="pre">X-Forwarded-Proto</span></code> header must be set.</div>
<divclass="line">For instance for <cite>nginx</cite>:</div>
<li><p><aclass="reference external"href="https://requests-oauthlib.readthedocs.io/en/latest/examples/real_world_example.html">Web App Example of OAuth 2 web application flow</a> with Requests-OAuthlib (python)</p></li>
<li><p><aclass="reference external"href="https://docs.authlib.org/en/latest/client/oauth2.html#oauth-2-session">OAuth 2 Session</a> with Authlib (python)</p></li>
<li><p><aclass="reference external"href="https://codeberg.org/SamR1/ft-oauth-client">Minimal example of an application interacting with FitTrackee</a> (python)</p></li>