-
Notifications
You must be signed in to change notification settings - Fork 2
/
chatConfig.js
43 lines (33 loc) · 1.33 KB
/
chatConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// chatConfig.js
// export const chatApiKey = "k78q4299muza";
import { StreamChat } from "stream-chat";
// import functions from "@react-native-firebase/functions";
import { useEffect, useState } from "react";
import { auth } from "./firebase";
export const chatApiKey = "tkdnmgfq4yab";
export const chatSecretkey =
"zqws7egxkd9e8eg8y7cc2mssxckbmekkqyamuzq9h4scpsm9a2krvuhj6xtzg3he";
// const chatClient = StreamChat.getInstance(chatApiKey, chatSecretkey);
// // const chatUserToken = chatClient.createToken(auth.currentUser.uid);
// export const chatUserId = auth.currentUser.uid;
// export const chatUserToken = chatClient.createToken(chatUserId);
export const chatUserId = "bryan";
export const chatUserToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiYnJ5YW4ifQ.kH5OjHsjOyM8KXj2vJc2purLos31i4m48mdss8jt4tI";
export const chatUserName = "bryan";
// export const createChatToken = () => {
// const [loading, setLoading] = useState(true);
// const [products, setProducts] = useState("");
// useEffect(() => {
// functions()
// .httpsCallable("ext-auth-chat-getStreamUserToken")()
// .then((response) => {
// setProducts(response.data);
// setLoading(false);
// });
// }, []);
// if (loading) {
// return null;
// }
// console.log("created token and token is :" + products);
// };