Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API example backend using passport-oauth2 #258

Open
ddugovic opened this issue May 20, 2023 · 1 comment
Open

API example backend using passport-oauth2 #258

ddugovic opened this issue May 20, 2023 · 1 comment

Comments

@ddugovic
Copy link
Contributor

ddugovic commented May 20, 2023

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.

@Nagol12344
Copy link

You may waant to look at this package: https://github.com/ornicar/passport-lichess .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants