Comments (23)
Sorry for asking it on flutter repo but i could not find proper place to ask it
from connectycube-flutter-samples.
according to the server documentation, the parameters for the generation of the signature should be placed in alphabetical order. it means when you add the user to the signature this parameter should be placed there in the alphabetical order too.
from connectycube-flutter-samples.
@jostney I meant the stringForSignature
with the user should look next:
const stringForSignature = `application_id=${config.applicationId}&auth_key=${config.authKey}&nonce=${nonce}×tamp=${timestamp}&user[email]=${emailAddress}&user[password]=${password}`;
from connectycube-flutter-samples.
In docs, the last two params(&user[email]=${emailAddress}&user[password]=${password}
) did not mention.
By the way, i modifed stringForSignature as you did, still having same error when calling createSessionWithLogin
const getSignatureForUserSession = (emailAddress, password) => {
const nonce = Math.floor(Math.random() * 1000000);
const timestamp = Math.floor(Date.now() / 1000);
const stringForSignature = `application_id=${config.applicationId}&auth_key=${config.authKey}&nonce=${nonce}×tamp=${timestamp}&user[email]=${emailAddress}&user[password]=${password}`;
const signature = crypto.createHmac('sha1', config.authSecret).update(stringForSignature).digest('hex');
return { signature: signature, timestamp: timestamp, nonce: nonce };
}
const createSessionWithLogin = async (login, password) => {
const signature = getSignatureForUserSession(login, password);
const requestData = {
'application_id': config.applicationId,
'auth_key': config.authKey,
'nonce': signature.nonce,
'signature': signature.signature,
'timestamp': signature.timestamp,
"user": {
"email": login,
"password": password
}
};
return await axios.post(
'https://api.connectycube.com/session',
requestData,
{
headers: {
'Content-Type': 'application/json'
}
}
);
};
from connectycube-flutter-samples.
In docs, the last two params(
&user[email]=${emailAddress}&user[password]=${password}
) did not mention.
the list of available parameters for session creation is provided in that doc at the table bottom
from connectycube-flutter-samples.
Who can assist me about this from back-end team ? In my latest answer i did all required things but still getting unexpected signature
from connectycube-flutter-samples.
@banshiAnton can assist here, I will ask him
from connectycube-flutter-samples.
Hi @jostney
Can you please send stringForSignature
before and after hashing and requestData
Send this on our support email [email protected]
because this logs can contain sensitive account information
and double check your config (application_id/auth_key/auth_secret)
from connectycube-flutter-samples.
Sent it, waiting. Thanks
from connectycube-flutter-samples.
Related Issues (20)
- Voip kit is not working in terminated state HOT 7
- how to handle session expiration while chat is ongoing HOT 7
- Add existings users of my application to connetycube HOT 3
- Adding user to dialog which does not exist in user. HOT 21
- Seeking Guidance on Enhancing Video Quality and Layout in Flutter Video Calling App HOT 9
- Package name changes on application already on the connectycube hobby plan HOT 3
- Get unread count based on user HOT 2
- Flutter Web P2P call white screen HOT 5
- Multiple Device login in web for p2p calls HOT 4
- low audio volume when video calls connected across platforms HOT 1
- QUESTION - Is there any limitation on the duration of calls monthly? HOT 6
- issue with public group HOT 16
- p2p Call and Chat messanger in one application
- User Session Times Out and doesn't reconnect HOT 1
- When internet is slow, getting a timeout log but not getting a callback HOT 5
- Cannot create chat group with more than 30 people HOT 4
- Notifications send to all attendees [even the host] HOT 2
- Reject call from notifications not ending the call for the other opponent HOT 23
- Notifications and incoming call screen appear on the same time, when the app is open. HOT 11
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 connectycube-flutter-samples.