28 Commits

Author SHA1 Message Date
Pancakes
00e783ff8a
Styling fixes 2024-10-22 15:50:01 -04:00
Frederico Santos
8e20875453
feat: Add admin Discord link endpoint (#49)
* feat: Add admin Discord link endpoint

* feat: Add Discord Guild ID flag to server configuration

* feat: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Update variable name for Discord guild ID in account package

* chore: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Add admin Discord link endpoint

* chore: Add logging for Discord ID addition in admin Discord link endpoint

* chore: Remove unnecessary code in handleAdminDiscordLink function

* chore: Update logging format in handleAdminDiscordLink function

* chore: Refactor handleAdminDiscordLink function for improved logging

* chore: Update Discord Bot Token and Discord Guild ID flags in server configuration

* chore: Refactor handleAccountInfo function for improved readability and error handling

* chore: Update server configuration flags for Discord Bot Token and Guild ID

* Refactor handleAdminDiscordLink function for improved error handling and logging

* feat: Add "Helper" role to Discord admin check for enhanced access control
2024-09-13 22:32:49 -04:00
Pancakes
a3fcec4a4c
Don't use Sprintf in Errorf for no reason 2024-09-10 21:39:07 -04:00
Pancakes
9b771cbac6
Run gofmt 2024-07-27 21:12:51 -04:00
Pancakes
ed8122cd3b
Don't defer redirects 2024-07-27 20:58:17 -04:00
Pancakes
611a0e3dec
Fix game url stuff in google.go 2024-07-27 20:53:30 -04:00
Pancakes
855760ed01
Fix more stuff 2024-07-27 20:43:29 -04:00
Pancakes
2ee09afac2
Emergency fixes 2024-07-27 20:38:32 -04:00
Frederico Santos
fa57f5997f
Added support for Discord OAuth2 (#25)
* Need a login check

* chore: Add Discord OAuth2 authentication endpoint

chore: Update dependencies and clean up code

chore: Update dependencies, add Discord OAuth2 authentication endpoint, and clean up code

chore: Update dependencies, add Google OAuth2 authentication endpoint, and clean up code

Code clean up

uniqueness on external account id

chore: Add Discord and Google OAuth2 authentication endpoints, and update dependencies

code review fixes

* chore: Update prodHandler to use clienturl flag for Access-Control-Allow-Origin

* chore: Refactor FetchDiscordIdByUsername and FetchGoogleIdByUsername to handle null values

* chore: Set secure and same-site attributes for session cookie

* chore: Set session cookie expiration to 3 months

* Update callback URL for Oauth2 client in docker-compose and rogueserver.go

* Update callback URL for Oauth2 client in docker-compose and rogueserver.go

---------

Co-authored-by: Matthew Olker <matthew.olker@gmail.com>
2024-07-27 18:41:44 -04:00
Pancakes
567cb9c7be
Optimize /account/info 2024-06-16 18:29:13 -04:00
maru
cd13fe3cff
Use errors.Is everywhere 2024-05-24 01:49:35 -04:00
Up
834d1e62a0
add foreign key constraint on client session table 2024-05-14 14:33:53 +02:00
maru
192b777ac3
Set ArgonMaxInstances to number of cores 2024-05-08 20:08:10 -04:00
Up
405a578e8c manually parse all save states for now 2024-05-07 19:33:21 -04:00
Up
0d6539a87b
continue on existing save (#3)
* long blob

* fix continue

* one slot only?

* fallback if there is no slot data yet

* Revert "one slot only?"

This reverts commit 20997e9cd8efc9e94522978e15dfc490e13aba8a.
2024-05-07 19:14:07 -04:00
Up
1f95f7c042
hotfix: move save data to DB (#2)
* start reading save data from DB

* finish migration code

* remove leftover dir creation

* fix import cycle

* remove more dir creation

* update gitignore

* fix pk

* better table creation

* use REPLACE INTO

* fix typo
2024-05-07 17:10:33 -04:00
maru
8481626193
Relicense under AGPL 2024-04-29 17:26:46 -04:00
maru
235fb9c91c
Add copyright notice to files 2024-04-29 15:32:58 -04:00
maru
e8240c9c38
Rename to rogueserver 2024-04-29 15:22:27 -04:00
maru
cbcc68f8e4
Add password changes 2024-04-28 17:27:58 -04:00
maru
4ce5a0198d
Don't check token length twice in Logout 2024-04-26 13:17:06 -04:00
maru
b00ed4c0b9
Use WriteFile instead of stream writing to files 2024-04-22 18:01:17 -04:00
maru
1d54c1ad64
Use channels to rate limit argon2 2024-04-19 13:27:55 -04:00
maru
fbd4a60a4a
Add mutex to deriveArgon2IDKey 2024-04-19 12:48:14 -04:00
maru
62102ab4fd
Use forms instead of JSON for login/register requests 2024-04-18 18:26:43 -04:00
maru
39199dc1b1
Move consts in account package to common.go 2024-04-15 03:18:40 -04:00
maru
f395dc145b
Code consistency 2024-04-15 03:15:10 -04:00
maru
1f0f38d38e
Move endpoint categories into their own packages 2024-04-14 20:03:53 -04:00