From a217bd1d0fe1f77ab03aeb36605b7f7b9f9f5595 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 8 Aug 2025 14:04:20 +0000 Subject: [PATCH 1/5] Add native sign in with Apple function template --- app/config/templates/function.php | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/app/config/templates/function.php b/app/config/templates/function.php index d8426ad900..b7fe1f7d5f 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2078,5 +2078,65 @@ return [ ] ], 'scopes' => ['users.read', 'users.write'] + ], + [ + 'icon' => 'icon-apple', + 'id' => 'sign-in-with-apple', + 'name' => 'Sign in with Apple', + 'score' => 6, + 'tagline' => 'Use native Apple sign-in APIs on Apple devices with Appwrite Auth', + 'permissions' => ['any'], + 'events' => [], + 'cron' => '', + 'timeout' => 15, + 'useCases' => ['auth'], + 'runtimes' => [ + ...getRuntimes( + $templateRuntimes['DART'], + 'dart pub get', + 'lib/main.dart', + 'dart/sign_in_with_apple' + ), + ], + 'instructions' => 'For documentation and instructions check out file.', + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.2.*', + 'variables' => [ + [ + 'name' => 'BUNDLE_ID', + 'description' => 'Bundle ID of the app. Learn more.', + 'value' => '', + 'placeholder' => 'com.companyname.appname', + 'required' => true, + 'type' => 'password' + ], + [ + 'name' => 'TEAM_ID', + 'description' => 'Team ID of the Apple Developer account.', + 'value' => '', + 'placeholder' => '6K3...5PH', + 'required' => true, + 'type' => 'password' + ], + [ + 'name' => 'KEY_ID', + 'description' => 'Key ID required to communicate with Apple Developer services. Learn more.', + 'value' => '', + 'placeholder' => '9G8...6YF', + 'required' => true, + 'type' => 'password' + ], + [ + 'name' => 'KEY_CONTENTS_ENCODED', + 'description' => 'Contents of Key required to communicated with Appwrite Developer services, encoded in Base64. Learn more.', + 'value' => '', + 'placeholder' => '7x8aA...Ab7c', + 'required' => true, + 'type' => 'password' + ] + ], + 'scopes' => ['users.read', 'users.write'] ] ]; From d85cd09d1a84df71502d34a4440537e498d3c554 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 8 Aug 2025 14:19:21 +0000 Subject: [PATCH 2/5] Update lemon squeezy payments template scopes --- app/config/templates/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/templates/function.php b/app/config/templates/function.php index b7fe1f7d5f..934decc47c 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2077,7 +2077,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['users.read', 'users.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'users.read', 'users.write'] ], [ 'icon' => 'icon-apple', From 7929684c94cd80c90fb69423d420d95e46ad68fb Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 8 Aug 2025 14:20:41 +0000 Subject: [PATCH 3/5] fix variable types and description --- app/config/templates/function.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 934decc47c..4417e332b1 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2110,7 +2110,7 @@ return [ 'value' => '', 'placeholder' => 'com.companyname.appname', 'required' => true, - 'type' => 'password' + 'type' => 'text' ], [ 'name' => 'TEAM_ID', @@ -2118,7 +2118,7 @@ return [ 'value' => '', 'placeholder' => '6K3...5PH', 'required' => true, - 'type' => 'password' + 'type' => 'text' ], [ 'name' => 'KEY_ID', @@ -2126,11 +2126,11 @@ return [ 'value' => '', 'placeholder' => '9G8...6YF', 'required' => true, - 'type' => 'password' + 'type' => 'text' ], [ 'name' => 'KEY_CONTENTS_ENCODED', - 'description' => 'Contents of Key required to communicated with Appwrite Developer services, encoded in Base64. Learn more.', + 'description' => 'Contents of Key required to communicated with Apple Developer services, encoded in Base64. Learn more.', 'value' => '', 'placeholder' => '7x8aA...Ab7c', 'required' => true, From 93db3a9979f68ad934aec0ba0cabecfeb1bccb85 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 8 Aug 2025 14:30:36 +0000 Subject: [PATCH 4/5] remove users scope for lemon squeezy payments template --- app/config/templates/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 4417e332b1..849ee021ba 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2077,7 +2077,7 @@ return [ 'type' => 'text' ] ], - 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write', 'users.read', 'users.write'] + 'scopes' => ['databases.read', 'databases.write', 'collections.write', 'attributes.write', 'documents.read', 'documents.write'] ], [ 'icon' => 'icon-apple', From 890be673d9b06bc3131ba2e6c97a1bfcca50054c Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Fri, 8 Aug 2025 15:55:50 +0000 Subject: [PATCH 5/5] formatting --- app/config/templates/function.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/config/templates/function.php b/app/config/templates/function.php index 849ee021ba..3a91fdfbb3 100644 --- a/app/config/templates/function.php +++ b/app/config/templates/function.php @@ -2091,14 +2091,9 @@ return [ 'timeout' => 15, 'useCases' => ['auth'], 'runtimes' => [ - ...getRuntimes( - $templateRuntimes['DART'], - 'dart pub get', - 'lib/main.dart', - 'dart/sign_in_with_apple' - ), + ...getRuntimes($templateRuntimes['DART'], 'dart pub get', 'lib/main.dart', 'dart/sign_in_with_apple') ], - 'instructions' => 'For documentation and instructions check out file.', + 'instructions' => 'For documentation and instructions, check out file.', 'vcsProvider' => 'github', 'providerRepositoryId' => 'templates', 'providerOwner' => 'appwrite',