Updating readme with more detail#13
Conversation
|
|
||
| 1. `npm install screepsmod-auth` in your server folder. | ||
| 2. Thats it! | ||
| 1. Either run `npm install screepsmod-auth` in your screeps private server folder or subscribe the Steam workshop https://steamcommunity.com/sharedfiles/filedetails/?id=800390576 if your using the in-game private server. |
There was a problem hiding this comment.
This should probably be split into two subsections, npm version and steam version
| 1. Either run `npm install screepsmod-auth` in your screeps private server folder or subscribe the Steam workshop https://steamcommunity.com/sharedfiles/filedetails/?id=800390576 if your using the in-game private server. | ||
|
|
||
| # Usage | ||
| 2. Modify mods.json and add a new line in your mods list pointing to this mod like so: |
There was a problem hiding this comment.
Only applies to npm version
| ], | ||
| ``` | ||
| 3. Relaunch your screeps private server. | ||
| 3. Follow the |
| ``` | ||
| setPassword('yourUserName', 'yourPassword') | ||
| ``` | ||
| Note: that setPassword says to pass in the email. Don't do this. Instead give it your username. |
There was a problem hiding this comment.
If an email is set during step 1, it will accept either email or username
There was a problem hiding this comment.
Just checked the code again, as I could have sworn I updated the README, trying setPassword without the correct params does actually say use username, and the code doesn't accept email for this one.
There was a problem hiding this comment.
Alright, I'll leave it as it is as I think your saying my readme edits are correct right?
| 2. Goto http://yourServerHostOrIP:21025/authmod/password/ | ||
| 1. Connect to your screeps private server once to create your account. You don't need to set an email as that won't be used. Just username and password is important. | ||
|
|
||
| 2. Send a POST call to http://yourServerHostOrIP:21025/authmod/password/ with this header: |
There was a problem hiding this comment.
This will not work, it requires a valid login token in order to set the password. The web form takes care of that by having the steam login button to obtain the token.
There was a problem hiding this comment.
So does the web form method only support steam then? I'm using the npm method and I had to use fiddler, edit the POST call according and reply it, and it returned 200. Not sure if it actually worked however
There was a problem hiding this comment.
It support both steam and npm, it uses the steam oauth system to get a valid steam auth, which the server then returns a server auth token to the form. It uses that token for authentication to set the password. it needs to authenticate the user first in order to prevent just anyone from setting the password. Since it uses the steam login system, it also auto-creates the user if it doesn't exist. However, I have been seeing it take two tries to set the password. I haven't had the time to poke at that and figure out the cause yet.
|
|
||
| ## Web Form Method | ||
| 1. Connect to your screeps private server once to create your account. | ||
| 2. Send a POST call to http://yourServerHostOrIP:21025/authmod/password/ |
There was a problem hiding this comment.
This is still not valid, as mentioned in the previous comments, this will not work. Needs both the steam auth and the password data or it will not apply.
No description provided.