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: CONTRIBUTING.md
+32-32
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ Please help us keep all our projects open and inclusive. Kindly follow our [Code
8
8
9
9
## Quick Start
10
10
11
-
GoTrue has a development container setup that makes it easy to get started contributing. This setup only requires that [Docker](https://www.docker.com/get-started) is setup on your system. The development container setup includes a PostgreSQL container with migrations already applied and a container running GoTrue that will perform a hot reload when changes to the source code are detected.
11
+
Auth has a development container setup that makes it easy to get started contributing. This setup only requires that [Docker](https://www.docker.com/get-started) is setup on your system. The development container setup includes a PostgreSQL container with migrations already applied and a container running GoTrue that will perform a hot reload when changes to the source code are detected.
12
12
13
-
If you would like to run GoTrue locally or learn more about what these containers are doing for you, continue reading the [Setup and Tooling](#setup-and-tooling) section below. Otherwise, you can skip ahead to the [How To Verify that GoTrue is Available](#how-to-verify-that-gotrue-is-available) section to learn about working with and developing GoTrue.
13
+
If you would like to run Auth locally or learn more about what these containers are doing for you, continue reading the [Setup and Tooling](#setup-and-tooling) section below. Otherwise, you can skip ahead to the [How To Verify that GoTrue is Available](#how-to-verify-that-auth-is-available) section to learn about working with and developing GoTrue.
14
14
15
-
Before using the containers, you will need to make sure an `.env.docker` file exists by making a copy of `example.docker.env` and configuring it for your needs. The set of env vars in `example.docker.env` only contain the necessary env vars for gotrue to start in a docker environment. For the full list of env vars, please refer to `example.env` and copy over the necessary ones into your `.env.docker` file.
15
+
Before using the containers, you will need to make sure an `.env.docker` file exists by making a copy of `example.docker.env` and configuring it for your needs. The set of env vars in `example.docker.env` only contain the necessary env vars for auth to start in a docker environment. For the full list of env vars, please refer to `example.env` and copy over the necessary ones into your `.env.docker` file.
16
16
17
17
The following are some basic commands. A full and up to date list of commands can be found in the project's `Makefile` or by running `make help`.
18
18
@@ -50,12 +50,12 @@ make docker-build
50
50
51
51
## Setup and Tooling
52
52
53
-
GoTrue -- as the name implies -- is a user registration and authentication API developed in [Go](https://go.dev).
53
+
Auth -- as the name implies -- is a user registration and authentication API developed in [Go](https://go.dev).
54
54
55
55
It connects to a [PostgreSQL](https://www.postgresql.org) database in order to store authentication data, [Soda CLI](https://gobuffalo.io/en/docs/db/toolbox) to manage database schema and migrations,
56
56
and runs inside a [Docker](https://www.docker.com/get-started) container.
57
57
58
-
Therefore, to contribute to GoTrue you will need to install these tools.
58
+
Therefore, to contribute to Auth you will need to install these tools.
59
59
60
60
### Install Tools
61
61
@@ -91,25 +91,25 @@ If you are on macOS Catalina you may [run into issues installing Soda with Brew]
91
91
go install github.com/gobuffalo/pop/soda@latest
92
92
```
93
93
94
-
- Clone the GoTrue[repository](https://github.com/supabase/gotrue)
94
+
- Clone the Auth[repository](https://github.com/supabase/auth)
95
95
96
96
```
97
-
git clone https://github.com/supabase/gotrue
97
+
git clone https://github.com/supabase/auth
98
98
```
99
99
100
-
### Install GoTrue
100
+
### Install Auth
101
101
102
102
To begin installation, be sure to start from the root directory.
103
103
104
-
-`cd gotrue`
104
+
-`cd auth`
105
105
106
106
To complete installation, you will:
107
107
108
108
- Install the PostgreSQL Docker image
109
109
- Create the DB Schema and Migrations
110
110
- Setup a local `.env` for environment variables
111
-
- Compile GoTrue
112
-
- Run the GoTrue binary executable
111
+
- Compile Auth
112
+
- Run the Auth binary executable
113
113
114
114
#### Installation Steps
115
115
@@ -159,7 +159,7 @@ Status: Downloaded newer image for postgres:14
You should then see in Docker that `gotrue_postgresql` is running on `port: 5432`.
162
+
You should then see in Docker that `auth_postgresql` is running on `port: 5432`.
163
163
164
164
> **Important** If you happen to already have a local running instance of Postgres running on the port `5432` because you
165
165
> may have installed via [homebrew on OSX](https://formulae.brew.sh/formula/postgresql) then be certain to stop the process using:
@@ -168,7 +168,7 @@ You should then see in Docker that `gotrue_postgresql` is running on `port: 5432
168
168
>
169
169
> If you need to run the test environment on another port, you will need to modify several configuration files to use a different custom port.
170
170
171
-
3. Next compile the GoTrue binary:
171
+
3. Next compile the Auth binary:
172
172
173
173
```
174
174
make build
@@ -180,10 +180,10 @@ make build
180
180
make migrate_test
181
181
```
182
182
183
-
You should see log messages that indicate that the GoTrue migrations were applied successfully:
183
+
You should see log messages that indicate that the Auth migrations were applied successfully:
184
184
185
185
```terminal
186
-
INFO[0000] GoTrue migrations applied successfully
186
+
INFO[0000] Auth migrations applied successfully
187
187
DEBU[0000] after status
188
188
[POP] 2021/12/15 10:44:36 sql - SELECT EXISTS (SELECT schema_migrations.* FROM schema_migrations AS schema_migrations WHERE version = $1) | ["20210710035447"]
189
189
[POP] 2021/12/15 10:44:36 sql - SELECT EXISTS (SELECT schema_migrations.* FROM schema_migrations AS schema_migrations WHERE version = $1) | ["20210722035447"]
@@ -201,39 +201,39 @@ Version Name Status
201
201
That lists each migration that was applied. Note: there may be more migrations than those listed.
202
202
203
203
4. Create a `.env` file in the root of the project and copy the following config in [example.env](example.env)
204
-
5. In order to have GoTrue connect to your PostgreSQL database running in Docker, it is important to set a connection string like:
204
+
5. In order to have Auth connect to your PostgreSQL database running in Docker, it is important to set a connection string like:
> Important: GoTrue requires a set of SMTP credentials to run, you can generate your own SMTP credentials via an SMTP provider such as AWS SES, SendGrid, MailChimp, SendInBlue or any other SMTP providers.
210
+
> Important: Auth requires a set of SMTP credentials to run, you can generate your own SMTP credentials via an SMTP provider such as AWS SES, SendGrid, MailChimp, SendInBlue or any other SMTP providers.
211
211
212
-
6. Then finally Start GoTrue
213
-
7. Verify that GoTrue is Available
212
+
6. Then finally Start Auth
213
+
7. Verify that Auth is Available
214
214
215
-
### Starting GoTrue
215
+
### Starting Auth
216
216
217
-
Start GoTrue by running the executable:
217
+
Start Auth by running the executable:
218
218
219
219
```
220
-
./gotrue
220
+
./auth
221
221
```
222
222
223
-
This command will re-run migrations and then indicate that GoTrue has started:
223
+
This command will re-run migrations and then indicate that Auth has started:
224
224
225
225
```
226
-
INFO[0000] GoTrue API started on: localhost:9999
226
+
INFO[0000] Auth API started on: localhost:9999
227
227
```
228
228
229
-
### How To Verify that GoTrue is Available
229
+
### How To Verify that Auth is Available
230
230
231
-
To test that your GoTrue is up and available, you can query the `health` endpoint at `http://localhost:9999/health`. You should see a response similar to:
231
+
To test that your Auth is up and available, you can query the `health` endpoint at `http://localhost:9999/health`. You should see a response similar to:
232
232
233
233
```json
234
234
{
235
-
"description": "GoTrue is a user registration and authentication API",
236
-
"name": "GoTrue",
235
+
"description": "Auth is a user registration and authentication API",
236
+
"name": "Auth",
237
237
"version": ""
238
238
}
239
239
```
@@ -430,7 +430,7 @@ make migrate_test
430
430
431
431
## Testing
432
432
433
-
Currently, we don't use a separate test database, so the same database created when installing GoTrue to run locally is used.
433
+
Currently, we don't use a separate test database, so the same database created when installing Auth to run locally is used.
434
434
435
435
The following commands should help in setting up a database and running the tests:
0 commit comments