Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
14 changes: 7 additions & 7 deletions app/views/docs/authentication.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@ promise.then(function (response) {
Appwrite handles the persistence of the session in a consistent way across SDKs. After authenticating with an SDK, the SDK will persist the session so that the user will not need to log in again the next time they open the app. The mechanism for persistence depends on the SDK.
</p>

<ul>
<li class="margin-bottom-tiny">Web - Uses a session secure cookie and falls back to local storage when a session cookie is not available.</li>
<li class="margin-bottom-tiny">Flutter - Uses a session cookie stored in Application Documents through the path_provider package.</li>
<li class="margin-bottom-tiny">Apple - Uses a session cookie.</li>
<li class="margin-bottom-tiny">Android - Uses a session cookie stored in SharedPreferences.</li>
<ul class="margin-top margin-bottom-large text-size-normal">
<li class="margin-bottom-tiny"><b>Web</b> - Uses a session secure cookie and falls back to local storage when a session cookie is not available.</li>
<li class="margin-bottom-tiny"><b>Flutter</b> - Uses a session cookie stored in Application Documents through the <b>path_provider</b> package.</li>
<li class="margin-bottom-tiny"><b>Apple</b> - Uses a session cookie.</li>
<li class="margin-bottom-tiny"><b>Android</b> - Uses a session cookie stored in SharedPreferences.</li>
</ul>

<h2><a href="/docs/authentication#security" id="security">Security</a></h2>
Expand All @@ -270,14 +270,14 @@ promise.then(function (response) {
Here are some common best practices when handling sessions and keys used for authentication purposes.
</p>

<ol>
<ol class="margin-top margin-bottom-large text-size-normal">
<li class="margin-bottom-tiny">Only keep user sessions active as long as needed.</li>
<li class="margin-bottom-tiny">Only grant scopes required for your use case for your APIs keys, and nothing more.</li>
<li class="margin-bottom-tiny">Access Appwrite via HTTPS to prevent any redirects from interfering with your requests.</li>
<li class="margin-bottom-tiny">Prefer using OAuth2 for authentication with first-party redirects.</li>
<li class="margin-bottom-tiny">Generate an SSL certification for the Appwrite instance.</li>
<li class="margin-bottom-tiny">Keep API keys private and out of client-side code.</li>
<li class="margin-bottom-tiny">Only maintain <b>1</b> instance of the Client SDK in your app to avoid conflicting session data.</li>
<li class="margin-bottom-tiny">Only maintain <b>one</b> instance of the Client SDK in your app to avoid conflicting session data.</li>
<li class="margin-bottom-tiny">When using the realtime service to get users' documents, clean up and resubscribe to the correct resources to maintain the correct app state.</li>
<li class="margin-bottom-tiny">Unsubscribing from old resources is also recommended to prevent possible race conditions.</li>
</ol>
Expand Down