TOTP: "Internal Server Error" after user enabled it
Concerned version
Version: %2.16.1
Platform: Nginx
Summary
After an user has enabled TOTP in her account (flashed and confirmed the code), she cannot go back to https://auth.example.com/2fregisters
without getting a mere "Internal Server Error".
Logs
[error] Corrupted session (_2fDevices): malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "**********") at /usr/share/perl5/JSON.pm line 190.
Possible fixes
Anything else is working fine. Even logout and login again, with TOTP. It's only accessing to /2fregisters
(via sub-menu at the top-right) that fails like that.