lichess-org / lichess-org/api

API example backend using passport-oauth2

Open
#258 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
597
Forks
176
Avg merge
1d 4h
Merged PRs (30d)
6

Description

I'm trying to add "Login with Lichess" support to my Discord bot, so it can call Discord's API to assign a "linked role".

I've never worked with Express or OAuth2 before, and am having difficulty understanding example https://github.com/lichess-org/api/tree/master/example/oauth-backend . Somehow https://www.passportjs.org/packages/passport-oauth2/ looks easier to follow, however I haven't used Express before...

Since I don't have an HTTPS domain, whatever webserver code I create likely would be throwaway code, but I assume I'm not the only consumer looking to use OAuth2 with Lichess. For example, my Square Off board can't securely log in with 2FA, and DIY digital board creators might appreciate having a simple example to follow, and somehow passport-oauth2 doesn't look intimidating. But again, maybe I don't know what I'm talking about.

Also, https://www.passportjs.org provides login strategies for Facebook, Twitter, Google, etc.; for SEO reasons it might be cool to get a "Login with Lichess" strategy listed there, although it sounds like passport-oauth2 is what I was looking for.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing example/oauth-backend example and the passport-oauth2 documentation to determine whether the requested work is a new example or a Passport strategy. Define the intended scope and a runnable, documented OAuth2 login flow before implementation; the issue currently does not specify a concrete completion target.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, node.js
Domain
api, authentication
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.