Greenheart / pagecrypt

Password Protected Single Page Applications and HTML files
GNU Affero General Public License v3.0
233 stars 25 forks source link

Save key in sessionStorage for easy repeated visits during the same session #14

Closed Greenheart closed 3 years ago

Greenheart commented 3 years ago

How it should work:

On DOMContentLoaded:

if sessionStorage.key:
  try decrypting (call decrypt as if the user had submitted the form immediately on pageload)
  if successful:
    show result
  else
    show regular password prompt like nothing happened

After successful decryption:

sessionStorage.key = key

then continue loading payload like normal
Greenheart commented 3 years ago

fixed in 4.0.0