0.0.3 • Published 1 year ago

authjs-adapter-mysql2 v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

CI


How to use

Install:

npm i authjs-adapter-mysql2

use schema.sql to create the tables.

import Mysql2Adapter from "authjs-adapter-mysql2";
import * as mysql from 'mysql2/promise';``

function getConnection() {
  return mysql.createConnection({
    host: '127.0.0.1',
    user: 'root',
    database: 'fancydb'
  });
}
export default NextAuth({
    adapter: Mysql2Adapter(getConnection),
    providers: []
});

PlanetScale

0.0.3

1 year ago

0.0.2

1 year ago