
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
better-auth-cosmos
Advanced tools
This project provides a custom adapter for better-auth
that integrates with Azure Cosmos DB. It allows for seamless interaction with the required tables: User, Session, Account, and VerificationToken.
To install the adapter, run the following command:
npm install better-auth-cosmos
To use the adapter, import it into your application and configure it with your Azure Cosmos DB connection string and database name.
import { buildCosmosAdapter } from 'better-auth-cosmos';
export const adapter = buildCosmosAdapter({
adapterId: 'cosmos-adapter',
adapterName: 'Cosmos Adapter',
dbCredentials: {
connectionString: process.env.COSMOS_DB!
},
dbName: process.env.COSMOS_DB_NAME || 'better-auth',
debugLogs: true,
usePlural: false,
});
I am not supporting custom CosmosClient objects and instead initializing through config. Since this adapter is specific to the better-auth
implementation, we really don't care about exposing functionality and can leave the abstraction as-is.
import { betterAuth } from "better-auth";
import { cosmosAdapter } from "../my/code";
export const auth = betterAuth({
database: cosmosAdapter({ ...options })),
});
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. Run the tests with an instance of cosmos to verify changes.
bun run test
This project is licensed under use it, idc.
FAQs
A custom better-auth adapter that integrates with Azure Cosmos DB.
The npm package better-auth-cosmos receives a total of 3 weekly downloads. As such, better-auth-cosmos popularity was classified as not popular.
We found that better-auth-cosmos demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.