Added OpenID Login - #188
Conversation
Usage:
```const steamcommunity = require("steamcommunity");
const community = new steamcommunity();
community.login({
"accountName": "username",
"password": "password"
}, function(err) {
console.log(err || "logged in");
community.openidLogin("https://royalgamer06.ga/barter/?login", function(err, response, data) {
if (err) return console.log("error:", err);
console.log(data); // Logged into third party site
});
});```
|
Perhaps out of scope of this module, but personally, I find it a very useful thing, if I need "Sign in through Steam" on a third party website. |
|
I do think this is out of scope. This might be better as its own npm module. |
|
It does fit very nicely in the current module with not much code and coded in your style :) |
|
I'd say it's only very slightly out of scope but it's a pretty sought out feature from the questions I have seen at /r/SteamBot.
What's inside |
|
The response HTML body. |
|
Oops I totally missed the function signature just above: This is pretty useful since you can just take the cookies from |
|
|
||
| SteamCommunity.prototype.openidLogin = function(url, callback) { | ||
| var self = this; | ||
| self.loggedIn(function(err, loggedIn) { |
There was a problem hiding this comment.
Perhaps this check could be removed. Let the user handle this on their own.
There was a problem hiding this comment.
For example, the snippet in the first comment makes an unnecessary request since we know for sure we are logged in.
There was a problem hiding this comment.
You got a point. I just wanted it to be robust, but performance is a good quality too.
|
Hey, what if I argue that the OpenID login is a feature of the Steam Community and therefore fits with this project's scope. |
|
I think it is slightly out of scope but it is actually helpful. Having it will not produce much to worry about |
|
I think it is out of scope, but it is as many other people said, a very useful feature, I would suggest adding it. :) |
|
Merge this feature, please |
|
This is undoubtably a very useful function node-steamcommunity to provide. So, I ask you @DoctorMcKay you perhaps reconsider this PR. Maybe add it in v4. |
Usage: