mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-10 12:57:49 +00:00
Apply suggestions from code review
Co-authored-by: Torsten Dittmann <torsten.dittmann@googlemail.com>
This commit is contained in:
committed by
GitHub
parent
cdb5304ac7
commit
8e54df53fd
@@ -175,7 +175,6 @@ query {
|
||||
|
||||
You can grant permissions to all users using the `Role.users(<STATUS>)` role or
|
||||
individual users using the `Role.user(<USER_ID>, <STATUS>)` role.
|
||||
|
||||
| Description | Role |
|
||||
| ------------------------------------------- | ------------------------------------------- |
|
||||
| Verified users | `Role.users('verified')`|
|
||||
|
||||
@@ -10,7 +10,7 @@ Anonymous sessions allow you to implement **guest** users. Guest users let you s
|
||||
|
||||
# Create anonymous session {% #createSession %}
|
||||
|
||||
Create an anonymous session with [Create Anonymous Session](/docs/references/cloud/client-web/account#createAnonymousSession) route.
|
||||
Create an anonymous session with [Create Anonymous Session](/docs/references/cloud/client-web/account#createAnonymousSession) method.
|
||||
|
||||
{% multicode %}
|
||||
```js
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: article
|
||||
title: Magic URL login
|
||||
description: Add magic URL to your authentication in Appwrite. Explore the convenience of passwordless login and email-based authentication using magic links."
|
||||
description: Add magic URL to your authentication in Appwrite. Explore the convenience of passwordless login and email-based authentication using magic links.
|
||||
---
|
||||
|
||||
Magic URL is a password-less way to authenticate users. When a user logs in by providing their email, they will receive an email with a "magic" link that contains a secret used to log in the user. The user can simply click the link to be logged in.
|
||||
|
||||
@@ -143,7 +143,6 @@ After creating an OAuth 2 session, you can fetch the session to get information
|
||||
|
||||
{% multicode %}
|
||||
```js
|
||||
// Web SDK
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
const client = new Client();
|
||||
@@ -159,7 +158,6 @@ console.log(session.providerAccessToken);
|
||||
```
|
||||
|
||||
```dart
|
||||
// Flutter SDK
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
final client = Client()
|
||||
@@ -179,7 +177,6 @@ print(session.providerAccessToken);
|
||||
```
|
||||
|
||||
```kotlin
|
||||
// Android SDK
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Account
|
||||
|
||||
@@ -200,7 +197,6 @@ print(session.providerAccessToken);
|
||||
```
|
||||
|
||||
```swift
|
||||
// Apple SDK
|
||||
import Appwrite
|
||||
|
||||
let client = Client()
|
||||
|
||||
@@ -89,7 +89,7 @@ mutation {
|
||||
|
||||
# Login {% #login %}
|
||||
|
||||
After you've created your account, users can be logged in using the [Create Email Session](/docs/references/cloud/client-web/account#createEmailSession) route.
|
||||
After you've created your account, users can be logged in using the [Create Email Session](/docs/references/cloud/client-web/account#createEmailSession) method.
|
||||
|
||||
{% multicode %}
|
||||
```js
|
||||
|
||||
@@ -191,7 +191,6 @@ val response = teams.createMembership(
|
||||
|
||||
You can grant permissions to all members of a team using the `Role.team(<TEAM_ID>)` role or
|
||||
individual roles in the team using the `Role.team(<TEAM_ID>, [<ROLE_1>, <ROLE_2>, ...])` role.
|
||||
|
||||
| Description | Role |
|
||||
| ------------------------------------------- | ------------------------------------------- |
|
||||
| All members | `Role.team(<TEAM_ID>)`|
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
},
|
||||
{
|
||||
title: 'Vue.js',
|
||||
icon: 'aw-icon-vue',
|
||||
icon: 'web-icon-vue',
|
||||
image: '/images/blog/placeholder.png',
|
||||
href: 'vue'
|
||||
},
|
||||
{
|
||||
title: 'Nuxt',
|
||||
icon: 'aw-icon-nuxt',
|
||||
icon: 'web-icon-nuxt',
|
||||
image: '/images/blog/placeholder.png',
|
||||
href: 'nuxt'
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
},
|
||||
{
|
||||
title: 'Refine',
|
||||
icon: 'aw-icon-refine',
|
||||
icon: 'web-icon-refine',
|
||||
image: '/images/blog/placeholder.png',
|
||||
href: 'refine'
|
||||
},
|
||||
|
||||
@@ -130,7 +130,6 @@ async function prepareDatabase(): Promise<void> {
|
||||
255, false,
|
||||
'This is a test description'
|
||||
);
|
||||
|
||||
await databases.createBooleanAttribute(
|
||||
todoDatabase.$id,
|
||||
todoCollection.$id,
|
||||
@@ -176,7 +175,6 @@ async function seedDatabase(): Promise<void> {
|
||||
ID.unique(),
|
||||
testTodo2
|
||||
);
|
||||
|
||||
await databases.createDocument(
|
||||
todoDatabase.$id,
|
||||
todoCollection.$id,
|
||||
|
||||
@@ -119,7 +119,6 @@ async function prepareDatabase() {
|
||||
255, false,
|
||||
'This is a test description'
|
||||
);
|
||||
|
||||
await databases.createBooleanAttribute(
|
||||
todoDatabase.$id,
|
||||
todoCollection.$id,
|
||||
@@ -158,14 +157,12 @@ async function seedDatabase() {
|
||||
sdk.ID.unique(),
|
||||
testTodo1
|
||||
);
|
||||
|
||||
await databases.createDocument(
|
||||
todoDatabase.$id,
|
||||
todoCollection.$id,
|
||||
sdk.ID.unique(),
|
||||
testTodo2
|
||||
);
|
||||
|
||||
await databases.createDocument(
|
||||
todoDatabase.$id,
|
||||
todoCollection.$id,
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/android/step-1');
|
||||
redirect(303, '/docs/tutorials/android/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/apple/step-1');
|
||||
redirect(303, '/docs/tutorials/apple/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/flutter/step-1');
|
||||
redirect(303, '/docs/tutorials/flutter/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/nuxt/step-1');
|
||||
redirect(303, '/docs/tutorials/nuxt/step-1');
|
||||
};
|
||||
|
||||
@@ -103,7 +103,6 @@ const user = useUserSession();
|
||||
<IdeasList />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
article.box {
|
||||
background-color: hsl(var(--color-neutral-0));
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/react/step-1');
|
||||
redirect(303, '/docs/tutorials/react/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/refine/step-1');
|
||||
redirect(303, '/docs/tutorials/refine/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/subscriptions-with-stripe/step-1');
|
||||
redirect(303, '/docs/tutorials/subscriptions-with-stripe/step-1');
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ category: Auth
|
||||
Appwrite takes away your stress of building and maintaining a backend. Appwrite helps you implement authentication, databases, file storage, and respond to real-time events with **secure** APIs out of the box.
|
||||
If you're a Svelte developer, examples in this guide shows you how Appwrite can help you add authentication to Svelte apps faster.
|
||||
|
||||
## Before you start
|
||||
# Before you start {% #before-you-start %}
|
||||
|
||||
Even if you've never tried Appwrite, you will get an idea of what it'll feel like to build with Svelte and Appwrite.
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ create-svelte version 3.2.0
|
||||
└ Your project is ready!
|
||||
```
|
||||
|
||||
After the prompt is finished, you can head over to the newly create project.
|
||||
After the prompt is finished, you can head over to the newly created project.
|
||||
|
||||
```sh
|
||||
cd my-svelte-project
|
||||
npm install
|
||||
```
|
||||
|
||||
## Adding Appwrite to Your Svelte App
|
||||
# Adding Appwrite to your Svelte app {% #adding-appwrite-to-your-svelte-app %}
|
||||
|
||||
Appwrite provides a Web SDK that can be used in your Svelte apps. You can use Appwrite by installing the Web SDK as an NPM package.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export const appwrite = {
|
||||
|
||||
For example, your `.env` might look something similar to this.
|
||||
|
||||
```text
|
||||
```env
|
||||
PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
|
||||
PUBLIC_APPWRITE_PROJECT=642sdddf85b440dc7e5bf
|
||||
```
|
||||
|
||||
@@ -6,6 +6,6 @@ step: 7
|
||||
---
|
||||
If you want to see these authentication concepts applied in a more robust manner, you can see them in action in this [demo app](https://github.com/appwrite/getting-started-projects/tree/main/svelte/auth).
|
||||
|
||||
## Other authentication methods
|
||||
# Other authentication methods {% #other-authentication-methods %}
|
||||
Appwrite also supports OAuth, passwordless login, anonymous login, and phone login.
|
||||
Learn more about them in the [authentication guide](https://appwrite.io/docs/products/auth).
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/sveltekit/step-1');
|
||||
redirect(303, '/docs/tutorials/sveltekit/step-1');
|
||||
};
|
||||
|
||||
@@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async () => {
|
||||
throw redirect(303, '/docs/tutorials/vue/step-1');
|
||||
redirect(303, '/docs/tutorials/vue/step-1');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user