Skip to content

Commit 0293243

Browse files
committed
docs: update FlutterFlow auth kit integration docs and cover image
1 parent c5ae247 commit 0293243

File tree

2 files changed

+91
-96
lines changed
  • src/routes/integrations/flutterflow-auth-kit
  • static/images/integrations/flutterflow-auth-kit

2 files changed

+91
-96
lines changed

src/routes/integrations/flutterflow-auth-kit/+page.markdoc

Lines changed: 91 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ As you start creating your FlutterFlow app, you might want to add user accounts
3131

3232
By the end of this guide, you’ll have a fully functional authentication system with:
3333

34-
- Email/password sign-up and login
35-
- Secure session management
36-
- User profile handling
37-
- Error handling with user feedback
38-
- Protected routes for authenticated users
34+
- Email/password sign-up and login.
35+
- Secure session management.
36+
- User profile handling.
37+
- Error handling with user feedback.
38+
- Protected routes for authenticated users.
3939

4040
Want to see the final result first? Check out our [Appwrite Flutterflow Demo App](https://app.flutterflow.io/project/appwrite-auth-yxmd9b) to experience all these features in action! Then follow along to build your own custom version.
4141

@@ -44,164 +44,159 @@ Want to see the final result first? Check out our [Appwrite Flutterflow Demo App
4444
# Before you start
4545

4646
Here’s what you’ll need to have ready:
47-
- [Appwrite account](https://cloud.appwrite.io/console/register)
48-
- [FlutterFlow account](https://app.flutterflow.io/create-account)
49-
- [FlutterFlow Marketplace account](https://marketplace.flutterflow.io/login) (must use the same email as your FlutterFlow account)
50-
- Basic understanding of FlutterFlow’s interface
47+
- [Appwrite account](https://cloud.appwrite.io/console/register).
48+
- [FlutterFlow account](https://app.flutterflow.io/create-account).
49+
- [FlutterFlow Marketplace account](https://marketplace.flutterflow.io/login) (must use the same email as your FlutterFlow account).
50+
- Basic understanding of FlutterFlow’s interface.
5151

52-
53-
## Step 1: Setting up your Appwrite project
52+
## Step 1: Setting up your Appwrite project
5453

5554
Let’s start by getting your Appwrite project ready:
5655

57-
1. Head over to the [Appwrite Console](https://cloud.appwrite.io/)
58-
2. Create a new project (give it a name that makes sense for your app)
59-
3. Choose Flutter as your platform
60-
4. Configure the platform settings by adding these domains:
61-
62-
| Purpose | Domains |
63-
|------------------------|----------------------|
64-
| Local testing | localhost |
65-
| FlutterFlow web testing | `.web.app`, `.run.app` |
56+
1. Head over to the [Appwrite Console](https://cloud.appwrite.io/).
57+
2. Create a new project (give it a name that makes sense for your app).
58+
3. Select "Add Platform" from the **Platforms** tab.
59+
4. For each target platform, provide the required information as shown below:
6660

67-
Note: Save your Project ID – you’ll need it for the next steps
61+
| Platform | Required Info |
62+
|----------------|---------------------------------------------------|
63+
| Web app / FlutterFlow Web Testing | Hostnames: `localhost`, `*.web.app`, `*.run.app` |
64+
| Android app | Package name (e.g. `com.company.appname`) |
65+
| Apple app (iOS)| Bundle ID (e.g. `com.company.appname`) |
66+
| Flutter app | Choose one or more supported platforms (Web, iOS, Android) and enter appropriate identifiers |
6867

68+
📌 **Save your Project ID** – you’ll need it in the next step.
6969

7070
## Step 2: Adding the authentication library
7171

7272
The Authentication library provides essential core functionality:
7373

74-
- Pre-configured Custom Actions for authentication
75-
- App States for session management
76-
- Built-in Error Handling
77-
- User Session Management
78-
- Custom Data Types for type-safe responses
74+
- Pre-configured Custom Actions for authentication.
75+
- App States for session management.
76+
- Built-in Error Handling.
77+
- User Session Management.
78+
- Custom Data Types for type-safe responses.
7979

8080
### Here’s how to add it to your project:
8181

82-
1. Visit the [FlutterFlow Marketplace](https://marketplace.flutterflow.io/)
83-
2. Search for “Appwrite Authentication Kit” or visit [Appwrite Authentication Kit](https://marketplace.flutterflow.io/item/h1gn6StcXy6imjg7Ykr2)
84-
3. Click “Add” to add it to your marketplace account
82+
1. Visit the [FlutterFlow Marketplace](https://marketplace.flutterflow.io/).
83+
2. Search for “Appwrite Authentication Kit” or visit [Appwrite Authentication Kit](https://marketplace.flutterflow.io/item/h1gn6StcXy6imjg7Ykr2).
84+
3. Click “Add” to add it to your marketplace account.
8585
4. In your FlutterFlow project:
8686

87-
88-
- Navigate to `Project Settings > Project Dependencies`
89-
- Find “Appwrite Authentication Kit” under FlutterFlow Libraries
90-
- Click “Add Library”
87+
- Navigate to `Project Settings > Project Dependencies`.
88+
- Find “Appwrite Authentication Kit” under FlutterFlow Libraries.
89+
- Click “Add Library”.
9190

9291
![Screenshot of login](/images/integrations/flutterflow-auth-kit/screenshot.png)
9392

94-
## Step 3: Understanding the components
93+
### Configure the Authentication Library
9594

96-
### App states:
95+
Once the library is added, you can configure it without writing any code:
9796

98-
The library sets up two essential app states:
97+
1. Navigate to `Settings > Project Dependencies` in your FlutterFlow project.
98+
2. Under the **Appwrite Authentication Kit** entry, click on **View Details**.
99+
3. Update the environment values directly in the panel that opens:
100+
101+
- API Endpoint: `https://cloud.appwrite.io/v1`
102+
- Project ID: `Your Appwrite Project ID`
103+
104+
Note: This view opens automatically the first time a user adds the library - making it super easy to update values right away.
99105

100-
- `appwriteConfig`: Stores configuration details securely
101-
- `appwriteUser`: Manages user session information
106+
107+
## Step 3: Understanding the components
108+
109+
The library sets up two essential app states:
110+
- `appwriteConfig`: Stores configuration details securely.
111+
- `appwriteUser`: Manages user session information.
102112

103113
Both states are automatically configured with:
104114

105-
- String data type
106-
- Persistence enabled
107-
- Authentication flow readiness
115+
- String data type.
116+
- Persistence enabled.
117+
- Authentication flow readiness.
108118

109119
### Custom Data Types:
110120

111121
The library provides two custom data types for type-safe responses:
112122

113-
1. `AppwriteUser`: Represents user data
114-
- Fields: id, email, name, emailVerified, status
115-
- Used for: Storing and passing user information
123+
1. `AppwriteUser`: Represents user data.
124+
- Fields: id, email, name, emailVerified, status.
125+
- Used for: Storing and passing user information.
116126

117-
2. `AppwriteUserResponse`: Standard response format
118-
- Fields: success, error, errorCode, errorType, formattedError, user
119-
- Used for: Consistent error handling and success responses
127+
2. `AppwriteUserResponse`: Standard response format.
128+
- Fields: success, error, errorCode, errorType, formattedError, user.
129+
- Used for: Consistent error handling and success responses.
120130

121131
### Authentication actions:
122132

123133
The library provides five essential custom actions:
124134

125135
1. `initialize`
126-
- Purpose: Sets up your Appwrite configuration
127-
- Returns: `AppwriteUserResponse` with initialization status
128-
- Must be called before any other authentication action
136+
- Purpose: Sets up your Appwrite configuration.
137+
- Returns: `AppwriteUserResponse` with initialization status.
138+
- Must be called before any other authentication action.
129139

130140
2. `signUpWithEmailAndPassword`
131-
- Parameters: email, password
132-
- Returns: `AppwriteUserResponse` with user data
133-
- Handles: Account creation and session setup
141+
- Parameters: email, password.
142+
- Returns: `AppwriteUserResponse` with user data.
143+
- Handles: Account creation and session setup.
134144

135145
3. `signInWithEmail`
136-
- Parameters: email, password
137-
- Returns: `AppwriteUserResponse` with session data
138-
- Manages: User login process
146+
- Parameters: email, password.
147+
- Returns: `AppwriteUserResponse` with session data.
148+
- Manages: User login process.
139149

140150
4. `signOut`
141-
- No parameters required
142-
- Returns: `AppwriteUserResponse` with success status
143-
- Handles: Complete session cleanup
151+
- No parameters required.
152+
- Returns: `AppwriteUserResponse` with success status.
153+
- Handles: Complete session cleanup.
144154

145155
5. `getCurrentUser`
146-
- No parameters required
147-
- Returns: `AppwriteUserResponse` with current user data
148-
- Perfect for: Authentication state checks
156+
- No parameters required.
157+
- Returns: `AppwriteUserResponse` with current user data.
158+
- Perfect for: Authentication state checks.
149159

150160
### Understanding action flows:
151161

152162
Each authentication action follows this consistent pattern:
153163

154-
1. Action execution
155-
2. Response handling using `AppwriteUserResponse`
156-
3. Success/failure conditions based on `response.success`
157-
4. Error handling using `response.formattedError`
164+
1. Action execution.
165+
2. Response handling using `AppwriteUserResponse`.
166+
3. Success/failure conditions based on `response.success`.
167+
4. Error handling using `response.formattedError`.
158168

159169
![Flow example](/images/integrations/flutterflow-auth-kit/flow.png)
160170

161-
### Example: Setting up Initialize action
162-
163-
1. Configure Library Values:
164-
- API Endpoint: `https://cloud.appwrite.io/v1`
165-
- Project ID: `Your Appwrite project ID`
166-
2. Drop an `initialize` action in your startup flow
167-
3. Add a condition to check `initializeResult.success`
168-
4. On success: Navigate to success page
169-
5. On failure: Show `initializeResult.formattedError`
170171

171172
### Example: Sign Up flow
172173

173-
1. Use the `signUpWithEmailAndPassword` action
174-
2. Check `signUpResult.success`
175-
3. Success? → Dashboard
176-
4. Failure? → Show `signUpResult.formattedError`
174+
1. Use the `signUpWithEmailAndPassword` action.
175+
2. Check `signUpResult.success`.
176+
3. Success? → Dashboard.
177+
4. Failure? → Show `signUpResult.formattedError`.
177178

178-
You can implement similar flow patterns for other authentication actions (`signInWithEmail`, `signOut`, `getCurrentUser`), following the similar structure of checking results and handling success/failure scenarios appropriately.
179+
You can use `response.error` for internal logging and `response.formattedError` to display user-friendly messages. Similarly, you can implement flow patterns for other authentication actions (`signInWithEmail`, `signOut`, `getCurrentUser`), following the similar structure of checking results and handling success/failure scenarios appropriately.
179180

181+
## See it in action
180182

181-
## See it in action:
183+
Check out our [Appwrite FlutterFlow Demo App](https://app.flutterflow.io/project/appwrite-auth-yxmd9b) to explore the complete auth flow in action - from sign-up to session management.
182184

183-
Want to see how it all comes together? Check out our [Appwrite Flutterflow Demo App](https://app.flutterflow.io/project/appwrite-auth-yxmd9b) where you can check all custom actions in use:
184-
185-
- User registration process
186-
- Login flow
187-
- Session management
188-
- Error handling
189-
- Profile management
190185

191186
## Troubleshooting common issues
192187

193188
1. **Library Not Found**
194-
- Verify marketplace account email matches FlutterFlow account
195-
- Check if library is properly added in Project Dependencies
189+
- Verify marketplace account email matches FlutterFlow account.
190+
- Check if library is properly added in Project Dependencies.
196191

197192
2. **Authentication Failures**
198-
- Confirm `initialize` action is called first
199-
- Verify endpoint and projectId values
200-
- Check Appwrite console for platform settings
193+
- Confirm `initialize` action is called first.
194+
- Verify endpoint and projectId values.
195+
- Check Appwrite console for platform settings.
201196

202197
3. **Session Management Issues**
203-
- Ensure app states are properly configured
204-
- Verify persistence settings
198+
- Ensure app states are properly configured.
199+
- Verify persistence settings.
205200

206201
This completes our guide on setting up Appwrite authentication in your FlutterFlow app. You now have a solid foundation for managing user accounts and secure sessions.
207202

@@ -213,4 +208,4 @@ If you would like to learn more about Appwrite and FlutterFlow, we have some res
213208

214209
- [Appwrite Flutterflow Demo App](https://app.flutterflow.io/project/appwrite-auth-yxmd9b)
215210
- [Appwrite Documentation](https://appwrite.io/docs)
216-
- [FlutterFlow Marketplace](https://marketplace.flutterflow.io/item/h1gn6StcXy6imjg7Ykr2)
211+
- [FlutterFlow Marketplace](https://marketplace.flutterflow.io/item/h1gn6StcXy6imjg7Ykr2)
393 KB
Loading

0 commit comments

Comments
 (0)