Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: phone authentication #3357

Merged
merged 23 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8ce669d
feat: initial phone authentication
TorstenDittmann Jun 8, 2022
dc25883
feat: add update and verification method for account and users
TorstenDittmann Jun 8, 2022
70c98b0
feat: messaging worker
TorstenDittmann Jun 8, 2022
e444ba6
style: fix linter errors
TorstenDittmann Jun 8, 2022
369c851
Update app/controllers/api/users.php
TorstenDittmann Jun 9, 2022
68264a0
fix: tests and adaption to review
TorstenDittmann Jun 13, 2022
286f174
fix: docs
TorstenDittmann Jun 14, 2022
8d465c6
feat: account sessions for emails
TorstenDittmann Jun 14, 2022
1f91e53
fix: controller title for email session
TorstenDittmann Jun 14, 2022
861023a
feat: update console sdk and ui to use new email auth
TorstenDittmann Jun 14, 2022
a5e76d5
Merge pull request #3377 from appwrite/feat-account-sessions-email
TorstenDittmann Jun 14, 2022
1eb91bc
feat: add ui for phone authentication
TorstenDittmann Jun 14, 2022
2bb106b
fix: adapt to review
TorstenDittmann Jun 20, 2022
6dd41b5
Merge branch '0.15.x' of https://github.com/appwrite/appwrite into fe…
TorstenDittmann Jun 20, 2022
3c3261b
Merge branch 'master' of https://github.com/appwrite/appwrite into fe…
TorstenDittmann Jun 20, 2022
400f5c4
feat: use DSN for phone provider
TorstenDittmann Jun 20, 2022
af817ec
Merge pull request #3379 from appwrite/feat-phone-authentication-ui
TorstenDittmann Jun 20, 2022
d0ad879
Merge branch '0.15.x' of https://github.com/appwrite/appwrite into fe…
TorstenDittmann Jun 20, 2022
a66eac1
fix: env variable description
TorstenDittmann Jun 20, 2022
0023af4
Merge branch 'feat-phone-authentication' of https://github.com/appwri…
TorstenDittmann Jun 20, 2022
7a6a9f1
ui: update user verification
TorstenDittmann Jun 20, 2022
d92f06b
Merge branch '0.15.x' of https://github.com/appwrite/appwrite into fe…
TorstenDittmann Jun 20, 2022
48177e8
docs: update new phone docs
TorstenDittmann Jun 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ _APP_SMTP_PORT=1025
_APP_SMTP_SECURE=
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_PHONE_PROVIDER=phone://mock
_APP_PHONE_FROM=
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Teardown
if: always()
run: |
docker compose down -v
docker ps -aq | xargs docker rm --force
docker volume prune --force
docker network prune --force
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ ENV _APP_SERVER=swoole \
_APP_SMTP_SECURE= \
_APP_SMTP_USERNAME= \
_APP_SMTP_PASSWORD= \
_APP_PHONE_PROVIDER= \
_APP_PHONE_USER= \
_APP_PHONE_KEY= \
_APP_PHONE_FROM= \
_APP_FUNCTIONS_SIZE_LIMIT=30000000 \
_APP_FUNCTIONS_TIMEOUT=900 \
_APP_FUNCTIONS_CONTAINERS=10 \
Expand Down Expand Up @@ -305,6 +309,7 @@ RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/worker-functions && \
chmod +x /usr/local/bin/worker-builds && \
chmod +x /usr/local/bin/worker-mails && \
chmod +x /usr/local/bin/worker-messaging && \
chmod +x /usr/local/bin/worker-webhooks

# Letsencrypt Permissions
Expand Down
6 changes: 3 additions & 3 deletions app/config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'name' => 'Email/Password',
'key' => 'emailPassword',
'icon' => '/images/users/email.png',
'docs' => 'https://appwrite.io/docs/client/account?sdk=web-default#accountCreateSession',
'docs' => 'https://appwrite.io/docs/client/account?sdk=web-default#accountCreateEmailSession',
'enabled' => true,
],
'magic-url' => [
Expand Down Expand Up @@ -42,7 +42,7 @@
'name' => 'Phone',
'key' => 'phone',
'icon' => '/images/users/phone.png',
'docs' => '',
'enabled' => false,
'docs' => 'https://appwrite.io/docs/client/account?sdk=web-default#accountCreatePhoneSession',
'enabled' => true,
],
];
22 changes: 22 additions & 0 deletions app/config/collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,17 @@
'array' => false,
'filters' => [],
],
[
'$id' => 'phone',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16, // leading '+' and 15 digitts maximum by E.164 format
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => 'status',
'type' => Database::VAR_BOOLEAN,
Expand Down Expand Up @@ -1014,6 +1025,17 @@
'array' => false,
'filters' => [],
],
[
'$id' => 'phoneVerification',
'type' => Database::VAR_BOOLEAN,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => null,
'array' => false,
'filters' => [],
],
[
'$id' => 'reset',
'type' => Database::VAR_BOOLEAN,
Expand Down
2 changes: 1 addition & 1 deletion app/config/specs/open-api3-latest-client.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/config/specs/open-api3-latest-console.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/config/specs/open-api3-latest-server.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/config/specs/swagger2-latest-client.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/config/specs/swagger2-latest-console.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/config/specs/swagger2-latest-server.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions app/config/variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,30 @@
],
],
],
[
'category' => 'Phone',
'description' => '',
'variables' => [
[
'name' => '_APP_PHONE_PROVIDER',
'description' => 'Provider used for delivering SMS for Phone authentication. Use the following format: \'phone://[USER]:[SECRET]@[PROVIDER]\'. \n\nAvailable providers are twilio, text-magic and telesign.',
'introduction' => '0.15.0',
'default' => '',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_PHONE_FROM',
'description' => 'Phone number used for sending out messages. Must start with a leading \'+\' and maximum of 15 digits without spaces (+123456789).',
'introduction' => '0.15.0',
'default' => '',
'required' => false,
'question' => '',
'filter' => ''
],
],
],
[
'category' => 'Storage',
'description' => '',
Expand Down