72 Commits

Author SHA1 Message Date
Evan Goode
817bb432c2 Lint 2025-03-29 19:19:31 -04:00
Evan Goode
9901aa8776 Deterministic OIDC provider display order
Go map iteration order is (intentionally) random
2025-03-29 19:14:57 -04:00
Evan Goode
a9b1531111 Fixups 2025-03-29 17:29:52 -04:00
Evan Goode
d7ffab2612 Update config examples and test them 2025-03-28 20:53:45 -04:00
Evan Goode
8ccb3babeb Fix player faces on admin page 2025-03-22 17:43:56 -04:00
Evan Goode
5c1f6c1cfa
Implement SSO via OIDC (#127)
Resolves https://github.com/unmojang/drasl/issues/39

* Use __Host- cookie prefix instead of setting Domain

See https://stackoverflow.com/a/64735551

* Unlinking OIDC accounts

* AllowPasswordLogin, OIDC docs, cleanup

* YggdrasilError

* Migrate existing password users without login

* API query/create/delete user OIDC identities

* test APICreateOIDCIdentity

* test APIDeleteeOIDCIdentity

* API Create users with OIDC identities

* OIDC: PKCE

* Use YggdrasilError in authlib-injector routes

* OIDC: AllowChoosingPlayerName

* recipes.md: Update for OIDC and deprecated config options

* OIDC: fix APICreateUser without password, validate oidcIdentities

* OIDC: error at complete-registration if no preferred player name

* Proper error pages

* MC_ prefix for Minecraft Tokens
2025-03-22 16:40:26 -04:00
IkyMax
09c9192cca
Authlib-Injector Skin API Support (#144)
* Initial support for Authlib-Injector Upload API

   - Support for HMCL

* Added Skin endpoint

* Support for capes

* Support for DELETE

* Explicitly route authlib-injector URLs, don't rewrite

* Test authlib-injector texture upload/delete

---------

Co-authored-by: Evan Goode <mail@evangoo.de>
2025-03-09 16:15:29 -04:00
Evan Goode
faa2bf9f75 front: Don't pass maxPlayerCount to UpdateUser unless we're setting it 2025-02-27 19:53:23 -05:00
хлифи
fbc8f9d45a
APIs for login and register (#136)
* APIs for login and register

* return 403 instead of 423 if account is locked

* add login API route to ratelimiter

* APILogin remove browser token gen & return, give API token instead

* generalize login logic

* remove transient user handling

* remove APIRegisterChallenge due to unnecessary

* remove honeypot from APIRegister

* APIRegister remove browser token gen & return, give API token instead

* add register API route to ratelimiter

* add missing API godoc

* Clean up app.Login error handling

* Fix rate-limit errors for API routes

* Deduplicate APICreateUser and APIRegister

* Rate-limit all non-admin unsafe API requests

* APILogin test

* Make SetIsLocked write to the tx

* Add CORSAllowOrigins option

* Assert SetIsLocked without err variable

* Fix and test API rate limiting

---------

Co-authored-by: Evan Goode <mail@evangoo.de>
2025-02-15 21:43:02 -05:00
Evan Goode
e286356cd7 Lint 2024-12-28 21:07:32 -05:00
Evan Goode
0865865cd3 Player API routes, API tests/fixes 2024-12-28 21:07:32 -05:00
Evan Goode
d6d29b2274 Allow setting max player count on edit user page 2024-12-28 21:07:32 -05:00
Evan Goode
1da3ac2601 Allow setting user's max player count in admin panel 2024-12-28 21:07:32 -05:00
Evan Goode
faec464a4e Most Front tests passing 2024-12-28 21:07:32 -05:00
Evan Goode
738d80538f Make multiple profiles usable from web front end 2024-12-28 21:07:32 -05:00
Evan Goode
f58ce99eae Initial changes to support multiple players per user 2024-12-28 21:07:32 -05:00
Evan Goode
f02e4370a5 Rework error handling 2024-08-15 12:33:59 -04:00
Evan Goode
db14f9340d APIGetChallengeSkin, cleanup 2024-08-15 12:33:59 -04:00
Evan Goode
8f1a87aa1a More API routes and refactoring 2024-08-15 12:33:59 -04:00
Evan Goode
f7ad78d8e9 refactor: CreateUser 2024-08-15 12:33:59 -04:00
Evan Goode
c70e266d57 Start implementing Drasl API 2024-08-15 12:33:59 -04:00
cat
3441839905 Add ApplicationName, use generic URLs in web UI 2024-08-15 12:33:59 -04:00
Fridtjof_DE
db66a01169 made admins able to bypass AllowChangingPlayerName, AllowSkins and AllowCapes 2023-12-29 20:43:05 -05:00
Evan Goode
e8537ea54c OfflineSkins, also fix several skin issues 2023-11-10 20:19:07 -05:00
Evan Goode
3d54b131c8 Linting, formatting 2023-09-18 21:46:53 -04:00
Evan Goode
a7679dce16 Log responses from fallback API servers 2023-09-18 20:29:43 -04:00
Evan Goode
de43a8068b Update usage on home page, add footer 2023-09-17 00:21:09 -04:00
Evan Goode
f68e2308c0 Icon 2023-09-17 00:21:05 -04:00
Evan Goode
d750dacdbb Config validation/cleaning, cleanup 2023-08-29 00:26:21 -04:00
Evan Goode
e1f0c3e7fe misc cleanup 2023-08-22 17:04:11 -04:00
Evan Goode
fa5cd70eda Make player names case-insensitive
Resolves https://github.com/unmojang/drasl/issues/29
2023-08-20 22:34:55 -04:00
Evan Goode
c5af033ca4 Fix AnonymousLogin, rename to TransientUsers 2023-08-20 02:15:04 +00:00
Evan Goode
3456e33085 Switch from 32-character hex accessTokens to JWTs 2023-08-20 02:15:04 +00:00
Evan Goode
fad4a8498c Print initial invite link if necessary 2023-07-09 01:01:26 -04:00
Evan Goode
eb907decfb withBrowserAdmin 2023-07-07 22:04:57 -04:00
Evan Goode
acbd22a011 DefaultAdmins, interface fixes 2023-07-07 20:39:19 -04:00
Evan Goode
57a1d4b879 skin bug: use profileUser, not user 2023-07-07 17:37:25 -04:00
Evan Goode
1d49f367f6 Add options to disable skins, capes 2023-07-07 16:52:09 -04:00
Evan Goode
f9c548bae1 rework setting skin/cape to hopefully avoid race conditions 2023-07-07 16:30:54 -04:00
Evan Goode
576aff30be honeypot to stop pesky 2009-era form bots 2023-07-07 16:30:48 -04:00
Evan Goode
63fe0a2be3 update-users, delete-user tests, cleanup 2023-07-06 02:38:03 +00:00
Evan Goode
42aed3bf61 Test create/delete invite, some admin stuff 2023-07-06 02:38:03 +00:00
Evan Goode
aca64b5acc invite existing player, mutex for setskin/setcape 2023-07-06 02:38:03 +00:00
Evan Goode
0d53fa95e7 add profile pic to admin view 2023-07-06 02:38:03 +00:00
Evan Goode
ca3821b2cd tests, allow viewing another profile as admin 2023-07-06 02:38:03 +00:00
Evan Goode
dab71ba89e Fix some returnURL issues 2023-07-06 02:38:03 +00:00
Evan Goode
22d5f3525d initial work on invites, admin page 2023-07-06 02:38:03 +00:00
Evan Goode
c4bc8aa6d2 browserToken bug: use Path: / everywhere 2023-06-29 23:55:17 -04:00
Evan Goode
393f0c24e2 front_test: fallback player 2023-06-25 15:32:24 -04:00
Evan Goode
a8bb8832dd s/SkinForwarding/ForwardSkins/, allow setting fallback player 2023-06-25 15:32:24 -04:00