Skip to content

Commit 5ea5fc2

Browse files
add readme
1 parent 355c081 commit 5ea5fc2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Learn more about Appwrite [here](https://appwrite.io/).
1919
- Forgot password and reset password
2020
- Beautiful and animated UI
2121
- Built on File-based routing
22+
- Supports Dark and Light mode
2223

2324
## Tech Stack
2425

@@ -45,6 +46,35 @@ Once you have the project setup, let's setup Appwrite Project and configure the
4546

4647
5. To Setup OAuth providers, go to the `Auth => Settings ` tab in the Appwrite dashboard and add the providers you want to use. Refer to their individual docs on how to setup the OAuth providers.
4748

49+
#### Setup Cloud Function
50+
51+
This projects uses a cloud function that redirects back to your app when you click the password reset login you receive in your email. To setup the cloud function, I recommend using `Deploy from Git` option in `Functions` tab in the Appwrite dashboard.
52+
53+
To learn more about how to deploy a function from git, refer to the [Function docs](https://appwrite.io/docs/products/functions/deploy-from-git).
54+
55+
Else you can also use appwrite CLI to deploy the function.
56+
57+
Once you have setup the cloud function, add the following environment variable to the function.
58+
59+
```env
60+
APP_SCHEME=your_app_scheme
61+
```
62+
63+
For example,
64+
65+
```env
66+
APP_SCHEME=rnauth
67+
```
68+
69+
> [!IMPORTANT]
70+
> For security reasons, it is recommended to add the app_scheme in the function environment variable.
71+
> This scheme is needed to redirect back to the app. You can find the scheme in the `app.json` file.
72+
> Without this it won't redirect back to your app
73+
74+
- Once that's done, go to the `Domains` tab and copy the url of the function.
75+
- Then add a new Web app Platform in the Appwrite Project
76+
- Give any name of your choice and paste the hostname of the function in the Hostname field.
77+
4878
That's it for the Appwrite setup. Now let's configure the app.
4979

5080
### App Configuration
@@ -64,6 +94,8 @@ That's it for the Appwrite setup. Now let's configure the app.
6494
EXPO_PUBLIC_REDIRECT_URL=your_appwrite_redirect_url
6595
```
6696

97+
> You will find the Redirect URL in your cloud function under the `Domain` tab. Paste the URL in the `EXPO_PUBLIC_REDIRECT_URL` field.
98+
6799
3. Ensure you change the app name , app slug and bundle identifier in the `app.json` file.
68100

69101
> [!NOTE]

0 commit comments

Comments
 (0)