When running TW from NodeJS, the username is reset to empty every time I refresh the page.
“Username for signing edits” is stored in $:/status/UserName
.
From Github:
$:/state/ tiddlers
are not synced from the browser back to the server in client server configuration. This is done so that multiple users’ state doesn’t interact
Question 1
Can the username be stored in a non-state tiddler for persistence?
Non-Ideal Solution
There is this solution posted on GitHub.
The workaround is to manually create a .tid file in your wiki folder and then restart the server
But this also means I cannot drag and drop the username from one tiddler’s browser tab to another. To sync usernames, I will always have to copy username.tid
file to the tiddlers’ folder and restart the server.
Remarks
TW does not have an authentication model in a multi-user environment. It seems storing the username in the state tiddlers is a stop-gap measure to identify the author of a tiddler in multiple-users accessing the same wiki scenario.