314 Commits

Author SHA1 Message Date
cat
5a0deebf89 Add CORS for texture routes
Fixes #173

Signed-off-by: cat <cat@plan9.rocks>
2025-06-22 22:04:14 -04:00
Evan Goode
8ff0a07efc Bump to 3.1.1 v3.1.1 2025-04-25 13:07:53 -04:00
Evan Goode
dd346df889 Misc CSS fixes 2025-04-16 03:04:33 +00:00
Evan Goode
6231951026 Fix new render loop on resize
Fixes a bug where a new render loop is created every time the page is
resized (oops). This would cause performance problems if the
page is resized a lot.

Fixes the background not filling the screen on mobile Firefox when
zoomed out or scrolling into overflow.
2025-04-16 03:04:33 +00:00
cat
abc8d1e9b8 CSS: Use font-family variable, apply font-family to h1 tag 2025-04-13 23:51:45 +00:00
Evan Goode
21aca475d5 OIDC: increase allowed clock skew from 5s to 1m
Other systems [1] allow a skew of 5 minutes, so 1 minute doesn't seem
unreasonable.

[1] https://blog.logto.io/troubleshooting-invalid-issued-at-time-error

For https://github.com/unmojang/drasl/issues/166
2025-04-13 22:09:54 +00:00
Evan Goode
3c5a3b59ed Log OIDC code exchange error 2025-04-13 22:09:54 +00:00
Evan Goode
415bff18c0 fix: AllowChoosingUUID belongs under CreateNewPlayer, not RegistrationNewPlayer 2025-04-13 20:21:54 +00:00
Evan Goode
e82e6f7117 systemd: wants network-online.target, nss-lookup.target 2025-04-06 21:46:09 -04:00
Evan Goode
33d4d91ab3 systemd: wait for network-online.target, nss-lookup.target 2025-04-06 21:42:30 -04:00
Evan Goode
556b42806a Bump version to 3.1.0 2025-04-06 21:25:31 -04:00
Evan Goode
d4f1d28b2e Option to disable auth from FallbackAPIServers
Resolves https://github.com/unmojang/drasl/issues/146
2025-04-06 23:48:36 +00:00
Evan Goode
4b1d9d420b Defaults for array-of-tables config settings
Due to https://github.com/BurntSushi/toml/issues/169, we can't simply
use IsDefined to check whether a user supplied a config value in an
array of tables, as in:

[[FallbackAPIServers]]
    CacheTTLSeconds = 123

We can work around this by using *T instead of T in the config
file schema. If the TOML key is not set, it will be parsed as nil.
2025-04-06 23:48:36 +00:00
Evan Goode
30ba03adf4 Implement GET /minecraft/profile/lookup/:id
New route on api.minecraftservices.com, see
https://minecraft.wiki/w/Mojang_API#Query_player's_username
2025-04-04 21:00:08 -04:00
Evan Goode
bf62ef54eb CachedGet: wait for lock on the URL, then check cache 2025-04-04 21:00:08 -04:00
Evan Goode
4ea506eae1 Look up fallback player ID using POST /profiles/minecraft
authlib-injector specifies POST /profiles/minecraft as the only
available route for player name -> UUID, so we have to use it if we want
to support authlib-injector-compatible fallback API servers.
2025-04-04 21:00:08 -04:00
Evan Goode
770ceededb Batch and rate-limit POST /profiles/minecraft to fallback API servers
For https://github.com/unmojang/drasl/issues/112
2025-04-04 21:00:08 -04:00
Evan Goode
4339886e8f Add /minecraft/profile/lookup/name/:playerName route 2025-04-04 21:00:08 -04:00
Evan Goode
5b8188c202 Correct default skin size limit to 64 2025-04-04 20:50:01 -04:00
Evan Goode
bdcb791b88 Allow textures in multiples of 64x32 (and 64x64 for skins) 2025-04-04 20:50:01 -04:00
Evan Goode
03ee17c40b EnableBackgroundEffect = false should not disable 3d skin preview 2025-04-04 19:58:11 -04:00
Evan Goode
07f75ab62c Clarify supported versions in README v3.0.0 2025-03-30 12:34:39 -04:00
Evan Goode
99b8540295 Rename AllowCreatingDeletingPlayers to AllowAddingDeletingPlayers 2025-03-30 12:15:00 -04:00
Evan Goode
40983a5c67
Merge pull request #150 from unmojang/next
Bump go-jose version
2025-03-30 11:55:52 -04:00
Evan Goode
7ebbafd2be Bump go-jose version 2025-03-30 11:49:19 -04:00
Evan Goode
b7427975b9
Merge pull request #149 from unmojang/next
Merge next branch to master
2025-03-30 11:30:04 -04:00
Evan Goode
3ade4ca277 Use ImportExistingPlayer,CreateNewPlayer in user.tmpl 2025-03-30 11:17:03 -04:00
Evan Goode
8fa4656735 Merge remote-tracking branch 'upstream/master' into next 2025-03-29 19:23:08 -04:00
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
cec6d6828c Dependency version bumps 2025-03-29 18:41:12 -04:00
Evan Goode
a5c06f8827 Add AllowCreatingDeletingPlayers 2025-03-29 18:29:56 -04:00
Evan Goode
d946c07ed8 Add major version tag to docker hub image 2025-03-29 17:41:33 -04:00
Evan Goode
a9b1531111 Fixups 2025-03-29 17:29:52 -04:00
Evan Goode
489e0fc587 Fix deprecation warning printing 2025-03-29 14:08:30 -04:00
Evan Goode
d7ffab2612 Update config examples and test them 2025-03-28 20:53:45 -04:00
Evan Goode
65328999a5 Test auhtlib-injector skin upload invalid skin model 2025-03-28 19:29:46 -04:00
Evan Goode
6fe35be090 Punycode IDNs while reading config file
It's safest to work with punycoded IDNs everywhere. Neither
authlib-injector nor Minecraft's `-Dminecraft.api.*.host` arguments play
nice with Unicode IDNs. Related:
https://github.com/yushijinhun/authlib-injector/issues/270
2025-03-24 17:21:09 -04:00
Evan Goode
258abe0df2 Update root.tmpl with new usage docs 2025-03-23 20:42:13 -04:00
Evan Goode
49ddfa6f7f Add back missing authlib-injector account routes 2025-03-23 20:27:27 -04:00
Evan Goode
b201152c5c Document support for all versions of Minecraft 2025-03-23 20:27:07 -04:00
Evan Goode
8333d501d8 Allow password Minecraft auth when RegistrationOIDC configured 2025-03-23 14:00:03 -04:00
Evan Goode
5252317a53 Lots of API cleanup, link to Swagger API docs 2025-03-22 23:05:38 -04:00
Evan Goode
32b8546276 Don't link to tinytengu/minecraft-authlib 2025-03-22 19:02:43 -04:00
Evan Goode
1f4b46b11a Release notes for 3.0.0 2025-03-22 18:51:33 -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
a01ce6b032 installation.md: recommend building not as root 2025-03-04 21:53:17 -05:00
Evan Goode
0460a72121 Use 'go run' for swag in Makefile if not on PATH 2025-03-04 21:53:17 -05:00