-
Notifications
You must be signed in to change notification settings - Fork 110
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
Impossible to use App Secret in a browser #516
Comments
This repo is about feeds. You are referring another repo: https://github.com/getstream/stream-chat-js which is chat client. |
Nope, it's about feeds, specifically in relation with token generation: |
I see your point now, will make a patch. |
8.0.2 should fix your use-case, let me know how it goes. |
Thanks, looks good! |
When I try to use api secret in my local environment, it throws
You are publicly sharing your App Secret. Do not expose the App Secret in browsers
.The README has the following note on the subject:
Well, I know what I'm doing (it's going to be a developer tool only available locally, with api secret read from environment).
Yet, the suggestion
specify browser: false
doesn't work. It doesn't just suppress the error. It also tells the stream-js client to use Node packages (http.Agent
) - resulting in a run-time error in a browser. https://github.com/GetStream/stream-js/blob/main/src/client.ts#L257 .As such, the note in README is misleading. It feels like a mistake in the code rather then the docs though.
Thanks
The text was updated successfully, but these errors were encountered: