1.1.2 • Published 2 years ago

@celercore/auth v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

CelerCore Auth

Celer Core Payments is a library with auth.

Installation

Use the package manager npm to install celercore/auth.

npm i @celercore/auth

Usage

const { Discord } = require('@celercore/auth')
const express = require('express')

const discordAuth = new Discord({
    clientId: 'CLIENT_ID',
    clientSecret: 'CLIENT_SECRET',
    redirect: 'REDIRECT_URI',
    scope: ['identify']
})

const app = express()

app.get('/login', (req, res) => {
    res.redirect(discordAuth.getUrl())
})

app.get('/callback', async (req, res) => {
    res.send(await discordAuth.getToken(req.query.code))
})

app.listen(3000, () => console.log('Listening...'))

Auth providers

  • Discord
  • Github
  • Spotify
  • Google
  • MetaMask
  • Steam

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago