0.1.3 • Published 4 months ago

@smarthr/next-auth v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@smarthr/next-auth

npm version

next-auth に渡す adapter と provider を提供しているパッケージです。
adapter は redis を使用し、provider は SmarthrProvider を使用することを想定しています。

RedisAdapter には ioredis のインスタンスを渡します。

Usage

// pages/api/auth/[...nextauth].ts

import type { NextApiRequest, NextApiResponse } from 'next'
import NextAuth from 'next-auth'
import { RedisAdapter, SmarthrProvider } from '@smarthr/next-auth'

export default async function auth(req: NextApiRequest, res: NextApiResponse) {
  return NextAuth(req, res, {
    adapter: RedisAdapter(redisClient),
    provider: [
      SmarthrProvider({
        smarthrUrl: 'smarthrUrl',
        redirectUri: 'redirectUri',
        clientId: 'clientId',
        clientSecret: 'clientSecret',
      })
    ],
    // ...省略
  })
}

License

This project is licensed under the terms of the MIT license.

0.1.3

4 months ago

0.1.2

11 months ago

0.1.1

1 year ago

0.1.0

1 year ago