discord-webhook-oauth2

1.0.2 • Public • Published

Public Oauth2 app

Image

Scope = Identify

Usage

const express = require('express');
const app = express();
const webhookAuth = require('discord-webhook-oauth2')
app.use(webhookAuth);

app.get('/', function(req, res){
  console.log(req.auth) //auth token
  console.log(req.user) //data about the user
})

If the user is not logged in, they will be redirected to the login screen, then back to the url.

Known issues

  • Does not work well with query parameters (will be wiped when the user is logging in)
  • Page load will sometimes be slower (because user is fetched every time)

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i discord-webhook-oauth2

    Weekly Downloads

    0

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    1.88 kB

    Total Files

    3

    Last publish

    Collaborators

    • blobkat