mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 22:57:32 +00:00
c88d3abc5e
The browser side of the native sign-in mints a one-time code from its cookie session, and the app redeems it within a minute for a session of its own. The code was bound to the account alone, so one minted before a password reset, a sign-out or a revoked session still redeemed afterwards into a fresh session, carrying access across the point where the account took it back. The code now carries the session it came from: its password version and, for a tracked session, its id. Redeeming it mints a session only while the password is unchanged and that session is still active, checked in the same transaction that mints the new one.