Closed bhaktatejas922 closed 9 months ago
This update introduces the ability to pass an API key for authentication purposes to the ChatWidget
component. The key is propagated through the components and included in the headers of the POST request made by the sendMessage
function.
File | Summary |
---|---|
src/chatWidget/.../index.tsx |
Added api_key parameter to the ChatWindow component and updated the sendMessage function call to include it. |
src/chatWidget/index.tsx |
Introduced a new api_key prop to the ChatWidget component, which is passed down to the ChatInput component. |
src/controllers/index.ts |
Modified the sendMessage function to include the api_key in the request headers for authentication. |
src/index.tsx |
Added a new api_key property to the exported ChatWidget component for configuration. |
"With keys in hand, we hop with glee, 🐇
Unlocking features, as easy as one, two, three. 🔑
Now our chat widget can whisper and shout, 💬
With an API key, there's no lockout! 🚀"
Summary by CodeRabbit
ChatWidget
component. Users can now pass anapi_key
prop to theChatWidget
for secure communication with the backend server.sendMessage
function in the controllers now accepts anapi_key
parameter and includes it in the request headers, enhancing security by enabling API key-based authentication.