-
Hi, I'm using this library with tzapu/WiFIManager library so I'm collecting the UserAuth params (API_KEY, username, password) and also RealtimeDatabase URL trough the WiFiManager captive portal, this mean that can I have in memory or not the above params. So if I have in memory the UserAuth params the following code in Setup() function works great:
but if I'm in the captive portal in order to save my params, after saving, I can't change the UserAuth params in the WiFiManager callbacks "wm.setSaveParamsCallback(saveParamsCallback);" because I can't execute the code above out of the Setup() function. So my question is: it's possible to change UserAuth params (API_KEY, username, password) and the RealtimeDatabase URL anytime during the sketch execution ? What functions I should use? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
All Auth classes can be use locally as the credentials are copied after If you want to change the authentication method or type, just calling The Realtime database url also can change any time prior to use, which it does not affect with the async tasks that are previously stored or currently run in the async queue. Please see this custom wrapper class example that the Auth classes are defined locally. FirebaseClient/examples/RealtimeDatabase/Simple/Wrapper/MyFirebase.h Lines 21 to 43 in 5e99a9a FirebaseClient/examples/RealtimeDatabase/Simple/Wrapper/MyFirebase.h Lines 182 to 189 in 5e99a9a |
Beta Was this translation helpful? Give feedback.
All Auth classes can be use locally as the credentials are copied after
initializeApp
was executed.If you want to change the authentication method or type, just calling
initializeApp
with the new Auth class object.The Realtime database url also can change any time prior to use, which it does not affect with the async tasks that are previously stored or currently run in the async queue.
Please see this custom wrapper class example that the Auth classes are defined locally.
FirebaseClient/examples/RealtimeDatabase/Simple/Wrapper/MyFirebase.h
Lines 21 to 43 in 5e99a9a