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

1.5.x docs #440

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
0da264d
feat: ssr
loks0n Dec 20, 2023
d1ee6d7
chore: rfac
loks0n Dec 20, 2023
3ced54e
chore: typo
loks0n Dec 20, 2023
8ee8eed
Add messaging shell
Dec 21, 2023
18da9a3
Rework messaging journies
Dec 21, 2023
d49d316
feat: ssr oauth explainer
loks0n Dec 21, 2023
ab2ca0f
Update src/routes/docs/products/auth/ssr/+page.markdoc
loks0n Dec 22, 2023
24146e2
Some improvements on SSR docs
Jan 10, 2024
0293415
Some suggestions
Jan 10, 2024
4462ca5
Merge branch '1.5.x' of https://github.com/appwrite/website into feat…
loks0n Jan 13, 2024
0209dc8
Merge branch 'feat-ssr' of https://github.com/appwrite/website into f…
loks0n Jan 13, 2024
3688fd6
Add all new pages for messaging
Jan 19, 2024
4e5aa4a
Merge branch 'main' into 1.5.x
Jan 23, 2024
015d17e
Add sub nav for providers
Jan 28, 2024
50ed9e8
Add all providers
Jan 29, 2024
9fc9a02
Added required code examples shells
Jan 30, 2024
112d1f2
Updte auth docs
Meldiron Jan 30, 2024
7e674d6
Leftover, hihi
Meldiron Jan 30, 2024
bd5b783
Add topics, targets messages
Jan 31, 2024
3a27c87
Update src/routes/docs/products/auth/ssr/+page.markdoc
loks0n Jan 31, 2024
b548457
Remove external auth page
Meldiron Jan 31, 2024
8d23a21
Add db operators
Jan 31, 2024
69ec1ff
Add tabs for queries because we have many languages
Jan 31, 2024
39e95fa
Add MFA docs
Feb 1, 2024
3303670
Finish auth G2 docs
Meldiron Feb 1, 2024
d8fe4ea
add image for message status
Feb 4, 2024
972e83e
Merge pull request #563 from appwrite/providers
Feb 4, 2024
e3c9850
Add FCM and APNs screenshots
Feb 4, 2024
fb2524e
Apply suggestions from code review
Meldiron Feb 4, 2024
efaea26
review changes
Meldiron Feb 4, 2024
905180b
Merge branch 'feat-new-auth-docs' of https://github.com/appwrite/webs…
Meldiron Feb 4, 2024
7fd9fc9
Remove double dots
Meldiron Feb 4, 2024
7a9e156
Copy changes to duplicate section
Meldiron Feb 4, 2024
bdad0cb
Apply suggestions from code review
Feb 4, 2024
c618c9f
Merge branch '1.5.x' into feat-new-auth-docs
Feb 4, 2024
bdd6377
Fix tables magic url vs OTP
Feb 4, 2024
f0a03f3
Merge pull request #566 from appwrite/feat-new-auth-docs
Feb 4, 2024
8385396
Merge branch '1.5.x' into topics-targets-messages
Feb 5, 2024
af1830c
Add screenshots and examples for concept pages
Feb 5, 2024
7b405cc
Add multicdoe to custom tokens
Meldiron Feb 5, 2024
90f1d2b
Revert "Add multicdoe to custom tokens"
Meldiron Feb 5, 2024
86970bf
Add multicdoe to custom tokens
Meldiron Feb 5, 2024
a0a17c3
PR review changes
Meldiron Feb 5, 2024
98f72a5
Leftover
Meldiron Feb 5, 2024
3c1ac65
Merge pull request #578 from appwrite/fix-custom-token-multicode
Feb 5, 2024
676fdde
Add details for FCM push notification targets
Feb 6, 2024
f0d2879
Merge branch '1.5.x' of https://github.com/appwrite/website into feat…
loks0n Feb 6, 2024
9531dac
chore: ssr journeys update
loks0n Feb 6, 2024
0e034e9
feat: svelte ssr auth
loks0n Feb 6, 2024
a53d726
chore: OAuth 2 -> OAuth2
loks0n Feb 6, 2024
838204c
feat: tokens concept page
loks0n Feb 6, 2024
6f9d2ce
add APNS-ios target instruction
Feb 6, 2024
a21fbb9
Add screenshots and complete examples for apns and fcm
Feb 6, 2024
db0cbfb
Add code sample and screenshots under messages page
Feb 6, 2024
bd1881b
Merge pull request #567 from appwrite/topics-targets-messages
Feb 6, 2024
88ca4a5
Fix placeholder tag format
Feb 5, 2024
13732b0
Add SMS journey
Feb 7, 2024
ac255af
Merge branch 'topics-targets-messages' of https://github.com/appwrite…
Feb 7, 2024
1917731
chore: vincent review
loks0n Feb 8, 2024
4bfcdc1
chore: vincent review
loks0n Feb 8, 2024
b7cfde7
Merge pull request #439 from appwrite/feat-ssr
Feb 8, 2024
a121361
Added screenshots and manage examples for MSG providers
Feb 9, 2024
97f10e3
Update Text Magic to be TextMagic
Feb 9, 2024
efd44de
chore: svelte csr changes
loks0n Feb 9, 2024
f6c4e36
feat: nextjs ssr auth tutorial
loks0n Feb 9, 2024
71f8788
Update src/routes/docs/tutorials/nextjs-ssr-auth/step-3/+page.markdoc
loks0n Feb 9, 2024
07b6695
chore: fix redirects
loks0n Feb 9, 2024
fd11828
Merge branch 'feat-ssr-demos' of https://github.com/appwrite/website …
loks0n Feb 9, 2024
3b3c12a
fix: nextjs links
loks0n Feb 9, 2024
d9d4440
Add screenshots, add instructions for sender email and reply to email…
Feb 9, 2024
2e3cff5
feat: nuxt ssr auth tutorial
loks0n Feb 9, 2024
cd38136
Completed sendgrid provider page with all details
Feb 9, 2024
3e81e7e
chore: autotype load
loks0n Feb 10, 2024
eb8c749
feat: astro
loks0n Feb 12, 2024
e76ae10
fix: createOAuth2Token
loks0n Feb 12, 2024
cc3b4fb
fix: remove non existant `sessions.read`
loks0n Feb 12, 2024
ed94383
Fix icons
Feb 12, 2024
b94d469
Update src/routes/docs/products/messaging/targets/+page.markdoc
Feb 12, 2024
e6539d8
Remove duplicated line
Feb 12, 2024
0e66c8b
Reviewed Next.js SSR tutorial
Feb 12, 2024
e332bcc
Reviewed all SSR tutorials
Feb 12, 2024
4b09559
Merge pull request #593 from appwrite/feat-ssr-demos
Feb 12, 2024
98c6745
update email examples
Feb 12, 2024
0115e4d
Merge branch '1.5.x' into topics-targets-messages
Feb 12, 2024
2b722c0
Merge pull request #589 from appwrite/topics-targets-messages
Feb 12, 2024
e181f03
fixed API key details for SSR, added screenshots for create message i…
Feb 13, 2024
825ab08
Fix broken links
Feb 13, 2024
56c0791
Fix more links
Feb 13, 2024
cac9d1e
Add createPush examples
Feb 13, 2024
fb4f79c
Added code examples using a special generator script ;)
Feb 13, 2024
f6f5b4b
Fix TODO in links so preview can build
Feb 13, 2024
dfd0d06
Fix TODO in links so preview can build
Feb 13, 2024
a3babb0
Point to 1.5.x rc branch
Feb 14, 2024
9210f98
Merge branch 'main' into 1.5.x
Feb 14, 2024
5e29995
Temporarily try catch md parsing so previews will build
Feb 14, 2024
6d09bfc
Update links for account.md description
Feb 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/routes/docs/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
href: '/docs/products/storage',
icon: 'icon-folder',
isParent: true
},
{
label: 'Messaging',
href: '/docs/products/messaging',
icon: 'icon-send',
isParent: true
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions src/routes/docs/products/auth/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
label: 'JWT login',
href: '/docs/products/auth/jwt'
},
{
label: 'Multi-factor authentication',
href: '/docs/products/auth/mfa'
},
]
},
{
Expand Down
167 changes: 167 additions & 0 deletions src/routes/docs/products/auth/mfa/+page.markdoc
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?]
Copy link
Contributor Author

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 :)

{% /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');

// Email
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 src/routes/docs/products/databases/queries/+page.markdoc

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions src/routes/docs/products/messaging/+layout.svelte
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>
12 changes: 12 additions & 0 deletions src/routes/docs/products/messaging/+page.markdoc
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 %}
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 src/routes/docs/products/messaging/providers/+layout@.svelte
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>
Loading
Loading