-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from CSSE6400/86
adr stuff
- Loading branch information
Showing
6 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
# ADR001 | ||
|
||
## Authentication | ||
Authenticate user actions - don't want users editing or deleting content of other users. | ||
|
||
Implementing user authentication for actions on post, patch, edit (anything that changes db). | ||
|
||
## Options | ||
- Add options here | ||
|
||
- No user authentication | ||
- User authentication | ||
- Auth0 | ||
- OAuth2 | ||
- NextAuth.js | ||
|
||
We picked auth0 as it is a well known and trusted service that is easy to implement and is well tested. Auth0 also has a terraform provider which allows us to integrate it into our IAC for easy deployments/ teardowns. | ||
|
||
## Outcome | ||
Frontend authentication handled by Auth0. Backend user table added to track user IDs and associate with comments. | ||
|
||
Users are authenticated using Auth0. Managed through terraform for easy deployment and teardowns. Cannot run e2e tests on workflow because we do not have permissions in our repository to manage secrets for auth0. This meant that e2e tests can only be run locally. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
# ADR003 | ||
|
||
## ROUTES | ||
|
||
Introduce more files to decrease the size of routes.ts and as such improve readability and maintainability of code | ||
|
||
## Options | ||
|
||
- All route functions in routes.ts | ||
- Route functions in files based of their path i.e. /courses goes to courses.ts | ||
|
||
### Why choose one file over seperate files | ||
### Why choose one file over separate files | ||
|
||
| Pros | Cons | | ||
|----|----| | ||
| All routes are easy to find since they are all in the one file | Easier to search for functionality as question based routes are grouped in questions.ts | | ||
| - | Having a large file can be hard to read and understand, making it more difficult to understand and debug | | ||
|
||
## Outcome | ||
Moved the routes to their seperate files to increase readability of the code. | ||
|
||
Moved the routes to their separate files to increase readability of the code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters