0.0.2 • Published 5 months ago

remix-auth-lichess v0.0.2

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

LichessStrategy

Supported runtimes

RuntimeHas 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 })
    }
  )
)