Skip to content

Onboarding: a way in through your own school's diary, with the password never reaching our server #141

Closed
7 of 9 issues completed

Description

@lumenpearson

The phone half of the second diary (#139 was the server half). The owner asked for a first run that ends in one of two ways in, and for the student to sign in to their own diary without this project's server ever seeing the password.

What the batch does.

  • A new step after the introduction chooses the way in: «по коду класса» (quick, as today) or «найти свою школу» (autonomous).
  • Autonomous: region (all 89, with a search that also finds the regions a school name may be in) → school (only where the diary needs one: «Сетевой город») → the diary to sign in to, with the recommended one highlighted and a «почему» that says why → sign-in → an import with a progress bar → a summary of the settings, the student and the class.
  • Sign-in happens on the phone, straight to the diary. The app's own form sends the login and password to Петербург's or the regional «Сетевой город» server and nowhere else. The session the diary returns is then handed to our server once (POST /api/v1/diary/session), which checks it with its own call, seals it like every diary credential, and keeps it alive from the cron tick. The app stops using POST /api/v1/diary/login.
  • A diary-only phone gets a home of its own: the diary, in place of the class tabs. Today it can reach neither the diary nor its sign-out once the last class is gone.
  • The first screen shows, under its button, that continuing accepts the terms of use and the privacy policy, linked to documents in the build's own repository. The base URL is LESSONS_LEGAL_BASE_URL, which each fork sets. Bundled copies cover an unconfigured build and no network.

What it deliberately does not do.

  • No Госуслуги sign-in of any kind, and no in-app browser. What a Госуслуги sign-in leaves is a session to the person's whole state-services account, not a diary token (Decision: which diary comes second, how a family signs in to it, and whether ТОР may be used at all #135). ТОР «Моя школа» regions see ТОР named and recommended where it is the region's system, with a button that opens gosuslugi.ru/school in the browser, and the class code for the timetable and the bot. The three Госуслуги-only «Сетевой город» regions work the same way.
  • Linking a phone's diary session to the bot, the widget and tabs for a diary-only phone, and a server built into the APK are each an issue of their own.

Not verified, and cannot be from here: whether either diary accepts a session opened on a phone when our server replays it from Frankfurt (the server answers 409 if not), and anything on a device. Nothing here has met a live diary (#121).

Decision record: #135. Previous half: #139.

Sub-issues

Sub-issues

7 of 9 Issues completed
Loading 9 sub-issues

Activity

  1. moved this from Now to In progress in lessonson Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions