remix-auth-lichess
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

LichessStrategy

Supported runtimes

Runtime Has Support
Node.js
Cloudflare

How to use

Installation

npm install remix-auth-lichess

Usage

import { LichessStrategy } from 'remix-auth-lichess'

authenticator.use(
  new LichessStrategy(
    {
      clientID: 'arbitrary-unique-id',
      callbackURL: 'http://127.0.0.1:3000/auth/lichess/callback',
    },
    async function ({
      accessToken,
      refreshToken,
      extraParams,
      profile,
      context,
      request,
    }) {
      return await User.findOrCreate({ lichessId: profile.id })
    }
  )
)

Package Sidebar

Install

npm i remix-auth-lichess

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

5.48 kB

Total Files

5

Last publish

Collaborators

  • alexandre-herve