OpenPecha / monlamai-app-web

MIT License
0 stars 0 forks source link

Use Cookies as a Token carrier #165

Open tenkus47 opened 2 months ago

tenkus47 commented 2 months ago

Description

This document outlines the proposed changes to the application architecture to transmit tokens via cookies rather than sending them in the loader GET request. The motivation for this change is to enhance performance and follow suggested best practices.

Completion Criteria

Steps

tenkus47 commented 2 months ago

i was going through some api docs and methods for securing API , found out that generally the token that are related to api are sent using cookies, which is more secure than normal get request data or storing the token in localstorage. because cookie are not accessible to Javascript directly and by default perform CORS restriction too.

Karma-Tsering commented 2 months ago

Working as expected

with user-prefs token

Image

without user-prefs token

Image

ta4tsering commented 2 months ago

@Karma-Tsering test https://kharagedition.com/product/tibetan-ai-bot if it works or not ?

Karma-Tsering commented 2 months ago

Image

Kharagedition is still working