-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Discord and Roblox OAuth2 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
* 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.