Comments (6)
Hey @harrisonschwartz,
Client generated using secret key is only meant to be used on serverside. Seems like you are using it on clientside (on browser or mobile - react-native)
from stream-chat-react-native.
@syntax-e ping. Any update on this? Do you have any followup questions on this?
from stream-chat-react-native.
Closing this for now. Please reopen if you have more questions!!
from stream-chat-react-native.
@vishalnarkhede how do I obtain the token by creating a user in the stream-CLI?
According to the docs:
"For development applications, it is possible to disable token authentication and use client-side generated tokens. Disabling auth checks is not suitable for a production application and should only be done for proofs-of-concept and applications in the early development stage. To enable development tokens, you need to change your application configuration."
I have also tried to use chatClient.devToken(id) and I'm getting the following error:
{
"code":5,"
StatusCode":401,
"message":"WS failed with code 5 and reason - development tokens are not allowed for this application",
"isWSFailure":false
}
Thanks in advance!
from stream-chat-react-native.
If someone has the same problem:
The following post solved my problem:
https://stackoverflow.com/questions/62054421/how-do-i-enable-devtokens-on-getstream-io
from stream-chat-react-native.
@vishalnarkhede I'm getting TypeError: null is not an object (evaluating 'jwt.sign')
and it's because of this code:
useEffect(() => {
const connectStreamUser = async () => {
try {
await chatClient.connectUser(
{
id: 'talha',
name: 'Test User'
}, chatClient.devToken('talha'),
);
} catch (error) {
console.log('----------ERROR-----------');
console.log(err);
}
}
if (!chatClient.userID) {
console.log('------NO USER ID----------');
connectStreamUser();
}
}, []);
Any solution or what I might do differently?
from stream-chat-react-native.
Related Issues (20)
- [🐛] Url handler not working. HOT 13
- [🐛] Maximum update depth exceeded error happening when attaching images, Android Only HOT 5
- Is there any documentation for jest testing? HOT 2
- [🐛] UploadProgressIndicatorProps should extend PropsWithChildren HOT 1
- [🐛] App Crashes on iOS when uploading photo/attachment while offline HOT 10
- [🐛] Image compression is not consistently applied HOT 8
- [🐛] Encoded URL not working HOT 7
- [🐛] Photo without content is sent up through file picker HOT 1
- [🐛] reactions does not reflect all reactions, only latest reactions HOT 3
- Add an option to view all reactions (and their details) HOT 2
- Compress Images sent through file picker HOT 1
- 🔥 [🐛] Bug Report Title - Crash at onlyEmoji regex HOT 3
- [🐛] Unable to style overlay messageActions title HOT 1
- [🐛] Bug Report Title - Navigation in production is not working on iOS 🔥🔥 HOT 2
- [🐛] Bug Report Title - MessageContent not rendering newlines
- [🐛] TypeError: Cannot read property 'skin_variations' of undefined on AutoCompleteSuggestionList HOT 1
- groupStyles mislabels messages whose create time is sufficiently after the previous message and that follow "single" messages. Labelled "Bottom" when should be "top" or "single".
- Disable individual auto complete input HOT 1
- [🐛] Offline Mode Unread Count Out of Sync HOT 4
- [🐛] Unable to resolve PermissionsAndroid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-chat-react-native.