-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Handle AccessToken Authentication in Copilot #756
Comments
So with the copilot, authentication works a bit differently. In the regular chainlit, the user goes through an authentication flow that triggers some callbacks such as For the copilot, it does not make sense to put the user through an auth process since it is probably up to the host website to authenticate the user. That is why it is up to the host website to generate the accessToken and pass it directly to chainlit, by passing the callback auth mechanism. |
Thanks for replying @willydouhard ! But how do I get |
+1 |
@lianghsun The access token should be managed on your end. You can generate an access token for each user. Here is an example:
After that, when you load the Copilot from your page, you can attach the access_token that is linked to your user on the
Replace <user_access_token> with the user_access_token variable. From your Chainlit app, you can access user information like this: |
Hi, I am facing a similar error!! Did you get it working? |
When using Copilot, if I want to utilize an
accessToken
for authentication, how can I receive this token on the Python side? I've attempted using@cl.password_auth_callback
, but it seems that's not the correct approach. Are there any examples I can refer to?The text was updated successfully, but these errors were encountered: