OpenFusionProject / OpenFusion

Open source server for the FusionFall client
MIT License
351 stars 64 forks source link

Auth Cookie Support #285

Closed yungcomputerchair closed 2 months ago

yungcomputerchair commented 2 months ago

Currently, an auth cookie login functions very similarly to a regular login, with the only difference being that the user's password is sent unencrypted through the auth ID field of the packet as a C-string instead of being encoded in the password field as Unicode. After extracting the password, the login flow is the same between the two.

This PR implements a proper cookie login flow, using one-shot text cookies for auth:

* This new behavior is gated by an authmethods config option (which defaults to only allowing password login) so this will not break the auto-login trick that leverages the current behavior on servers that don't support real cookies.

yungcomputerchair commented 2 months ago

Builds are failing due to deprecated GitHub Actions workflows, not my code :P