Open kvnn opened 1 month ago
I get the feeling that it may be due to the front-end not having a token to send on subsequent user messages, etc. I see this in the front-end login form submission:
setAccessToken(json.access_token);
: https://github.com/Chainlit/chainlit/blob/f158482046e632a66d42abe49dfa347402b6f04a/frontend/src/pages/Login.tsx#L43
Basically, it would be really nice to be able to just set `cl.user_session('user', MyUser) without all the auth logic butting in.
So ... maybe I just need to do this in my custom_js : return localStorage.setItem(tokenKey, token);
I'm totally fine just hacking this - if someone can verify that I'm on the right track I'd be grateful.
Is your feature request related to a problem? Please describe. I don't want to make users create a username / password before using the chat, but I want to provide them a username and password to come back and continue their history. I also want data persistence.
Describe the solution you'd like This is what I'm thinking:
This isn't currently working. I'm seeing:
From the chainlit code, I'm not sure what else the login form does when hitting
/login
that I'm not doing here. See https://github.com/Chainlit/chainlit/blob/f158482046e632a66d42abe49dfa347402b6f04a/backend/chainlit/server.py#L310I'd love some advice!