
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@ronin/better-auth
Advanced tools
A Better Auth adapter for storing session data in RONIN with ease.
import { betterAuth } from 'better-auth';
import { ronin } from "@ronin/better-auth";
const auth = betterAuth({
database: ronin(),
// ...
});
Or if you want to use a custom client instance:
import { betterAuth } from 'better-auth';
import { ronin } from "@ronin/better-auth";
import { createSyntaxFactory } from 'ronin';
const client = createSyntaxFactory({
token: process.env.RONIN_TOKEN,
});
const auth = betterAuth({
database: ronin(client),
// ...
});
Better Auth requires a number of schema models / tables to be created in your database. This is referred to in the Better Auth documentation as the "core schema".
To help get started, here is that "core schema" translated to a RONIN database schema:
// schema/index.ts
import { blob, boolean, date, link, model, string } from 'ronin/schema';
export const User = model({
slug: 'user',
fields: {
email: string({ required: true, unique: true }),
emailVerified: boolean({ required: true }),
image: blob(),
name: string({ required: true }),
},
});
export const Session = model({
slug: 'session',
fields: {
expiresAt: date({ required: true }),
ipAddress: string(),
token: string({ required: true, unique: true }),
userId: link({ required: true, target: 'user' }),
userAgent: string(),
},
});
export const Account = model({
slug: 'account',
pluralSlug: 'accounts',
fields: {
accessToken: string(),
accessTokenExpiresAt: date(),
accountId: string({ required: true }),
idToken: string(),
password: string(),
providerId: string({ required: true }),
refreshToken: string(),
refreshTokenExpiresAt: date(),
scope: string(),
userId: link({ required: true, target: 'user' }),
},
});
export const Verification = model({
slug: 'verification',
pluralSlug: 'verifications',
fields: {
expiresAt: date({ required: true }),
identifier: string({ required: true }),
value: string({ required: true }),
},
});
Use the following command to run the test suite:
bun test
FAQs
A Better Auth adapter for RONIN
The npm package @ronin/better-auth receives a total of 6 weekly downloads. As such, @ronin/better-auth popularity was classified as not popular.
We found that @ronin/better-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.