sunuid-sdk 1.0.56 → 1.0.58
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/README.md +44 -0
- package/dist/sunuid-sdk.esm.js +6 -3
- package/dist/sunuid-sdk.esm.js.map +1 -1
- package/dist/sunuid-sdk.js +6 -3
- package/dist/sunuid-sdk.js.map +1 -1
- package/dist/sunuid-sdk.min.js +1 -1
- package/dist/sunuid-sdk.min.js.map +1 -1
- package/examples/env.example +4 -0
- package/examples/secure-init.php +4 -0
- package/examples/secure-integration-example.js +0 -185
- package/examples/secure-integration.html +1 -1
- package/examples/test-minimal-callback.html +117 -0
- package/package.json +1 -1
package/dist/sunuid-sdk.js
CHANGED
|
@@ -642,11 +642,14 @@
|
|
|
642
642
|
// Initialiser la connexion WebSocket si elle n'existe pas
|
|
643
643
|
if (!this.socket) {
|
|
644
644
|
console.log('🌐 Initialisation Socket.IO...');
|
|
645
|
-
|
|
645
|
+
|
|
646
|
+
// Générer un identifiant aléatoire pour la session WebSocket
|
|
647
|
+
var randomId = 'web_' + Math.random().toString(36).slice(2) + '_' + Date.now();
|
|
648
|
+
this.socket = io('wss://socket.sunuid.com:9446', {
|
|
646
649
|
query: {
|
|
647
|
-
token:
|
|
650
|
+
token: randomId,
|
|
648
651
|
type: 'web',
|
|
649
|
-
userId:
|
|
652
|
+
userId: randomId,
|
|
650
653
|
username: ip
|
|
651
654
|
},
|
|
652
655
|
transports: ['websocket', 'polling']
|