-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newly created challenges via API automatically removed #2725
Comments
For live games you need to maintain a connection with the websocket, without that the server reasons your browser has gone away and will remove the live challenge. For correspondence games that's wot the case. |
In specific you'll need to mimic what the official client does for keeping challenges alive: https://github.com/online-go/online-go.com/blob/devel/src/components/ChallengeModal/ChallengeModal.tsx#L715 |
I'm creating a challenge via the API, this doesn't use web socket connections? E.g. I'm intending to use these methods for game management/control: https://ogs.docs.apiary.io/#reference/games/game-movement/make-a-move-in-a-game Where can I find documentation about the socket implementation? |
You'll need to use the websocket protocol for any game playing (and live challenge keep alives) If you're going to roll your own websocket implementation https://docs.online-go.com/goban/modules/protocol.html is probably a good start. https://github.com/online-go/goban/tree/main/src/engine/protocol for the typescript defs themselves. |
Thanks, I'll have a look into those. Does the socket protocol still require an oauth application to be registered etc? Does it use the same authentication mechanism as the API with access tokens? |
You get a |
The token I got from the OAuth process doesn't look like a JWT, it's just a short 30 character random string. |
mm, yeah not the oauth, from the https://online-go.com/api/v1/ui/config that you would get after you're authenticated |
Describe the bug
Creating a new challenge using the API endpoint
POST /api/v1/challenges
successfully creates a challenge but automatically removes it from the list after ~5 secondsTo Reproduce
Steps to reproduce the behavior:
POST /api/v1/challenges
JSON used:
Expected behavior
The challenge remains in the list until removed
Desktop (please complete the following information):
n/a
Smartphone (please complete the following information):
n/a
Additional context
Tested using https://beta.online-go.com
The exact same challenges created via the UI remains in the list indefinitely until cancelled.
The text was updated successfully, but these errors were encountered: