0.0.3 • Published 2 years ago

authjs-adapter-mysql2 v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years 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

2 years ago

0.0.2

2 years ago