Use Facebook OAuth in a simple way inside your electron App.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
index.js
package.json
upgrade.sh
yarn.lock

README.md

logo_fb

Build Status Coverage Status npm GitHub license Maintenance Donate

Use Facebook OAuth in a simple way inside your electron App.

Installation

add it to your electron project using npm install oauth-electron-facebook --save or yarn add oauth-electron-facebook

Usage

require oauth-electron-facebook exports a function that requires a javascript object and an electron window, as seen on the next example:

const auth = require('oauth-electron-facebook')

let info = {
    key: ***,
    secret: ***,
    scope: ***
},
window = new BrowserWindow({webPreferences: {nodeIntegration: false}});

auth.login(info, window)

the login function will return a Promise with the access token and secret

{
    accessToken: ***,
    refreshToken: ***
}

Migration V0.x to V1.x

  • there is no more need for the facebook object, info becomes a basic object with the properties stated in the usage step.
  • the return object has a different format.
logo: Award graphic by Freepik and Letter F graphic by Icomoon from Flaticon are licensed under CC BY 3.0. Made and modified with Logo Maker