You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ts/auth0-react-sdk/README.md
+36-9Lines changed: 36 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Next, go to the *Application Settings* section. There you will find the `Domain`
30
30
Copy these values, we will need them shortly.
31
31
32
32
A callback URL is where Auth0 redirects the user after they have been authenticated. Add `http://localhost:3000` to the *Allowed Callback URLs*.
33
-
You will need to add more URLs to this list when you have a production or staging environments.
33
+
You will need to add more URLs to this list when you have a deployed frontend environment.
34
34
35
35
The same goes for the logout URL (were the user will get redirected after logout). Add `http://localhost:3000` to the *Allowed Logout URLs*.
36
36
@@ -82,27 +82,54 @@ Keep the contract between the backend and frontend in sync by regenerating the r
82
82
to an Encore endpoint.
83
83
84
84
```bash
85
-
npm run gen # Deployed Encore staging environment
86
-
# or
87
-
npm run gen:local # Locally running Encore backend
85
+
npm run gen # Locally running Encore backend
88
86
```
89
87
90
88
## Deployment
91
89
92
-
### Encore
90
+
### Encore Backend
93
91
94
-
Deploy your backend to a staging environment in Encore's free development cloud:
92
+
#### Self-hosting
93
+
94
+
See the [self-hosting instructions](https://encore.dev/docs/self-host/docker-build) for how to use `encore build docker` to create a Docker image and configure it.
95
+
96
+
#### Encore Cloud Platform
97
+
98
+
Deploy your application to a free staging environment in Encore's development cloud using `git push encore`:
95
99
96
100
```bash
97
101
git add -A .
98
102
git commit -m 'Commit message'
99
103
git push encore
100
104
```
101
105
102
-
Then head over to the [Cloud Dashboard](https://app.encore.dev) to monitor your deployment and find your production URL.
106
+
You can also open your app in the [Cloud Dashboard](https://app.encore.dev) to integrate with GitHub, or connect your AWS/GCP account, enabling Encore to automatically handle cloud deployments for you.
107
+
108
+
#### Link to GitHub
109
+
110
+
Follow these steps to link your app to GitHub:
111
+
112
+
1. Create a GitHub repo, commit and push the app.
113
+
2. Open your app in the [Cloud Dashboard](https://app.encore.dev).
114
+
3. Go to **Settings ➔ GitHub** and click on **Link app to GitHub** to link your app to GitHub and select the repo you just created.
115
+
4. To configure Encore to automatically trigger deploys when you push to a specific branch name, go to the **Overview** page for your intended environment. Click on **Settings** and then in the section **Branch Push** configure the **Branch name** and hit **Save**.
116
+
5. Commit and push a change to GitHub to trigger a deploy.
117
+
118
+
[Learn more in the docs](https://encore.dev/docs/how-to/github)
119
+
120
+
### React frontend
121
+
122
+
#### Vercel
123
+
124
+
The frontend can be deployed to Vercel. Follow these steps:
125
+
126
+
1. Create a repo and push the project to GitHub.
127
+
2. Create a new project on Vercel and point it to your GitHup repo.
128
+
3. Select `frontend` as the root directory for the Vercel project.
103
129
104
-
From there you can also see metrics, traces, connect your app to a
105
-
GitHub repo to get automatic deploys on new commits, and connect your own AWS or GCP account to use for deployment.
130
+
Once you have your frontend deployed:
131
+
* Update the *Allowed Callback URLs*, *Allowed Logout URLs* & *Allowed Web Origins* settings in your application on Auth0 with the deployed Vercel URL.
132
+
* Set the `allow_origins_with_credentials` in the `encore.app` (see below) file to the deployed Vercel URL.
0 commit comments