From edc36b79461d490048a5083fb54e5d77236e8531 Mon Sep 17 00:00:00 2001 From: Eric Brian Anil <38664231+EricBrianAnil@users.noreply.github.com> Date: Thu, 1 Oct 2020 02:51:43 +0530 Subject: [PATCH 01/17] Updated README.md Added the 'Upgrade from an Older Version' section to the Installation from the official Appwrite website docs as it would prove helpful to new comers --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 05a81489a2..eaf9570256 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Table of Contents: - [Windows](#windows) - [CMD](#cmd) - [PowerShell](#powershell) + - [Upgrade from an Older Version](#upgrade-from-an-older-version) - [Getting Started](#getting-started) - [Services](#services) - [SDKs](#sdks) @@ -82,6 +83,16 @@ Once the Docker installation completes, go to http://localhost to access the App For advanced production and custom installation, check out our Docker [environment variables](docs/tutorials/environment-variables.md) docs. You can also use our public [docker-compose.yml](https://appwrite.io/docker-compose.yml) file to manually set up and environment. +### Upgrade from an Older Version + +If you are upgrading your Appwrite server from an older version, you should use the Appwrite migration tool once your setup is completed. Make sure to run this tool after you already finished setting up the new version, as mentioned above. +To start the migration, run the following command from your terminal once your backup is ready and that your new Appwrite setup has completed successfully. + +``` docker exec [APPWRITE_CONTAINER_ID] migrate ``` + +Replace "[APPWRITE_CONTAINER_ID]" with your container ID. You can find your container ID by running `docker ps` command. + + ## Getting Started Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials. From a6e8019ad79b40e0f53bda49784a7f0cd9050392 Mon Sep 17 00:00:00 2001 From: rjn01 Date: Thu, 1 Oct 2020 04:07:52 +0530 Subject: [PATCH 02/17] Updated running-in-production.md --- docs/tutorials/running-in-production.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/running-in-production.md b/docs/tutorials/running-in-production.md index 2cbe4feecf..612498c397 100644 --- a/docs/tutorials/running-in-production.md +++ b/docs/tutorials/running-in-production.md @@ -26,7 +26,7 @@ Appwrite was built with scalability in mind. Appwrite can potentially scale hori Appwrite uses a few containers to run, where each container has its job. Most of the Appwrite containers are stateless, and in order to scale them, all you need is run multiple instances of them and setup a load balancer in front of them. -If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with him are accessing him trough a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables. +If you decide to set up a load balancer for a specific container, make sure that the containers that are trying to communicate with it are accessing it through a load balancer and not directly. All connections between Appwrite different containers are set using Docker environment variables. There are three Appwrite containers that do keep their state are the MariaDB, Redis, and InfluxDB containers that are used for storing data, cache, and stats (in this order). To scale them out, all you need to do is set up a standard cluster (just like you would with any other app using these technologies) according to your needs and performance. @@ -34,7 +34,7 @@ There are three Appwrite containers that do keep their state are the MariaDB, Re Sending emails is hard. There are a lot of SPAM rules and configurations to master in order to set a functional SMTP server. The SMTP server that comes packaged with Appwrite is great for development but needs some work done to function well against SPAM filters. You can find some guidelines in this [tutorial]([https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability](https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability)). -Another **easier option** is to use an ‘SMTP as a service’ product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rrd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with. +Another **easier option** is to use an ‘SMTP as a service’ product like [Sendgrid]([https://sendgrid.com/](https://sendgrid.com/)) or [Mailgun]([https://www.mailgun.com/](https://www.mailgun.com/)). You can change Appwrite SMTP settings and credentials to any 3rd party provider you like who support SMTP integration using our [Docker environment variables]([https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp](https://github.com/appwrite/appwrite/blob/master/docs/tutorials/environment-variables.md#smtp)). Most services offer a decent free tier to get started with. ## Backups @@ -42,4 +42,4 @@ Backups are highly recommended for any production environment. Currently, there 1. Create a script to backups and restore your MariaDB Appwrite schema. Note that trying to backup MariaDB using a docker volume backup can result in a corrupted copy of your data. It is recommended to use MariaDB or MySQL built-in tools for this. 2. Create a script to backups and restore your InfluxDB stats. If you don’t care much about your server stats, you can skip this. -3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount, some of them are GCP, AWS, DigitalOcean, and the list continues. +3. Create a script to backup Appwrite storage volume. There are many [online resources]([https://blog.ssdnodes.com/blog/docker-backup-volumes/](https://blog.ssdnodes.com/blog/docker-backup-volumes/)) explaining different ways to backup a docker volume. When running on multiple servers, it is very recommended to use an attachable storage point. Some cloud providers offer integrated backups to such attachable mount like GCP, AWS, DigitalOcean, and the list continues. From 5505cd27c51d94250f6c2616ec207fcf2c40aeab Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Thu, 1 Oct 2020 11:40:48 +0530 Subject: [PATCH 03/17] added templates --- .github/ISSUE_TEMPLATE/bug.md | 44 +++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/documentation.md | 13 ++++++++ .github/ISSUE_TEMPLATE/feature.md | 21 ++++++++++++ .github/ISSUE_TEMPLATE/proposal.md | 13 ++++++++ .github/PULL_REQUEST_TEMPLATE.md | 26 +++++++++++++++ 5 files changed, 117 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/documentation.md create mode 100644 .github/ISSUE_TEMPLATE/feature.md create mode 100644 .github/ISSUE_TEMPLATE/proposal.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000000..3dcc35bc67 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,44 @@ +--- +name: 🐛 Bug Report +about: Submit a bug report to help us improve +labels: "bug" +--- + +## 🐛 Bug Report + +(A clear and concise description of what the bug is) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) + +## To Reproduce + +(Write your steps here:) + +## Expected behavior + + + +(Write what you thought would happen.) + +## Actual Behavior + + + +(Write what happened. Add screenshots, if applicable.) + +## Your Environment + + + +(Write Environment, Operating system and version etc.) diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000000..ff1e3bc7e7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,13 @@ +--- +name: 📚 Documentation +about: Report an issue related to documentation +labels: "documentation" +--- + +## 📚 Documentation + +(A clear and concise description of what the issue is.) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000000..7d7c7047b9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,21 @@ +--- +name: 🚀 Feature +about: Submit a proposal for a new feature +labels: "feature" +--- + +## 🚀 Feature + +(A clear and concise description of what the feature is.) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) + +## Motivation + +(Please outline the motivation for the proposal.) + +## Pitch + +(Please explain why this feature should be implemented and how it would be used.) diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md new file mode 100644 index 0000000000..daccb67ccb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/proposal.md @@ -0,0 +1,13 @@ +--- +name: 💥 Proposal +about: Propose a non-trivial change to Livestream +labels: "proposal" +--- + +## 💥 Proposal + +(A clear and concise description of what the proposal is.) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..c03b1c5516 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ + + +## Motivation + +(Write your motivation here.) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) + +## Test Plan + +(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.) + +## Related PRs and Issues + +(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.) From db531085205e883e0afef81ad8e3ea10908dfa60 Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Thu, 1 Oct 2020 11:42:10 +0530 Subject: [PATCH 04/17] added templates --- .github/ISSUE_TEMPLATE/proposal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md index daccb67ccb..93a226a4ac 100644 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ b/.github/ISSUE_TEMPLATE/proposal.md @@ -1,6 +1,6 @@ --- name: 💥 Proposal -about: Propose a non-trivial change to Livestream +about: Propose a non-trivial change to appwrite labels: "proposal" --- From b7373bc0b1224e2ba457818d20b7fd715c411813 Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Fri, 2 Oct 2020 10:18:47 +0530 Subject: [PATCH 05/17] removed proposal template --- .github/ISSUE_TEMPLATE/proposal.md | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/proposal.md diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md deleted file mode 100644 index 93a226a4ac..0000000000 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: 💥 Proposal -about: Propose a non-trivial change to appwrite -labels: "proposal" ---- - -## 💥 Proposal - -(A clear and concise description of what the proposal is.) - -### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? - -(Write your answer here.) From baa6a56e61d70e8590e4a0930dc3dbc2f252050d Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Sat, 3 Oct 2020 11:17:43 +0530 Subject: [PATCH 06/17] updated bug template --- .github/ISSUE_TEMPLATE/bug.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 3dcc35bc67..cfc41b8d1a 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -8,10 +8,6 @@ labels: "bug" (A clear and concise description of what the bug is) -### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? - -(Write your answer here.) - ## To Reproduce (Write your steps here:) From 3031957f436e0bb2d5c25081d130c751f98ab485 Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Sat, 3 Oct 2020 11:46:13 +0530 Subject: [PATCH 07/17] updated templates --- .github/ISSUE_TEMPLATE/bug.md | 4 ++++ .github/ISSUE_TEMPLATE/documentation.md | 6 +++++- .github/ISSUE_TEMPLATE/feature.md | 12 ++++++------ .github/PULL_REQUEST_TEMPLATE.md | 12 ++++++------ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index cfc41b8d1a..63e0e64f94 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -8,6 +8,10 @@ labels: "bug" (A clear and concise description of what the bug is) +## Have you spent some time to check if this issue has been raised before? + +(Have you googled for a similar issue or checked our older issues for a similar bug) + ## To Reproduce (Write your steps here:) diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md index ff1e3bc7e7..9aa7e59e19 100644 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -8,6 +8,10 @@ labels: "documentation" (A clear and concise description of what the issue is.) -### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? +## Have you spent some time to check if this issue has been raised before? + +(Have you googled for a similar issue or checked our older issues for a similar bug) + +### Have you read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)? (Write your answer here.) diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md index 7d7c7047b9..35ad1b9d8f 100644 --- a/.github/ISSUE_TEMPLATE/feature.md +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -8,14 +8,14 @@ labels: "feature" (A clear and concise description of what the feature is.) -### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? +## Have you spent some time to check if this issue has been raised before? + +(Have you googled for a similar issue or checked our older issues for a similar bug) + +### Have you read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)? (Write your answer here.) -## Motivation - -(Please outline the motivation for the proposal.) - ## Pitch -(Please explain why this feature should be implemented and how it would be used.) +(Please explain why this feature should be implemented and how it would be used. Add examples, if applicable.) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c03b1c5516..faa18b5ab9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,13 +9,9 @@ Happy contributing! --> -## Motivation +## What does this PR do? -(Write your motivation here.) - -### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? - -(Write your answer here.) +(Provide a description of what this PR does.) ## Test Plan @@ -24,3 +20,7 @@ Happy contributing! ## Related PRs and Issues (If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.) + +### Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)? + +(Write your answer here.) From a184f3319571c94cb8f901de0774ff6943af4495 Mon Sep 17 00:00:00 2001 From: Eric Brian Anil <38664231+EricBrianAnil@users.noreply.github.com> Date: Sun, 4 Oct 2020 01:03:22 +0530 Subject: [PATCH 08/17] Update README.md --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index eaf9570256..cf24d1112c 100644 --- a/README.md +++ b/README.md @@ -85,13 +85,7 @@ For advanced production and custom installation, check out our Docker [environme ### Upgrade from an Older Version -If you are upgrading your Appwrite server from an older version, you should use the Appwrite migration tool once your setup is completed. Make sure to run this tool after you already finished setting up the new version, as mentioned above. -To start the migration, run the following command from your terminal once your backup is ready and that your new Appwrite setup has completed successfully. - -``` docker exec [APPWRITE_CONTAINER_ID] migrate ``` - -Replace "[APPWRITE_CONTAINER_ID]" with your container ID. You can find your container ID by running `docker ps` command. - +If you are upgrading your Appwrite server from an older version, you should use the Appwrite migration tool once your setup is completed. For more information regarding this, check out the [Installation Docs](https://appwrite.io/docs/installation). ## Getting Started From 6e7fa35a5c161fa8cbd78e104a028e3ac239d097 Mon Sep 17 00:00:00 2001 From: Ravi Jyoti <44156359+ravijyoti3@users.noreply.github.com> Date: Tue, 6 Oct 2020 14:00:09 +0530 Subject: [PATCH 09/17] Updated link on Create Email Verification Section Create Email Verification has a link updated to https://appwrite.io/docs/client/account#updateVerification from https://appwrite.io/docs/client/account#updateAccountVerification --- docs/references/account/create-verification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/account/create-verification.md b/docs/references/account/create-verification.md index 54e0bf77be..3eb262e9b8 100644 --- a/docs/references/account/create-verification.md +++ b/docs/references/account/create-verification.md @@ -1,3 +1,3 @@ -Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateAccountVerification). +Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](docs/client/account#updateVerification). Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. From c4e69dadb732497a5d4381eb218e04b4ae7f844c Mon Sep 17 00:00:00 2001 From: Ravi Jyoti <44156359+ravijyoti3@users.noreply.github.com> Date: Tue, 6 Oct 2020 14:02:20 +0530 Subject: [PATCH 10/17] Updated Link on create email verification Create Email Verification has a link updated to https://appwrite.io/docs/client/account#updateVerification from https://appwrite.io/docs/client/account#updateAccountVerification --- docs/references/account/create-verification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/account/create-verification.md b/docs/references/account/create-verification.md index 3eb262e9b8..3e6abf6a77 100644 --- a/docs/references/account/create-verification.md +++ b/docs/references/account/create-verification.md @@ -1,3 +1,3 @@ -Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](docs/client/account#updateVerification). +Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#updateVerification). Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface. From 9830d6400aa0c4857d1ccb74dc723ce594e63d61 Mon Sep 17 00:00:00 2001 From: rsneh Date: Wed, 7 Oct 2020 19:03:18 +0300 Subject: [PATCH 11/17] Added Wordpress OAuth2 provider --- app/config/providers.php | 9 ++ public/images/oauth2/wordpress.png | Bin 0 -> 4826 bytes src/Appwrite/Auth/OAuth2/Wordpress.php | 133 +++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 public/images/oauth2/wordpress.png create mode 100644 src/Appwrite/Auth/OAuth2/Wordpress.php diff --git a/app/config/providers.php b/app/config/providers.php index 65e2127b3e..b4ee253490 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -224,5 +224,14 @@ return [ // Ordered by ABC. 'form' => false, 'beta' => false, 'mock' => true, + ], + 'wordpress' => [ + 'name' => 'Wordpress', + 'developers' => 'https://developer.wordpress.com/docs/oauth2/', + 'icon' => 'icon-wordpress', + 'enabled' => true, + 'form' => false, + 'beta' => false, + 'mock' => false ] ]; diff --git a/public/images/oauth2/wordpress.png b/public/images/oauth2/wordpress.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d664ada1e3e577cbc3aaec0d12f4d1dfcf7183 GIT binary patch literal 4826 zcmV<05+&`4P)U&jRlW~!Z;9&ieE@Yis@7&IYOeQrf6aY znTn+0M?(91doKU|@7=w-=id8&|M$o{^P73^zjycSJ-d7M>^Wz5x7+TM=aWbJQ1h&= z)HJJyLSK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PQn5?{`p~uxHvVtU z(HIFtCo-t_&og^6^CHyw5J6Hsk?TN?MEn;!z>F(m9`SdsBVBUD-(^DDM4Igj< zo%qlJrVUB3IHPP#^d~s-m465(7aVg;EEa1q$7dXovkuorlpR8@#o)pD&?79;F<|Es;N<4&Mq$x$^!}vufUWgy6zODie9p7~om{WWceT#q|w78IK zR{|`|qO~omoB)>q6ZqM#GDw^66DL>gud6T!n-{u3w)-x0f%fH6i4m9(wZVtcuRMC*HB$IJ*Of;QTbD-CiFK7q0AGB}@fiL2 zebgO`K4)kX)%(gLqax;|U>K^tIR!ps`%(9Ch^hKs zo0mK!zgQCf6gY4)^>dZ}vl=x9aM!`Y^BawN?Zn?`UM$(Zb4KVP_tmTWX1tG&`iw8V zabnv^)U~{mB-hE+q|G5qsUu&#nmnY}DL*3Xa$+3woujPdYuFeGqE8#;qsm88#Wsa+ zgu+qVbw<&LD%W?v!WD<56Xs`;VUNl=B*q7$X&**&Dcbg9txZs}iLo}Si zjKD3(hf>mcF1R-z(sm&DQ_K_Tpc+n-%3abiQwV-Q zupS~mU^Bx;Pwb<|mIUmgLNEpPdcYWn&8oOl5T*~&#a^VNLlBT)E^5)BP)16-!lG^u z>6qOqRPoUx@&e&7h*3h|SZUW%6sTi2t_wQLOH|n}@*0oqVxGQ^_>guoK?IpW(r_Hj zWl`e1k-5fo!lD(?nscmr;cv`+`2rF;(?dEs@-iMVW)vi>s_@KVW!$?KBZo%<${t19 zXKz|^H}i-<^r9?oYFl_nA8&z)`(8?ir^3Vyv&np(6JVyD%gFU(=g literal 0 HcmV?d00001 diff --git a/src/Appwrite/Auth/OAuth2/Wordpress.php b/src/Appwrite/Auth/OAuth2/Wordpress.php new file mode 100644 index 0000000000..44fd99d4b8 --- /dev/null +++ b/src/Appwrite/Auth/OAuth2/Wordpress.php @@ -0,0 +1,133 @@ + $this->appID, + 'redirect_uri' => $this->callback, + 'response_type' => 'code', + 'scope' => $this->getScopes(), + 'state' => \json_encode($this->state) + ]); + } + + /** + * @param string $code + * + * @return string + */ + public function getAccessToken(string $code):string + { + $accessToken = $this->request( + 'POST', + 'https://public-api.wordpress.com/oauth2/token', + [], + \http_build_query([ + 'client_id' => $this->appID, + 'redirect_uri' => $this->callback, + 'client_secret' => $this->appSecret, + 'grant_type' => 'authorization_code', + 'code' => $code + ]) + ); + + $accessToken = \json_decode($accessToken, true); + + if (isset($accessToken['access_token'])) { + return $accessToken['access_token']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserID(string $accessToken):string + { + $user = $this->getUser($accessToken); + + if (isset($user['ID'])) { + return $user['ID']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken):string + { + $user = $this->getUser($accessToken); + + if (isset($user['email']) && $user['verified']) { + return $user['email']; + } + + return ''; + } + + /** + * @param $accessToken + * + * @return string + */ + public function getUserName(string $accessToken):string + { + $user = $this->getUser($accessToken); + + if (isset($user['username'])) { + return $user['username']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken) + { + if (empty($this->user)) { + $this->user = \json_decode($this->request('GET', 'https://public-api.wordpress.com/rest/v1/me', ['Authorization: Bearer '.$accessToken]), true); + } + + return $this->user; + } +} From 9220eb6f5360f745442a53a46e8da5dd44a48e74 Mon Sep 17 00:00:00 2001 From: rsneh Date: Wed, 7 Oct 2020 19:07:05 +0300 Subject: [PATCH 12/17] Update Reference Material --- src/Appwrite/Auth/OAuth2/Wordpress.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Auth/OAuth2/Wordpress.php b/src/Appwrite/Auth/OAuth2/Wordpress.php index 44fd99d4b8..32a79ec4d7 100644 --- a/src/Appwrite/Auth/OAuth2/Wordpress.php +++ b/src/Appwrite/Auth/OAuth2/Wordpress.php @@ -4,6 +4,9 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2; +// Reference Material +// https://developer.wordpress.com/docs/wpcc/ + class Wordpress extends OAuth2 { /** From 8b57c15fa45bbbdd787664eb5107f017f5eea9ef Mon Sep 17 00:00:00 2001 From: rsneh Date: Wed, 7 Oct 2020 19:16:27 +0300 Subject: [PATCH 13/17] Change Wordpress to WordPress --- app/config/providers.php | 2 +- src/Appwrite/Auth/OAuth2/{Wordpress.php => WordPress.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/Appwrite/Auth/OAuth2/{Wordpress.php => WordPress.php} (98%) diff --git a/app/config/providers.php b/app/config/providers.php index b4ee253490..a377cae6f0 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -226,7 +226,7 @@ return [ // Ordered by ABC. 'mock' => true, ], 'wordpress' => [ - 'name' => 'Wordpress', + 'name' => 'WordPress', 'developers' => 'https://developer.wordpress.com/docs/oauth2/', 'icon' => 'icon-wordpress', 'enabled' => true, diff --git a/src/Appwrite/Auth/OAuth2/Wordpress.php b/src/Appwrite/Auth/OAuth2/WordPress.php similarity index 98% rename from src/Appwrite/Auth/OAuth2/Wordpress.php rename to src/Appwrite/Auth/OAuth2/WordPress.php index 32a79ec4d7..a83953405e 100644 --- a/src/Appwrite/Auth/OAuth2/Wordpress.php +++ b/src/Appwrite/Auth/OAuth2/WordPress.php @@ -7,7 +7,7 @@ use Appwrite\Auth\OAuth2; // Reference Material // https://developer.wordpress.com/docs/wpcc/ -class Wordpress extends OAuth2 +class WordPress extends OAuth2 { /** * @var array From 05c06be8c813c5dd210be6a4e9a62113efec0996 Mon Sep 17 00:00:00 2001 From: Karan Singh Bisht <69008866+KaranSinghBisht@users.noreply.github.com> Date: Thu, 8 Oct 2020 01:33:50 +0530 Subject: [PATCH 14/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a3443e5d14..043fdddcd6 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ We truly ❤️ pull requests! If you wish to help, you can learn more about how ## Security -For security issues, kindly email us [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub. +For security issues, kindly email us at [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub. ## Follow Us From 857796fcb761432c7701b099e4ed04ef59afcf53 Mon Sep 17 00:00:00 2001 From: Karan Singh Bisht <69008866+KaranSinghBisht@users.noreply.github.com> Date: Thu, 8 Oct 2020 01:34:32 +0530 Subject: [PATCH 15/17] Update SECURITY.md --- SECURITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index a09be23628..e8bdef2da9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,4 +11,4 @@ ## Reporting a Vulnerability -For security issues, kindly email us security@appwrite.io instead of posting a public issue in GitHub. +For security issues, kindly email us at security@appwrite.io instead of posting a public issue in GitHub. From 0aa6cefcb03e320b1a8884565bf5de0a2009e749 Mon Sep 17 00:00:00 2001 From: Karan Singh Bisht <69008866+KaranSinghBisht@users.noreply.github.com> Date: Thu, 8 Oct 2020 01:38:03 +0530 Subject: [PATCH 16/17] Fixed Grammatical error --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 13e166c81f..2dc3db25a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,7 +32,7 @@ - Fixed update form labels and tooltips for Flutter Android apps - Fixed missing custom scopes param for OAuth2 session create API route - Fixed wrong JSON validation when creating and updating database documents -- Fixed bug where max file size was limited to max of 10MB +- Fixed bug where max file size was limited to a max of 10MB - Fixed bug preventing the deletion of the project logo - Fixed Bug when trying to overwrite OAuth cookie in the Flutter SDK - Fixed OAuth redirect when using the self-hosted instance default success URL ([#454](https://github.com/appwrite/appwrite/issues/454)) From 9b9f9e6e55af930022d6b5660c884568288ab295 Mon Sep 17 00:00:00 2001 From: Burak Ozdemir Date: Mon, 12 Oct 2020 04:39:30 +0300 Subject: [PATCH 17/17] fix Czechia translations --- app/config/locales/af.countries.php | 4 ++-- app/config/locales/es.countries.php | 2 +- app/config/locales/fo.countries.php | 2 +- app/config/locales/fr.countries.php | 2 +- app/config/locales/hi.countries.php | 1 - app/config/locales/it.countries.php | 2 +- app/config/locales/sq.countries.php | 4 ++-- app/config/locales/tr.countries.php | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/config/locales/af.countries.php b/app/config/locales/af.countries.php index b3c4838f36..f5f7f47ac5 100644 --- a/app/config/locales/af.countries.php +++ b/app/config/locales/af.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Costa Rica', 'CU' => 'Kuba', 'CY' => 'Ciprus', - 'CZ' => 'Tsjeggiese Republiek', + 'CZ' => 'Tsjeggië', 'DE' => 'Duitsland', 'DJ' => 'Djiboeti', 'DM' => 'Dominica', @@ -195,4 +195,4 @@ return [ 'ZA' => 'Suid-Afrika', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe', -]; \ No newline at end of file +]; diff --git a/app/config/locales/es.countries.php b/app/config/locales/es.countries.php index 4479c27806..57f9c3c313 100644 --- a/app/config/locales/es.countries.php +++ b/app/config/locales/es.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CY' => 'Chipre', - 'CZ' => 'República Checa', + 'CZ' => 'Chequia', 'DE' => 'Alemania', 'DJ' => 'Yibuti', 'DM' => 'Dominica', diff --git a/app/config/locales/fo.countries.php b/app/config/locales/fo.countries.php index bc6aa77e8a..337d06b667 100644 --- a/app/config/locales/fo.countries.php +++ b/app/config/locales/fo.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Kosta Rika', 'CU' => 'Kuba', 'CY' => 'Kýpros', - 'CZ' => 'Kekkoslovakia', + 'CZ' => 'Kekkia', 'DE' => 'Týskland', 'DJ' => 'Djibouti', 'DM' => 'Dominika', diff --git a/app/config/locales/fr.countries.php b/app/config/locales/fr.countries.php index 28bff2bdde..02324e0634 100644 --- a/app/config/locales/fr.countries.php +++ b/app/config/locales/fr.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CY' => 'Chypre', - 'CZ' => 'République Tchèque', + 'CZ' => 'Tchéquie', 'DE' => 'Allemagne', 'DJ' => 'Djibouti', 'DM' => 'Dominique', diff --git a/app/config/locales/hi.countries.php b/app/config/locales/hi.countries.php index f9f40230a0..cb6cec9229 100644 --- a/app/config/locales/hi.countries.php +++ b/app/config/locales/hi.countries.php @@ -13,7 +13,6 @@ return [ 'AU' => 'ऑस्ट्रेलिया', 'AT' => 'ऑस्ट्रिया', 'AZ' => 'अजरबैजान', - 'BI' => 'बुरुंडी', 'BE' => 'बेल्जियम', 'BJ' => 'बेनिन', diff --git a/app/config/locales/it.countries.php b/app/config/locales/it.countries.php index ce4e56349d..45851f6fcc 100644 --- a/app/config/locales/it.countries.php +++ b/app/config/locales/it.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CY' => 'Cipro', - 'CZ' => 'Repubblica Ceca', + 'CZ' => 'Cechia', 'DE' => 'Germania', 'DJ' => 'Gibuti', 'DM' => 'Dominica', diff --git a/app/config/locales/sq.countries.php b/app/config/locales/sq.countries.php index e1744bf889..a8ef59ec06 100644 --- a/app/config/locales/sq.countries.php +++ b/app/config/locales/sq.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Kosta Rika', 'CU' => 'Kuba', 'CY' => 'Qipro', - 'CZ' => 'Republika Czecheke', + 'CZ' => 'Çekia', 'DE' => 'Gjermani', 'DJ' => 'Djibouti', 'DM' => 'Dominica', @@ -195,4 +195,4 @@ return [ 'ZA' => 'Afrika e Jugut', 'ZM' => 'Zambia', 'ZW' => 'Zimbabve', -]; \ No newline at end of file +]; diff --git a/app/config/locales/tr.countries.php b/app/config/locales/tr.countries.php index 5fd899e911..bb87d8e480 100644 --- a/app/config/locales/tr.countries.php +++ b/app/config/locales/tr.countries.php @@ -44,7 +44,7 @@ return [ 'CR' => 'Kosta Rika', 'CU' => 'Küba', 'CY' => 'Güney Kıbrıs Rum Kesimi', - 'CZ' => 'Çek Cumhuriyeti', + 'CZ' => 'Çekya', 'DE' => 'Almanya', 'DJ' => 'Cibuti', 'DM' => 'Dominika',