felangel / felangel/web_socket_client
feat: a function to generate URI before every connecting
Aperta
enhancement
- Lingua principale
- Dart
- Stelle
- 177
- Fork
- 44
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Description**
I want to add the user authentication token as query param to URI, but the token has short lifetime, while trying reconnect after token expires, there is no way to update the token, it will stuck looping.
```dart
WebSocket(
uri: () => "wss://localhost/?_token=xxxxx", // we can use the callback to retrieve valid token before connects.
);
```
**Requirements**
- [ ] A function to generate URI before every connect happens.
**Additional Context**
No.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.