I added some external js to dash plotly which doesn’t affect anything at all but requires some additional info. More specific — i added flask-socketio socket. But i do need to connect each user to specific room with specific id which i obviously can get at backend, but i am struggling to get that on frontend. I could add some callback and so on, but it has some latency in render. My external js loads faster and i don’t want to wait for all callbacks to be triggered (cause i have a lot lol). I know i could add variable to the url, but it seems unsafe to me.
i generate room id for the socket connection at the backend and i need to specify it after connection to socketio server is established so user could connect to specific room.
I am using external js file, where i write in plain jquery. So jinja syntax isn’t working outside flask. How exactly should i get current_user? Is it in request headers or something?
Sorry, that’s beyond my understanding(( It’s either my english is not good enough or my skills (could be both ).
By register you mean the root that is redirecting to dash app? I do use request to redirect users. Then, i guess, i do need to add extra header with user-related data to that redirect?
I might have, but i think cookies should be set to http-only bc of safity, aren’t they?
I thought that this might be overwhelming for room IDs, so I decided to add a variable to the URL. It might not be the most secure approach, but I don’t believe it will be maliciously used. But thanks a lot anyways, it might be usefull for someone else!