getToken method

  1. @override
Future<String> getToken()
override

Return the full Basic <base64> header instead of stripping the prefix. The realtime WS handshake sends {type: auth, token: <getToken()>}; the server-side handler (e.g. CHT user_client_ws_handler:handle_auth/2) inspects the token's prefix to choose the auth scheme. Without the Basic prefix the token would be misclassified as a bearer JWT, fail JWT decoding, and the connection would close with auth_error: invalid_token.

Bearer auth keeps the base behaviour (strip and ship the JWT bare) — see AuthInterceptor.getToken in auth_interceptor.dart.

Implementation

@override
Future<String> getToken() async => getAuthHeader();