patreon-oauth

A wrapper around the patreon oauth api.

Usage no npm install needed!

<script type="module">
  import patreonOauth from 'https://cdn.skypack.dev/patreon-oauth';
</script>

README

Patreon OAuth

A simple wrapper around the Patreon API.


Install

npm i --save patreon-oauth

Usage

const PatreonOAuth = require('patreon-oauth')
const patreon = new PatreonOAuth(CLIENT_ID, CLIENT_SECRET, SCOPE, REDIRECT_URL)

app.get('/auth/patreon', (req, res) => {
  res.redirect(patreon.AUTH_URL) // Redirects the user to the patreon oauth.
})

app.get('/auth/patreon/callback', (req, res) => {
  patreon.handle(req, (data) => {
    res.send(data) // Returns the patreon user object to the user.
  })
})