Skip to content
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

Encrypt openai token in browser local storage via Cryptr #75

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Merkie
Copy link

@Merkie Merkie commented Nov 9, 2023

Alright, so I added basic encryption with a SITE_KEY environment variable. Don't merge yet. I'll have to clean up some more stuff, most likely. Also, is there any reason why you disable SSR? If we are running on Vercel, we can use SSR to our advantage, no? It would make implementing a database much easier.

Copy link

vercel bot commented Nov 9, 2023

@Merkie is attempting to deploy a commit to the ShipBit Team on Vercel.

A member of the Team first needs to authorize it.

@Merkie
Copy link
Author

Merkie commented Nov 9, 2023

you can also see that i broke out the openai token into its own local storage value and store. just FYI. it is stored in localstorage and encrypted/decrypted on the server.

@Merkie
Copy link
Author

Merkie commented Nov 9, 2023

Ok, im pretty happy with where it stands now lmk what you think.

Copy link

vercel bot commented Nov 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
slickgpt ❌ Failed (Inspect) Nov 9, 2023 8:24am

@Shackless Shackless self-assigned this Nov 9, 2023
Copy link
Contributor

@Shackless Shackless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I took a first look and will test in more detail later, probably start of next week.
Apparently there are some additional steps missing for Vercel. In case you can't access the build log:

CleanShot 2023-11-09 at 09 43 08@2x

SSR is disabled because everything (except shared chats) is coming from localStorage, so there wouldn't be much benefit in prerendering (the layout?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use basic encryption to encrypt the openai key in browser local storage.
2 participants