
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@dub/better-auth
Advanced tools
Dub Analytics Plugin is a plugin for Dub that allows you to track conversion events in your Better Auth application.
npm install @dub/better-auth
By default, the plugin will track sign up events as leads. You can disable this by setting disableLeadTracking
to true
.
import { dubAnalytics } from "@dub/better-auth";
import { betterAuth } from "better-auth";
import { Dub } from "dub";
const dub = new Dub();
const betterAuth = betterAuth({
plugins: [
dubAnalytics({
dubClient: dub,
}),
],
});
Dub Better Auth supports OAuth for authentication. You can configure the OAuth client ID and client secret in the dubAnalytics
function.
dubAnalytics({
dubClient: dub,
oauth: {
clientId: "your-client-id",
clientSecret: "your-client-secret",
},
});
And in the client, you need to use the dubAnalyticsClient
plugin.
import { createAuthClient } from "better-auth/client"
import { dubAnalyticsClient } from "@dub/better-auth/client"
const authClient = createAuthClient({
plugins: [dubAnalyticsClient()],
});
To link account with Dub, you need to use the dub.link
.
const response = await authClient.dub.link({
callbackURL: "/dashboard", // URL to redirect to after linking
});
dubClient
The Dub client instance.
disableLeadTracking
Disable lead tracking for sign up events.
leadEventName
Event name for sign up leads.
customLeadTrack
Custom lead track function.
oauth
Dub OAuth configuration.
oauth.clientId
Client ID for Dub OAuth.
oauth.clientSecret
Client secret for Dub OAuth.
oauth.pkce
Enable PKCE for Dub OAuth.
MIT
FAQs
Dub Better Auth Plugin
The npm package @dub/better-auth receives a total of 938 weekly downloads. As such, @dub/better-auth popularity was classified as not popular.
We found that @dub/better-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.