lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.52k stars 2.26k forks source link

Consider adding API support for the "class" functionality #10469

Open anmcn opened 2 years ago

anmcn commented 2 years ago

One of our use-cases is a coach/teacher leading a class of young students. Our system runs the class tournament, and supports the teacher, but the kids will play via Lichess matches created via the bulk interface. Ideally, the kids would not need to know their Lichess username/password (we want to avoid the "Sir, I forgot my password" situation). We would like to be able to create/manage students under the teacher/coach via the API, and log them into to Lichess via an API key.

ornicar commented 2 years ago

Note that teachers can regenerate a student password from the class interface.

anmcn commented 2 years ago

In our case, they're already logged into our class/tournament system. More sophisticated users will use and manage their own Lichess accounts, but we'd like to assign a Lichess account to younger kids and hide the management of that from them (at least initially).

ornicar commented 2 years ago

I'm not sure I understand how that would work. You would generate a login URL, which you give the kid, and they click to login? When would that URL expire? What if they want to login some other time, for example to play some puzzles?

anmcn commented 2 years ago

Ideally, our system would use a new API to create student accounts under the teacher - this process would produce an API key with scope that would allow us to assign matches to the student, as well as a new scope that could be used to log the user in so they could play the resulting matches. The kids are expected to be logged into our system, and it would be nice if clicking on their matches would take them to a logged-in Lichess session (without them having to remember a separate password).

Our system already allows them to bring an existing Lichess account, and link those - those are more advanced players, however. It might be nice to allow these "novice" users to claim their Lichess account as they develop, but that's less of a concern (the matches will be unrated).