sunuid-sdk 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sunuid-sdk.js
CHANGED
|
@@ -2616,16 +2616,24 @@
|
|
|
2616
2616
|
// Si c'est un format WebSocket, extraire les données de responseData
|
|
2617
2617
|
if (websocketData.responseData) {
|
|
2618
2618
|
console.log('✅ Format WebSocket détecté, extraction de responseData');
|
|
2619
|
+
console.log('🔍 Contenu complet de responseData:', websocketData.responseData);
|
|
2620
|
+
console.log('🔍 Clés disponibles dans responseData:', Object.keys(websocketData.responseData));
|
|
2621
|
+
|
|
2622
|
+
// Les données d'authentification sont dans responseData.data
|
|
2623
|
+
var responseData = websocketData.responseData;
|
|
2624
|
+
var authDataObj = responseData.data || responseData;
|
|
2625
|
+
console.log('🔍 Données d\'authentification dans data:', authDataObj);
|
|
2626
|
+
console.log('🔍 Clés disponibles dans data:', Object.keys(authDataObj));
|
|
2619
2627
|
var authData = {
|
|
2620
|
-
token:
|
|
2621
|
-
session_id:
|
|
2622
|
-
user_id:
|
|
2623
|
-
partner_id:
|
|
2624
|
-
type:
|
|
2625
|
-
timestamp:
|
|
2626
|
-
signature:
|
|
2627
|
-
user_info:
|
|
2628
|
-
redirect_url:
|
|
2628
|
+
token: authDataObj.token || authDataObj.auth_token || authDataObj.jwt_token,
|
|
2629
|
+
session_id: authDataObj.session_id || authDataObj.sessionId || authDataObj.session,
|
|
2630
|
+
user_id: authDataObj.user_id || authDataObj.userId || authDataObj.user,
|
|
2631
|
+
partner_id: authDataObj.partner_id || authDataObj.partnerId || authDataObj.partner,
|
|
2632
|
+
type: authDataObj.type,
|
|
2633
|
+
timestamp: authDataObj.timestamp || responseData.timestamp || websocketData.timestamp,
|
|
2634
|
+
signature: authDataObj.signature,
|
|
2635
|
+
user_info: authDataObj.user_info || authDataObj.userInfo || authDataObj.user_data,
|
|
2636
|
+
redirect_url: authDataObj.redirect_url || authDataObj.redirectUrl || authDataObj.redirect
|
|
2629
2637
|
};
|
|
2630
2638
|
console.log('📋 Données d\'authentification extraites:', authData);
|
|
2631
2639
|
return authData;
|