-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users re-prompted for password when navigating between pages #61
Comments
Looks like it tries to use the CryptoJS, but it's not yet loaded. Normally this is circumvented with the "defer" attribute of "decrypt-content.js". Have you tried setting |
One note on Maybe this is related to the problem, but I couldn't reproduce said behavior (with neither crypto-js nor webcrypto). Maybe it is browser or cpu speed dependant. Or it is a bug in cryto-js, but crypto-js is pretty much dead, as all it's functionality is provided by the browser engines nowadays through webcrypto. |
No luck unfortunately with setting I've gone ahead and disabled search completely too following on from your prior comment, this didn't change the password re-prompting issue behaviour either unfortunately. I've got a few different machines I can test on so I'll see if that makes any difference with a minimal reproducible example project I'll setup, will update once I get the time. |
Good news! I was able to track the issue down to a Material feature called theme:
name: material
features:
# - navigation.instant
# - navigation.instant.progress For me the above change is fine as I don't require the instant loading feature. Update: It looks like this has been discussed & fixed before #18 |
I'll have a look on what causes the issue with |
I don't know how exactly mkdocs-material does the instant reload. What I see is that the encryptcontent html template is being reloaded and thus the javascript part. So either disabling |
Even after upgrading to the latest crypto-js, it behaves buggy sometimes (if used with instant navigation of material). But I've discovered that there is a project called crypto-es which translates crypto-js to an es6 module. If you don't want to use webcrypto, then this is an alternative that works together with instant navigation without any problems (as far as I've tested). Just activate with |
I have found that when navigating between different pages in my documentation with a global password enabled, that I am randomly being re-prompted for my password. A quick refresh of the page usually allows me in without having to retype the password in.
I am using a global password via the password_inventory with a list of passwords like so:
The behaviour occurs both when run via mkdocs serve, or when building and hosting in prod. Lastly I am using material for MkDocs, without any of the patches applied.
When disabling the material theme, I no longer experience this behaviour, so it does seem to be associated with Material for MkDocs
The text was updated successfully, but these errors were encountered: