Zomis / Games

Many kinds of games, playable in both multiplayer or local play. Replays, spectator mode, and AIs.
https://games.zomis.net
MIT License
17 stars 5 forks source link

Change to ktor #300

Closed Zomis closed 1 year ago

Zomis commented 2 years ago

It could be beneficial to change to use ktor instead of Javalin, as ktor is written in Kotlin and supports suspending functions.

Zomis commented 1 year ago

I managed to temporarily broke OAuth in the process. Getting CORS and OAuth to work again was a bit of a hassle, but it's fixed now.

Key takeaways: With Ktor, you need to allow a lot of headers in CORS. And GitHub OAuth no longer needed the weird transformation from form-data response to JsonObject, presumably because the accept content-type header is now sent to GitHub.