Skip to content

mastercuber55/discord-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-auth

The Most Simple Discord Auth Package Ever!

Note

You Must Install Package With

npm i BrinePlayz/discord-auth

Example

const express = require('express')
const app = express()
const auth = require('discord-auth')
const urls = {
  login:"/login",
  logout: "/logout",
  callback: "/callback",
  domain: "https://your-host.com"
}
const client = {
  id: 'Your Discord Application Id',
  secret: 'Your Client Auth Secret',
  scopes:['fill','this','array','with','scopes','you','want']
}
auth.setup(app,urls,client)
app.get('/', (req, res, next) => {
  auth.checkAuth(req,res,next,urls.login)
  res.json(req.user)// This Line Will Only Work While User Have Logged In So We Will Make User Login If He Have Not Yet.
})
app.listen(8000)//Do Not Provide 80

Need Help?

Free Feel To Join Our Discord Server

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published