-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Updating readme with more detail #13
Open
KarateSnoopy
wants to merge
2
commits into
ScreepsMods:master
Choose a base branch
from
KarateSnoopy:read-pr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,42 @@ | |
|
||
# Installation | ||
|
||
1. `npm install screepsmod-auth` in your server folder. | ||
2. Thats it! | ||
1a. If you are using the in-game private server from Steam, then subscribe the Steam workshop https://steamcommunity.com/sharedfiles/filedetails/?id=800390576 | ||
|
||
# Usage | ||
1b. If you are using the screeps standalone private server, run `npm install screepsmod-auth` folder, and modify mods.json and add a new line in your mods list pointing to this mod like so: | ||
|
||
## Steam Console method | ||
1. Open the steam screeps client | ||
2. In console, run `setPassword('YourDesiredPassword')` | ||
3. Now you should be able to login via API | ||
``` | ||
"mods": [ | ||
"node_modules\\screepsmod-auth\\index.js" | ||
], | ||
``` | ||
|
||
2. Relaunch your screeps private server. | ||
|
||
3. Follow the | ||
[CLI steps](#screeps-server-command-line-interface-cli-method) below to setup your username and password | ||
|
||
# Setup | ||
|
||
## Screeps Server Command Line Interface (CLI) method | ||
1. Connect to your screeps private server once to create your account. You don't need to set an email. Just username and password is important. | ||
|
||
2. Run the server's command line interface (CLI) either in Steam, or if your running a standalone server as described here https://github.com/screeps/screeps#command-line-interface-cli | ||
|
||
## Web Form Method | ||
1. Open the steam client at least once (Required to create initial account) | ||
2. Goto http://yourServerHostOrIP:21025/authmod/password/ | ||
3. In server's CLI, run | ||
|
||
``` | ||
setPassword('yourUserName', 'yourPassword') | ||
``` | ||
Note: that setPassword says to pass in the email. Don't do this. Instead give it your username. | ||
|
||
4. If you get back an error that setPassword isn't defined, then its likely your mod isn't installed. See the mod.json set above to fix it. If setPassword returns {} then that's also a failure as your user name wasn't found. If setPassword returns { modified: 1 }, then it succceded. | ||
|
||
5. Now you should be able to login | ||
|
||
## 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
3. Enter your desired password | ||
4. Click Signin with steam | ||
5. Your password should be set and you be able to login via API | ||
|
@@ -54,4 +77,4 @@ or manual approval to control spawning. | |
[auth] | ||
cpu = 100 | ||
preventSpawning = false | ||
``` | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an email is set during step 1, it will accept either email or username
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'll leave it as it is as I think your saying my readme edits are correct right?