Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/pollen5/discord-oauth2
This is a provider for the package golang.org/x/oauth2 implementing authentication endpoints for Discord
$ go get github.com/ravener/discord-oauth2
package main
import (
"github.com/ravener/discord-oauth2"
"golang.org/x/oauth2"
)
func main() {
conf := &oauth2.Config{
Endpoint: discord.Endpoint,
Scopes: []string{discord.ScopeIdentify},
RedirectURL: "http://localhost:3000/auth/callback",
ClientID: "id",
ClientSecret: "secret",
}
// Use oauth2 package as normal, i.e
// redirect users to conf.AuthCodeURL("state") for initial auth
// then inside the callback:
// - verify the state param as needed.
// - exchange code with conf.Exchange(oauth2.NoContext, code)
// - Store in session if necessary, etc.
// to get like user's info use conf.Client(ctx, token) to get a proper http client
// for such requests.
}
A full authentication flow example server can be found in example directory
You can join #oauth2
in my Discord Server for support and updates.
FAQs
Unknown package
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.