Skip to content

Conversation

@Archasion
Copy link
Contributor

No description provided.

maefall and others added 15 commits November 19, 2024 20:31
* Start work on the wrappers for database interactions

* (db): sessions & connections, user_id for users

* (flake): delete_dev_db()

* refactor(field-name): Rename `database_connection` to `conn`, commonly used and straightforward

* refactor(schema): Rename fields

* refactor(db-models): Rename files from `db_interaction_models` to `models` for conciseness

* refactor(db-wrappers): Rename methods

* refactor(db-migrations): Remove indexes

* refactor(dependencies): Uninstall `serde` and `serde_json` - Unnecessary

* refactor(dependencies): Disable default features for `chrono` and `diesel`

* refactor(http-errors): Catch all HTTP errors

* chore(security): Set the `SameSite` attribute of the `session` cookie to `Strict` as it shouldn't involve any cross-site requests

* refactor(roblox-oauth-callback): Update todo comment in accordance to recent implementation changes

* chore(db): Update schema, migrations, and add model builders

* refactor(sessions-db): Add token expiration timestamp

* refactor(discord-connections-db): Make field names more concise

* chore(discord-connections-db): Add nonce fields for encryption

* refactor(fmt): Run formatter

* chore(cipher): Implement encryption and decryption methods

* chore(discord-connections-db): Implement token encryption method

* refactor(fmt): Run formatter

* refactor(tests): Correct placement of unit tests

* refactor(env-example): Remove `DATABASE_URL`

* refactor(env-example): Correct `openssl` example

* fix(exports): Correct visibility of db exports

* fix(discord-oauth-callback): Generate session using correct function

* refactor(cipher): Cleanup

* refactor(cipher): Use in-place encryption to avoid cloning the value and add tests for DiscordConnectionBuilder

* refactor: Clean up file structure

* fix(roblox-oauth): Import correct method

* chore(discord-connections-db): Insert callback data into db

* refactor(fmt): Run formatter

* refactor(env): Add `DATABASE_URL` back and add db variables

---------

Co-authored-by: nick <59822256+Archasion@users.noreply.github.com>
* chore(discord-oauth2): Implement token refresh endpoint

* chore(discord-oauth2): Complete refresh token implementation

* refactor(discord-refresh-token): Return correct error code

* refactor: Remove index page

* refactor(discord-refresh-token): Refresh token using session token

* refactor(sessions): Add endpoint for refreshing session token

* fix(db): Prevent parameter names from being overridden

* refactor: Cleanup

* refactor: Remove init db file

* refactor(routes): Correct HTTP response statuses

* chore(config): Add config file for CORS

* fix(gitignore): Add Cargo.lock
…o the status reason if no error message is given
* stuff

* Roblox OAuth

* Remove an unnecessary dependency

* Flake: delete_dev_db on exit

* refactor(dependencies): Uninstall `secrecy` crate

* refactor: Add comments

* chore(cfg): Add example config

* refactor(fmt): Run formatter

* refactor(session-request-guard): Streamline implementation of the session request guard by verifying that the session ID is stored in the database and returning the database entry

* fix(discord-api): Correct endpoints

* refactor(env-example): Add example for `ROBLOX_CLIENT_SECRET`

* chore(routes): Add roblox oauth2 routes to route method

* refactor(roblox-connections): Make roblox_uid a foreign key

* fix(roblox-token-request-body): Use roblox client ID instead of Discord client ID

* fix(db): Add timestamp to migration

* refactor(db-wrappers): Create upsert methods

* docs(roblox-oauth): Document routes

* refactor(discord-callback): Redirect user to success page on Ok

* refactor(fmt): Run formatter

---------

Co-authored-by: nick <59822256+Archasion@users.noreply.github.com>
@Archasion Archasion merged commit b7e1809 into master Dec 7, 2024
2 checks passed
@Archasion Archasion deleted the oauth branch December 7, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants