From 0b774c7cd4107a3bd61a23fc211f9ce3b084151d Mon Sep 17 00:00:00 2001
From: Rohit Ranjan
Date: Fri, 19 May 2023 20:32:41 +0530
Subject: [PATCH 1/2] Updated OAuth docs regarding selection of application
type
---
app/views/docs/authentication.phtml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/views/docs/authentication.phtml b/app/views/docs/authentication.phtml
index 698c5d9af..8ae3a8b5e 100644
--- a/app/views/docs/authentication.phtml
+++ b/app/views/docs/authentication.phtml
@@ -307,6 +307,11 @@ try await account.createOAuth2Session(provider: "amazon")
If there is already an active anonymous session, the new session will be attached to it. If there are no active sessions, the server will attempt to look for an account with the same email address as the email received from the OAuth2 provider and attach the new session to the existing account. If no matching account is found - the server will create a new account.
+
+
Note
+
While you setup OAuth2 providers, you need to enter App ID and App Secret in your Appwrite console. You need to choose a web application in your respective 3rd party OAuth2 provider (Ex: Google) irrespective of the target platform you are building for. This is beacuse the communication is between Appwrite (Web App) and the OAuth2 provider
+
+
From 881b6c158c1c1babc277a23f9bbc7b1966b9f1e3 Mon Sep 17 00:00:00 2001
From: Rohit Ranjan
Date: Fri, 19 May 2023 23:58:36 +0530
Subject: [PATCH 2/2] Update app/views/docs/authentication.phtml
Co-authored-by: Vincent (Wen Yu) Ge
---
app/views/docs/authentication.phtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/docs/authentication.phtml b/app/views/docs/authentication.phtml
index 8ae3a8b5e..2f5c85bad 100644
--- a/app/views/docs/authentication.phtml
+++ b/app/views/docs/authentication.phtml
@@ -309,7 +309,7 @@ try await account.createOAuth2Session(provider: "amazon")
Note
-
While you setup OAuth2 providers, you need to enter App ID and App Secret in your Appwrite console. You need to choose a web application in your respective 3rd party OAuth2 provider (Ex: Google) irrespective of the target platform you are building for. This is beacuse the communication is between Appwrite (Web App) and the OAuth2 provider
+
You should select web application as the application type in your OAuth2 provider, even if you're building a mobile or flutter application. The OAuth2 provider will communicate with Appwrite directly, which is a web application.