@StuartH it may have to do with how often NodeBB calls the filter:footer.build hook, and since it's a SINGLE PAGE APP, it's not much, I've seen that weirdness, but I am not too sure what to do about it, the filter is pretty straight forward. what you can do to verify that's the footer code is being generated correctly, is to view-source of the page, then search for nodebb-plugin-42 comment.
Session-sharing id question
What is the purpose of sending an id in the JWT token if nodebb just makes a new user and increments the uid?
The id you send should identify the user in your system. The plugin will store a map of NodeBB user id to your id for synchronization.