lambdaclass / champions_of_mirra

Curse of Mirra game codebase
https://curseofmirra.com/
Apache License 2.0
42 stars 4 forks source link

Fix JWT issues when changing servers #1847

Closed AminArria closed 2 weeks ago

AminArria commented 3 weeks ago

Motivation

Currently in a client if you get a JWT for one server and then change servers the client will try to re-use that same JWT. In the case of Brazil and Europe it would work cause currently they share gateway server, but if you go from localhost to Europe then you face problems. Essentially when you try to go across gateway servers and have a JWT in your client

Summary of changes

How has this been tested?

To test this play across servers without clearing PlayerPrefs or app data

To test with Ngrok you will need to extend your configuration to be able to handle both tunnels. You can modify you ngrok config with ngrok config edit and putting

tunnels:
  arena:
    proto: http
    addr: 4000
  gateway:
    proto: http
    addr: 4001

And then you can do ngrok start --all

Checklist

ncontinanza commented 3 weeks ago

muted.mp4 I can't go through the title screen when setting the custom server, but when using the Brazil one it works fine.

@AminArria please explain in the log that the input should be ARENA_IP https://GATEWAY_IP

tkz00 commented 3 weeks ago

muted.mp4

I can't go through the title screen when setting the custom server, but when using the Brazil one it works fine.

This was because https:// was missing from the second URL