Skip to content

Add saved login restore flow#40

Open
imissapixel wants to merge 1 commit intocaamer20:mainfrom
imissapixel:feature/save-login
Open

Add saved login restore flow#40
imissapixel wants to merge 1 commit intocaamer20:mainfrom
imissapixel:feature/save-login

Conversation

@imissapixel
Copy link
Copy Markdown

I took the liberty of creating this feature for my own usage, and saw that there was a previous request for it here #32

SaveLogin

Summary

Adds a saved-login restore flow so users do not need to complete Telegram login on every app launch.

Changes

  • Adds cmd_auth_restore_session to restore an existing authorized local Telegram session.
  • Adds a “Keep me logged in on this device” checkbox during login.
  • Shows a brief “Checking Saved Session” state on startup.
  • Reuses the existing local Telegram session when possible.
  • Keeps explicit logout behavior unchanged.

Security Notes

  • The API hash is not persisted for saved login.
  • The app stores only remember_login and api_id.
  • Existing stored api_hash is removed when auth state is saved.
  • Session restore succeeds only if the local Telegram session is already authorized.

Verification

  • cargo check
  • cargo test
  • npm run build
  • Manual test: login persists after app restart.

@caamer20
Copy link
Copy Markdown
Owner

caamer20 commented May 1, 2026

Smart! will merge later, thank you!

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

Successfully merging this pull request may close these issues.

2 participants