Skip to content

Failed to Authenticate error due to discord_token endpoint 404 #1

Open
@berkowitze

Description

@berkowitze

Just following the directions in the README is not working. I'm getting stuck with a "Failed to authenticate" error when running within a Discord Activity. Things work fine when opening the client in a browser, because everything's mocked I assume.

Looking at the devtools, it looks like the request to /.proxy/discord_token is 404'ing, leading to the auth failure.

Exact steps I took to reproduce:

  • git clone https://github.com/colyseus/discord-embedded-app-sdk
  • Make client/.env have correct VITE_DISCORD_CLIENT_ID
  • Make server/.env have correct DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET
  • cd server && npm install && npm start
  • cd client && npm install && npm start
  • npx cloudflared tunnel --url http://localhost:5173
  • Update redirect uri to url from above, and url mapping for / -> url from above

No other changes.

This seems like the absolute barebones of this repo, so I feel like I'm missing something.

I also tried putting the server onto its own cloudflare rev proxy, and updating vite.config.js with that url, but that didn't work either.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions