authllizer-electron-dialog
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Authllizer Electron Dialog

Source Code Version MIT License Bundle Size TypeScript

Install

$ npm install --save authllizer-electron-dialog
# and install peer dependencies  
$ npm install --save @authllizer/core

Use

import { Authllizer, IAuthllizerOptions } from '@authllizer/core';
import ElectronDialog, { IElectronDialogOptions } from 'authllizer-electron-dialog';
 
let authllizer: Authllizer = new Authllizer({
    dialog: ElectronDialog.extend({
        // ...
    } as IElectronDialogOptions),
    // ...
} as IAuthllizerOptions);

Support both electron and browser

import { Authllizer, IAuthllizerOptions, BrowserDialog } from '@authllizer/core';
import ElectronDialog, { isElectron } from 'authllizer-electron-dialog';
 
let authllizer: Authllizer = new Authllizer({
    dialog: isElectron() ? ElectronDialog : BrowserDialog,
    // ...
} as IAuthllizerOptions);

You must set the provider 'redirectUri' to the address you set as redirect uri in the provider settings

import { Authllizer, OAuth1Provider, OAuth2Provider, IAuthllizerOptions } from '@authllizer/core';
 
let authllizer: Authllizer = new Authllizer({
    providers:{
        some1: OAuth1Provider.extend({
            redirectUri: '***',
            // ...
        }),
        some2: OAuth2Provider.extend({
            redirectUri: '***',
            // ...
        }),
        // ...
    }
    // ...
} as IAuthllizerOptions);

License

Copyright © 2017 Yisrael Eliav, Licensed under the MIT license.

Package Sidebar

Install

npm i authllizer-electron-dialog

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

55.5 kB

Total Files

29

Last publish

Collaborators

  • yisraelx