After testing 3.0.2 and seeing the error message, I discovered version 3.04 and updated the plugin. I could then register the key, baer after logging out and logging in again nothing worked.....
A search revealed that the forum stopped working because of an error message....
The only possibility was now the following
./nodebb reset -p nodebb-plugin-2factor
2022-01-11T15:55:29.071Z [4568/85668] - error: [plugins] Error executing 'static:sockets.validateSession' in plugin 'nodebb-plugin-2factor'
at plugin.checkSocket (/home/user_radforum/nodebb/node_modules/nodebb-plugin-2factor/library.js:323:9)
at processTicksAndRejections (node:internal/process/task_queues:96:5)