ScreepsMods / screepsmod-auth

User/Password authentication for the screeps private server
MIT License
41 stars 12 forks source link

I can't figure out how to authenticate #11

Open jfkinslow opened 6 years ago

jfkinslow commented 6 years ago

I can't figure out what values to use to authenticate to the api

AlinaNova21 commented 6 years ago

It doing it entirely yourself, authenticates identically to the official server API,

POST /api/auth/signin
Content-Type: application/json

{ "email":"ags131", "password": "notMyPassword" }

That will return a token that you then send to the server in an x-token header. If doing this for file uploading, look into the gulp-screeps, grunt-screeps, or rollup-plugin-screeps packages. Otherwise, the python screepsapi project or node screeps-api project makes it easier by doing most of the background work for you.

KarateSnoopy commented 6 years ago

I made walk through on Youtube on the steps I did to get setup. There's a bunch of gotchas I hit starting at 8mins in: https://youtu.be/UpPGEHSPJKo?t=8m18s. I'll submit a pull request and open issues for the stuff I ran into