Skip to content
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

[GH-678] Fix bot authentication #703

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

[GH-678] Fix bot authentication #703

wants to merge 8 commits into from

Conversation

AminArria
Copy link
Contributor

@AminArria AminArria commented Jun 12, 2024

Motivation

Closes #678

Summary of changes

  • Create endpoint /auth/generate-bot-token in gateway to generate tokens for bots to use
  • Create a gen_server TokenFetcher in bot_manager to generate a JWT every 30 minutes (token expires ~2 hours)
  • Remove hack in arena GameSocketHandler to force any new connection to have either the user query param (gateway_jwt) or the bot query params (bot_token and bot_secret)

How to test it?

Play the game and if bots keep working then this is working 😄

Checklist

  • Tested the changes locally.
  • Reviewed the changes on GitHub, line by line.
  • This change requires new documentation.
    • Documentation has been added/updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix authentication for bots
2 participants