Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
express-oauth2-helper
Advanced tools
Readme
express oauth2 helper
this helper return a router that registers some paths:
/
: The auth url, which will redirect the client to the oauth service to login./redirect
: must the same with the redirect url that you set in the oauth service./refresh
: request a new token if it's expired.example: access http://localhost:9900/discord
on your browser
the redirect url should be http://localhost:9900/discord/redirect
require('dotenv').config()
const fetch = require('node-fetch')
const express = require('express')
const app = express()
const port = 9900
const discord = require('.')({
client_id: process.env.DISCORD_CLIENT_ID,
client_secret: process.env.DISCORD_CLIENT_SECRET,
scope: process.env.DISCORD_SCOPE,
url_auth: process.env.DISCORD_URL_AUTH,
url_token: process.env.DISCORD_URL_TOKEN,
url_redirect: process.env.DISCORD_URL_REDIRECT,
hook,
})
app.use('/discord', discord)
app.use((err, req, res, next) => {
console.error('ERR:', err)
res.status(err.status || 500).end()
})
app.listen(port, () => {
console.log(`OAUTH example listening at localhost:${port}/discord`)
})
async function hook(token) {
const res = await fetch('http://httpbin.org/post', {
method: 'POST',
body: JSON.stringify(token),
headers: {
'content-type': 'application/json',
},
})
const data = await res.json()
console.log(res.status)
console.log(data)
}
FAQs
express oauth2 helper
The npm package express-oauth2-helper receives a total of 4 weekly downloads. As such, express-oauth2-helper popularity was classified as not popular.
We found that express-oauth2-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.