Gathering detailed insights and metrics for typeorm-legacy-adapter
Gathering detailed insights and metrics for typeorm-legacy-adapter
Gathering detailed insights and metrics for typeorm-legacy-adapter
Gathering detailed insights and metrics for typeorm-legacy-adapter
next-auth adapters that are maintained by the community to support any database.
npm install typeorm-legacy-adapter
Typescript
Module System
Node Version
NPM Version
@next-auth/dynamodb-adapter@1.1.0
Updated on Feb 02, 2022
@next-auth/sequelize-adapter@1.0.2
Updated on Jan 23, 2022
@next-auth/upstash-redis-adapter@1.1.0
Updated on Jan 17, 2022
@next-auth/dynamodb-adapter@1.0.2
Updated on Jan 10, 2022
@next-auth/fauna-adapter@1.0.2
Updated on Jan 10, 2022
@next-auth/neo4j-adapter@1.0.2
Updated on Dec 23, 2021
TypeScript (93.41%)
Shell (4.06%)
JavaScript (2.53%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
159 Stars
351 Commits
89 Forks
10 Watchers
29 Branches
31 Contributors
Updated on Jul 06, 2025
Latest Version
0.2.1
Package Id
typeorm-legacy-adapter@0.2.1
Unpacked Size
30.20 kB
Size
7.47 kB
File Count
13
NPM Version
7.15.0
Node Version
16.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Open Source. Full Stack. Own Your Data.
This is the TypeORM Adapter for next-auth
. This package can only be used in conjunction with the primary next-auth
package. It is not a standalone package.
You can find more TypeORM information in the docs at next-auth.js.org/adapters/typeorm/typeorm-overview.
next-auth
and @next-auth/typeorm-legacy-adapter@canary
1npm install next-auth @next-auth/typeorm-legacy-adapter@canary
pages/api/[...nextauth].js
next-auth configuration object.1import NextAuth from "next-auth"
2import Providers from "next-auth/providers"
3import Adapters from "next-auth/adapters"
4
5// For more information on each option (and a full list of options) go to
6// https://next-auth.js.org/configuration/options
7export default NextAuth({
8 // https://next-auth.js.org/configuration/providers
9 providers: [
10 Providers.Google({
11 clientId: process.env.GOOGLE_ID,
12 clientSecret: process.env.GOOGLE_SECRET,
13 }),
14 ],
15 adapter: Adapters.TypeORM.Adapter(({
16 type: 'sqlite', // or mysql, postgresql, mssql
17 database: ':memory:',
18 synchronize: true
19 }),
20 ...
21})
The
synchronize
option in TypeORM will generate SQL that exactly matches the documented schemas for MySQL and Postgres.However, it should not be enabled against production databases as it may cause data loss if the configured schema does not match the expected schema!
This adapter supports MySQL, PostgreSQL, sqlite, as well as MsSQL. Further configuration options are listed below.
With sqlite, you have the option of using a file on disk as the database, or using a temporary in-memory database. In the database
field you can either pass in a valid file path to the on-disk database you want to use, or simply write :memory:
for an in-memory database which will disappear whenever you restart the process.
For MySQL, simply pass a valid connection string to the database
option, such as mysql://nextauth:password@127.0.0.1:3306/nextauth?synchronise=true
, and do not forget to set the type
value to mysql
.
Schema: mysql/schema.sql
For PostgreSQL, you also only need to pass a valid connection string to the database
option, such as postgres://nextauth:password@127.0.0.1:5432/nextauth
, and do not forget to set the type
value to postgres
.
Schema: postgresql/schema.sql
For MsSQL, pass a valid connection string to the database
option, such as mssql://nextauth:password@127.0.0.1:1433/nextauth
, and do not forget to set the type
value to mssql
.
Schema: mssql/schema.sql
We're open to all community contributions! If you'd like to contribute in any way, please read our Contributing Guide.
ISC
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 11/24 approved changesets -- score normalized to 4
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
115 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More