oaun
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Oaun

npm

Quick Start

npm install --save oaun

Import components like:

import { DiscordAuth } from 'oaun'

Usage

import { DiscordAuth } from 'oaun';
 
const CLIENT_ID = 'The client id of your app';
const CLIENT_SECRET = 'The client secret of your app';
const CLIENT_SCOPES = ['identify'] // A Array of scope that you need
const CLIENT_REDIRECT = 'http://localhost:3000/login/callback'; // The redirect URL of your app
 
// Setup the button
// "mybutton" is here either the id or the class of my button
const auth = new DiscordAuth('mybutton', {
    client_id: CLIENT_ID,
    client_secret: CLIENT_SECRET,
    scopes: CLIENT_SCOPES,
    redirect_uri: CLIENT_REDIRECT
})
 
auth.login() // Open popup to login
    .then(user => {
        console.log(user);
    })
    .catch(error => {
        console.log(error);
    })

Developpement

Oaun plan

Here is a plan of what Oaun should contain:

  • GoogleAuth
  • FacebookAuth
  • TwitterAuth
  • DiscordAuth
  • GithubAuth
  • GitlabAuth
  • BitbucketAuth
  • ShareAuth

What Oaun is supposed to be:

  • A 0 dependencies package
  • A easy and fast component to use (plug & play component)

What Oaun is not supposed to be:

  • A server-side librairy

Contributing

  1. Clone this repo: git clone https://github.com/Olyno/oaun.git
  2. Install dependencies: npm i

License

Code released under GNU license.

Copyright ©, Olyno.

Package Sidebar

Install

npm i oaun

Weekly Downloads

3

Version

0.0.1

License

GNU

Unpacked Size

122 kB

Total Files

50

Last publish

Collaborators

  • olyno