ianlucas / cs2-inventory-simulator

A Counter-Strike 2 Inventory Simulator
https://inventory.cstrike.app
MIT License
30 stars 13 forks source link

[BUG] Steam auth not working #26

Closed johandrevwyk closed 6 months ago

johandrevwyk commented 6 months ago

I forked the repo and deployed it using EasyPanel while changing to MySQL, database seems to load fine, my api key is correct in environment variables. When I auth, it redirects back, but its not signed in. No errors are displayed

ianlucas commented 6 months ago

Can you provide me the pathname you're using for your STEAM_CALLBACK_URL? It should be /sign-in/steam/callback.

ianlucas commented 6 months ago

Just tested a fresh clone of the repo with the following .env file without issues. Please check your setup.

# Required environment variables
# DATABASE_URL ~ To use MySQL or other supported DB, you need to update `prisma/schema.prisma`.
DATABASE_URL="postgres://postgres:postgres@localhost:5432/mytestdb?schema=public"
SESSION_SECRET="your session secret"
# Optional environment variables
STEAM_API_KEY="---my steam api key---"
STEAM_CALLBACK_URL="http://localhost:3000/sign-in/steam/callback"
ianlucas commented 6 months ago

Also worth checking Rule table, make sure your Steam API and callback URL are defined there.

johandrevwyk commented 6 months ago

Issue was definitely the callback url, it wasnt stated in the env example where it must point to