kmankan / felt-sense

An AI Assistant that helps you navigate your emotional life
Apache License 2.0
0 stars 0 forks source link

SpeakArea.tsx passing UserId #1

Open kmankan opened 4 hours ago

kmankan commented 4 hours ago

Investigate whether this a secure approach. i.e. is there a better way of doing this than getting the userId on the client side and passing it into the function

 const handleStartSession = async () => {
        if (!userId) {
            return;
        }
        // create a new conversation
        console.log("Creating new conversation for user: ", userId);

        const conversation = await createNewConversation(userId);

        setConversationId(conversation.id);
        console.log("Conversation created with id: ", conversation.id);
        setShowModal(false);
    };
kmankan commented 4 hours ago

One potential solution:

kmankan commented 2 hours ago

Another solution:

Create a userId in zustand store