discord-webhook-oauth2
v1.0.2
Published
![Image](https://media.discordapp.net/attachments/768023236314267661/782922177657438208/unknown.png)
Downloads
6
Readme
Public Oauth2 app
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)