Load/store FAST keys for auto_login.#3693
Draft
kousu wants to merge 2 commits intoconversejs:masterfrom
Draft
Conversation
Author
|
Demo: Logging in with a password and catching a FAST token The token is in IndexedDB: Upon reloading, logs in using FAST: Upon logging out, the token is wiped from memory: |
This was referenced Jun 9, 2025
kousu
commented
Jun 9, 2025
Comment on lines
+1890
to
+1891
| reuse_keys | ||
| ---------- |
Author
There was a problem hiding this comment.
I chose to repurpose reuse_scram_keys to also cover FAST because they are so similar. But there's other options
- add a separate
reuse_fast_keysoption - make FAST always enabled, or maybe just a
fastthat defauls totrue.
I'm not sure how is best or what your preferences are. Lemme know :)
kousu
commented
Jun 9, 2025
kousu
commented
Jun 9, 2025
kousu
commented
Jun 9, 2025
Also clean up FAST *and* SCRAM keys on log out; otherwise, the credentials are still in the browser, and could be stolen, or reused simply by someone who knows to redefined conversejs-session-jid in localStorage. Depends on strophe/strophejs#839 TODO: * [ ] This *renames* reuse_scram_keys to reuse_keys to cover both FAST and SCRAM, so it should probably get a backwards-compatibility shim for the old name. * [ ] Drop my development environment edit to package.json (without there's no way to test because both repos need to be in sync)
kousu
commented
Jun 10, 2025
| "version": "4.0.0-rc0", | ||
| "resolved": "https://registry.npmjs.org/strophe.js/-/strophe.js-4.0.0-rc0.tgz", | ||
| "integrity": "sha512-9j2hR/OsxFX1gmqcsxNOQySrUUju0blHAmGB5g5EcdlVjWn19u+xHKEoXt4Ft8VPBB9rQR0jvtQkAJPpqM9XTw==", | ||
| "version": "3.1.1", |
Author
There was a problem hiding this comment.
Ah I imagine before this lands I'll have to redo it against 4.0. Hopefully it's not too complicated :)
Member
|
Hi @kousu, thank you for the effort you've put into this so far. I'm just writing to let you know this is still on my radar and I plan to do an in-depth review soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Also clean up FAST and SCRAM keys on log out; otherwise, the credentials are still in the browser, and could be stolen, or reused simply by someone who knows to redefined conversejs-session-jid in localStorage.
Fixes #3144
Depends on strophe/strophejs#840. The bulk of the work is in that pull.
TODO:
Before submitting your request, please make sure the following conditions are met:
CHANGES.mddocument it in
docs/source/configuration.rstwith
make checkor you can run them in the browser by runningmake serveand then opening
http://localhost:8000/tests.html.