electron-steam-openid

1.2.0 • Public • Published

electron-steam-openid Build Status

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

electron-oauth2

License

MIT

Package Sidebar

Install

npm i electron-steam-openid

Weekly Downloads

7

Version

1.2.0

License

MIT

Last publish

Collaborators

  • vincent__