Currently the NoAuth class sets auth_data_type to user_auth_data_undefined, but the conditions for skipping authentication instead check for user_auth_data_no_token, which isn't set anywhere. See e.g. the following code:
The former causes FIREBASE_ERROR_UNAUTHENTICATE errors when NoAuth is used which doesn't make sense. The latter causes ?auth=<auth_token> (with the placeholder) to be appended to URLs which seems to be incompatible with server-sent events.
Fix this by using user_auth_data_no_token instead.
Currently the
NoAuth
class setsauth_data_type
touser_auth_data_undefined
, but the conditions for skipping authentication instead check foruser_auth_data_no_token
, which isn't set anywhere. See e.g. the following code:https://github.com/mobizt/FirebaseClient/blob/76acb46b3b9e3966a870a6ef478ad993e7ed5d77/src/core/AsyncClient/AsyncClient.h#L527-L540
https://github.com/mobizt/FirebaseClient/blob/76acb46b3b9e3966a870a6ef478ad993e7ed5d77/src/database/RealtimeDatabase.h#L949-L950
The former causes
FIREBASE_ERROR_UNAUTHENTICATE
errors whenNoAuth
is used which doesn't make sense. The latter causes?auth=<auth_token>
(with the placeholder) to be appended to URLs which seems to be incompatible with server-sent events.Fix this by using
user_auth_data_no_token
instead.