electron-steam-openid
v1.2.0
Published
An OpenID module to authenticate to Steam for your Electron app.
Downloads
22
Maintainers
Readme
electron-steam-openid
A library to handle Steam authentication with OpenID, for your Electron app.
Install
$ npm install --save electron-steam-openid
Usage
const electronSteamAuth = require('electron-steam-openid');
var config = {
redirectUri: 'http://localhost'
};
app.on('ready', () => {
const windowParams = {
alwaysOnTop: true,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: false
}
}
const auth = electronSteamAuth(config, windowParams);
auth.authenticate(options)
.then(token => {
// use your token.steam_id
});
});
API
electronSteamAuth(config, windowParams)
config
Type: Object
Sets custom openid.RelyingParty() params
windowParams
Type: Object
An object that will be used to create the BrowserWindow. Details: Electron BrowserWindow documention
Methods
getAuthorizationCode(options)
Returns a Promise
that gets resolved with the authorization details of the OpenID authorization request.
Adapted from
License
MIT