-
Notifications
You must be signed in to change notification settings - Fork 224
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
1.5.x docs #440
Closed
1.5.x docs #440
Changes from 8 commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
0da264d
feat: ssr
loks0n d1ee6d7
chore: rfac
loks0n 3ced54e
chore: typo
loks0n 8ee8eed
Add messaging shell
18da9a3
Rework messaging journies
d49d316
feat: ssr oauth explainer
loks0n ab2ca0f
Update src/routes/docs/products/auth/ssr/+page.markdoc
loks0n 24146e2
Some improvements on SSR docs
0293415
Some suggestions
4462ca5
Merge branch '1.5.x' of https://github.com/appwrite/website into feat…
loks0n 0209dc8
Merge branch 'feat-ssr' of https://github.com/appwrite/website into f…
loks0n 3688fd6
Add all new pages for messaging
4e5aa4a
Merge branch 'main' into 1.5.x
015d17e
Add sub nav for providers
50ed9e8
Add all providers
9fc9a02
Added required code examples shells
112d1f2
Updte auth docs
Meldiron 7e674d6
Leftover, hihi
Meldiron bd5b783
Add topics, targets messages
3a27c87
Update src/routes/docs/products/auth/ssr/+page.markdoc
loks0n b548457
Remove external auth page
Meldiron 8d23a21
Add db operators
69ec1ff
Add tabs for queries because we have many languages
39e95fa
Add MFA docs
3303670
Finish auth G2 docs
Meldiron d8fe4ea
add image for message status
972e83e
Merge pull request #563 from appwrite/providers
e3c9850
Add FCM and APNs screenshots
fb2524e
Apply suggestions from code review
Meldiron efaea26
review changes
Meldiron 905180b
Merge branch 'feat-new-auth-docs' of https://github.com/appwrite/webs…
Meldiron 7fd9fc9
Remove double dots
Meldiron 7a9e156
Copy changes to duplicate section
Meldiron bdad0cb
Apply suggestions from code review
c618c9f
Merge branch '1.5.x' into feat-new-auth-docs
bdd6377
Fix tables magic url vs OTP
f0a03f3
Merge pull request #566 from appwrite/feat-new-auth-docs
8385396
Merge branch '1.5.x' into topics-targets-messages
af1830c
Add screenshots and examples for concept pages
7b405cc
Add multicdoe to custom tokens
Meldiron 90f1d2b
Revert "Add multicdoe to custom tokens"
Meldiron 86970bf
Add multicdoe to custom tokens
Meldiron a0a17c3
PR review changes
Meldiron 98f72a5
Leftover
Meldiron 3c1ac65
Merge pull request #578 from appwrite/fix-custom-token-multicode
676fdde
Add details for FCM push notification targets
f0d2879
Merge branch '1.5.x' of https://github.com/appwrite/website into feat…
loks0n 9531dac
chore: ssr journeys update
loks0n 0e034e9
feat: svelte ssr auth
loks0n a53d726
chore: OAuth 2 -> OAuth2
loks0n 838204c
feat: tokens concept page
loks0n 6f9d2ce
add APNS-ios target instruction
a21fbb9
Add screenshots and complete examples for apns and fcm
db0cbfb
Add code sample and screenshots under messages page
bd1881b
Merge pull request #567 from appwrite/topics-targets-messages
88ca4a5
Fix placeholder tag format
13732b0
Add SMS journey
ac255af
Merge branch 'topics-targets-messages' of https://github.com/appwrite…
1917731
chore: vincent review
loks0n 4bfcdc1
chore: vincent review
loks0n b7cfde7
Merge pull request #439 from appwrite/feat-ssr
a121361
Added screenshots and manage examples for MSG providers
97f10e3
Update Text Magic to be TextMagic
efd44de
chore: svelte csr changes
loks0n f6c4e36
feat: nextjs ssr auth tutorial
loks0n 71f8788
Update src/routes/docs/tutorials/nextjs-ssr-auth/step-3/+page.markdoc
loks0n 07b6695
chore: fix redirects
loks0n fd11828
Merge branch 'feat-ssr-demos' of https://github.com/appwrite/website …
loks0n 3b3c12a
fix: nextjs links
loks0n d9d4440
Add screenshots, add instructions for sender email and reply to email…
2e3cff5
feat: nuxt ssr auth tutorial
loks0n cd38136
Completed sendgrid provider page with all details
3e81e7e
chore: autotype load
loks0n eb8c749
feat: astro
loks0n e76ae10
fix: createOAuth2Token
loks0n cc3b4fb
fix: remove non existant `sessions.read`
loks0n ed94383
Fix icons
b94d469
Update src/routes/docs/products/messaging/targets/+page.markdoc
e6539d8
Remove duplicated line
0e66c8b
Reviewed Next.js SSR tutorial
e332bcc
Reviewed all SSR tutorials
4b09559
Merge pull request #593 from appwrite/feat-ssr-demos
98c6745
update email examples
0115e4d
Merge branch '1.5.x' into topics-targets-messages
2b722c0
Merge pull request #589 from appwrite/topics-targets-messages
e181f03
fixed API key details for SSR, added screenshots for create message i…
825ab08
Fix broken links
56c0791
Fix more links
cac9d1e
Add createPush examples
fb4f79c
Added code examples using a special generator script ;)
f6f5b4b
Fix TODO in links so preview can build
dfd0d06
Fix TODO in links so preview can build
a3babb0
Point to 1.5.x rc branch
9210f98
Merge branch 'main' into 1.5.x
5e29995
Temporarily try catch md parsing so previews will build
6d09bfc
Update links for account.md description
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
--- | ||
layout: article | ||
title: Multi-factor authentication | ||
description: Add multiple layers of authentication to your applications powered by Appwrite Authentication. | ||
--- | ||
|
||
Multi-factor authentication (MFA) greatly increases the security of your apps by adding additional layers of protection. | ||
When Multifactor authentication is enabled, a malicious actor needs to compromise multiple authentication factors to gain unauthorized access. | ||
Appwrite Authentication lets you easily implement MFA in your apps, letting you build more securely and quickly. | ||
|
||
Appwrite currently allows two factors of authentication. More factors of authentication will be available soon. | ||
|
||
Here are the steps to implement MFA in your application. | ||
|
||
{% section #enable-mfa step=1 title="Enable MFA on an account" %} | ||
[TODO @TorstenDittmann need some advice here, what's the steps?] | ||
{% /section %} | ||
{% section #init-login step=2 title="Initialize login" %} | ||
Begin your login flow with the default authentication method used by your app, for example, email password. | ||
{% multicode %} | ||
```js | ||
import { Client, Account } from "appwrite"; | ||
|
||
const client = new Client(); | ||
|
||
const account = new Account(client); | ||
|
||
client | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('5df5acd0d48c2') // Your project ID | ||
; | ||
|
||
await account.createEmailSession( | ||
'email@example.com', | ||
'password1+' | ||
); | ||
``` | ||
|
||
```dart | ||
echo 'test'; | ||
``` | ||
|
||
```kotlin | ||
print('test'); | ||
``` | ||
|
||
```swift | ||
print('test'); | ||
``` | ||
{% /multicode %} | ||
{% /section %} | ||
{% section #check-for-2fa step=3 title="Check for multi-factor" %} | ||
Upon successful login in the first authentication step, check the status of the login by calling `account.get()`. | ||
If more than one factors are required, you will the error `user_more_factors_required`. | ||
{% multicode %} | ||
```js | ||
try { | ||
await account.get(); | ||
} catch (error) { | ||
if (error.type === `user_more_factors_required`){ | ||
// redirect to perform MFA | ||
} | ||
else { | ||
// handle other errors | ||
} | ||
} | ||
``` | ||
|
||
```dart | ||
echo 'test'; | ||
``` | ||
|
||
```kotlin | ||
print('test'); | ||
``` | ||
|
||
```swift | ||
print('test'); | ||
``` | ||
{% /multicode %} | ||
{% /section %} | ||
{% section #list-provider step=4 title="List provider" %} | ||
You can check which providers are enabled for an account using `account.listProviders()`. | ||
The returned object will be formatted like this. | ||
|
||
```js | ||
{ | ||
totp: true, // time-based one-time password | ||
email: false, // email | ||
phone: true // phone | ||
} | ||
``` | ||
|
||
{% multicode %} | ||
```js | ||
const providers = await account.listProviders(); | ||
// redirect based on providers returned. | ||
``` | ||
|
||
```dart | ||
echo 'test'; | ||
``` | ||
|
||
```kotlin | ||
print('test'); | ||
``` | ||
|
||
```swift | ||
print('test'); | ||
``` | ||
{% /multicode %} | ||
|
||
{% /section %} | ||
{% section #create-challenge step=5 title="Create challenge" %} | ||
Based on the providers available, initialize an additional auth step. | ||
Calling these methods will send a challenge to the user. | ||
{% multicode %} | ||
```js | ||
// Authenticator app | ||
const challenge = await account.createChallenge('totp'); | ||
|
||
const challenge = await account.createChallenge('email'); | ||
|
||
// Phone | ||
const challenge = await account.createChallenge('phone'); | ||
``` | ||
|
||
```dart | ||
echo 'test'; | ||
``` | ||
|
||
```kotlin | ||
print('test'); | ||
``` | ||
|
||
```swift | ||
print('test'); | ||
``` | ||
{% /multicode %} | ||
|
||
{% /section %} | ||
{% section #complete-challenge step=6 title="Complete challenge" %} | ||
Once the user receives the challenge code, you can pass the code back to Appwrite to complete the challenge. | ||
{% multicode %} | ||
```js | ||
// Authenticator app | ||
await account.updateChallenge( | ||
[CHALLENGE_ID], | ||
[CHALLENGE_CODE] | ||
); | ||
``` | ||
|
||
```dart | ||
echo 'test'; | ||
``` | ||
|
||
```kotlin | ||
print('test'); | ||
``` | ||
|
||
```swift | ||
print('test'); | ||
``` | ||
{% /multicode %} | ||
|
||
{% /section %} |
253 changes: 251 additions & 2 deletions
253
src/routes/docs/products/databases/queries/+page.markdoc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<script lang="ts"> | ||
import Docs from '$lib/layouts/Docs.svelte'; | ||
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte'; | ||
|
||
const parent: NavParent = { | ||
href: '/docs', | ||
label: 'Messaging' | ||
}; | ||
|
||
const navigation: NavTree = [ | ||
{ | ||
label: 'Getting started', | ||
items: [ | ||
{ | ||
label: 'Overview', | ||
href: '/docs/products/messaging' | ||
}, | ||
{ | ||
label: 'Quick start', | ||
href: '/docs/products/messaging/quick-start' | ||
} | ||
] | ||
}, | ||
{ | ||
label: 'Concepts', | ||
items: [ | ||
{ | ||
label: 'Providers', | ||
href: '/docs/products/messaging/providers' | ||
}, | ||
{ | ||
label: 'Targets', | ||
href: '/docs/products/messaging/targets' | ||
}, | ||
{ | ||
label: 'Topics', | ||
href: '/docs/products/messaging/topics' | ||
}, | ||
{ | ||
label: 'Message types', | ||
href: '/docs/products/messaging/message-types' | ||
}, | ||
|
||
] | ||
}, | ||
{ | ||
label: 'Journeys', | ||
items: [ | ||
{ | ||
label: 'Send push notifications', | ||
href: '/docs/products/messaging/send-push-notifications' | ||
}, | ||
{ | ||
label: 'Send email messages', | ||
href: '/docs/products/messaging/send-email-messages' | ||
}, | ||
{ | ||
label: 'Send SMS messages', | ||
href: '/docs/products/messaging/send-sms-messages' | ||
}, | ||
] | ||
}, | ||
{ | ||
label: 'References', | ||
items: [ | ||
{ | ||
label: 'API reference', | ||
href: '/docs/references/cloud/client-web/messaging' | ||
}, | ||
] | ||
}, | ||
]; | ||
</script> | ||
|
||
<Docs variant="two-side-navs"> | ||
<Sidebar {navigation} {parent} /> | ||
<slot /> | ||
</Docs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
layout: article | ||
title: Messaging | ||
description: Send push notifications, text, or emails to users or groups of users using your app. | ||
back: /docs | ||
--- | ||
|
||
PLACE HOLDER | ||
|
||
{% arrow_link href="/docs/products/messaging/quick-start" %} | ||
Quick start | ||
{% /arrow_link %} |
9 changes: 9 additions & 0 deletions
9
src/routes/docs/products/messaging/message-types/+page.markdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
layout: article | ||
title: Message types | ||
description: Learn about the different ways you can deliver messages to communicate with your end users. | ||
--- | ||
|
||
|
||
|
||
|
78 changes: 78 additions & 0 deletions
78
src/routes/docs/products/messaging/providers/+layout@.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<script lang="ts"> | ||
import Docs from '$lib/layouts/Docs.svelte'; | ||
import Sidebar, { type NavParent, type NavTree } from '$lib/layouts/Sidebar.svelte'; | ||
|
||
const parent: NavParent = { | ||
href: '/docs/products/messaging', | ||
label: 'Providers' | ||
}; | ||
|
||
const navigation: NavTree = [ | ||
{ | ||
label: 'Providers', | ||
items: [ | ||
{ | ||
label: 'Overview', | ||
href: '/docs/products/messaging' | ||
}, | ||
] | ||
}, | ||
{ | ||
label: 'Push notifications', | ||
items: [ | ||
{ | ||
label: 'FCM', | ||
href: '/docs/products/messaging/providers' | ||
}, | ||
{ | ||
label: 'APNs', | ||
href: '/docs/products/messaging/targets' | ||
}, | ||
] | ||
}, | ||
{ | ||
label: 'Email', | ||
items: [ | ||
{ | ||
label: 'Mailgun', | ||
href: '/docs/products/messaging/providers/mailgun' | ||
}, | ||
{ | ||
label: 'Sendgrid', | ||
href: '/docs/products/messaging/providers/sendgrid' | ||
}, | ||
] | ||
}, | ||
{ | ||
label: 'SMS', | ||
items: [ | ||
{ | ||
label: 'Twillio', | ||
href: '/docs/products/messaging/providers/twillio' | ||
}, | ||
{ | ||
label: 'MSG91', | ||
href: '/docs/products/messaging/providers/msg91' | ||
}, | ||
{ | ||
label: 'Telesign', | ||
href: '/docs/products/messaging/providers/telesign' | ||
}, | ||
{ | ||
label: 'TextMagic', | ||
href: '/docs/products/messaging/providers/textmagic' | ||
}, | ||
{ | ||
label: 'Vonage', | ||
href: '/docs/products/messaging/providers/vonage' | ||
}, | ||
|
||
] | ||
}, | ||
]; | ||
</script> | ||
|
||
<Docs variant="two-side-navs"> | ||
<Sidebar {navigation} {parent} /> | ||
<slot /> | ||
</Docs> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TorstenDittmann this is the MFA journey docs we added. Please take a look. Need help double checking the flow + the missing auth methods :)