Skip to content

Commit 086ba55

Browse files
committed
Update examples
1 parent b179bcb commit 086ba55

File tree

89 files changed

+91
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+91
-625
lines changed

examples/App/AppInitialization/Async/Callback/CustomAuth/CustomAuth.ino

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* ABOUT:
33
*
44
* The bare minimum non-blocking (async) example for Firebase custom user authentication with UID, scopes and claims.
5-
*
5+
*
66
* This example requires the service account credentials that obtains from the JSON key file.
77
*
88
* This example uses the DefaultNetwork class for network interface configuration.
@@ -36,7 +36,7 @@
3636
* <scope> - The OAuth scopes.
3737
* <claims> - The OAuth claims.
3838
* <expire> - The expiry period in seconds (less than 3600), 3300 is the default value.
39-
*
39+
*
4040
* 3.------------------------
4141
*
4242
* CustomAuth::CustomAuth(<timestamp>, <api_key>, <client_email>, <project_id>, <private_key>, <user_id>, <scope>, <claims>, <expire>);
@@ -190,13 +190,7 @@ void timeStatusCB(uint32_t &ts)
190190
#endif
191191
}
192192

193-
void asyncCB(AsyncResult &aResult)
194-
{
195-
// WARNING!
196-
// Do not put your codes inside the callback and printResult.
197-
198-
printResult(aResult);
199-
}
193+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
200194

201195
void printResult(AsyncResult &aResult)
202196
{

examples/App/AppInitialization/Async/Callback/CustomAuthFile/CustomAuthFile.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,7 @@ void timeStatusCB(uint32_t &ts)
214214
#endif
215215
}
216216

217-
void asyncCB(AsyncResult &aResult)
218-
{
219-
// WARNING!
220-
// Do not put your codes inside the callback and printResult.
221-
222-
printResult(aResult);
223-
}
217+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
224218

225219
void printResult(AsyncResult &aResult)
226220
{

examples/App/AppInitialization/Async/Callback/SaveAndLoad/SaveAndLoad.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,7 @@ void loop()
175175
// app.ttl();
176176
}
177177

178-
void asyncCB(AsyncResult &aResult)
179-
{
180-
// WARNING!
181-
// Do not put your codes inside the callback and printResult.
182-
183-
printResult(aResult);
184-
}
178+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
185179

186180
void printResult(AsyncResult &aResult)
187181
{

examples/App/AppInitialization/Async/Callback/ServiceAuth/ServiceAuth.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@ void timeStatusCB(uint32_t &ts)
180180
#endif
181181
}
182182

183-
void asyncCB(AsyncResult &aResult)
184-
{
185-
// WARNING!
186-
// Do not put your codes inside the callback and printResult.
187-
188-
printResult(aResult);
189-
}
183+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
190184

191185
void printResult(AsyncResult &aResult)
192186
{

examples/App/AppInitialization/Async/Callback/ServiceAuthFile/ServiceAuthFile.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,7 @@ void timeStatusCB(uint32_t &ts)
198198
#endif
199199
}
200200

201-
void asyncCB(AsyncResult &aResult)
202-
{
203-
// WARNING!
204-
// Do not put your codes inside the callback and printResult.
205-
206-
printResult(aResult);
207-
}
201+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
208202

209203
void printResult(AsyncResult &aResult)
210204
{

examples/App/AppInitialization/Async/Callback/TokenAuth/AccessToken/AccessToken.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ void loop()
126126
// app.ttl();
127127
}
128128

129-
void asyncCB(AsyncResult &aResult)
130-
{
131-
// WARNING!
132-
// Do not put your codes inside the callback and printResult.
133-
134-
printResult(aResult);
135-
}
129+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
136130

137131
void printResult(AsyncResult &aResult)
138132
{

examples/App/AppInitialization/Async/Callback/TokenAuth/CustomToken/CustomToken.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,7 @@ void loop()
137137
}
138138
}
139139

140-
void asyncCB(AsyncResult &aResult)
141-
{
142-
// WARNING!
143-
// Do not put your codes inside the callback and printResult.
144-
145-
printResult(aResult);
146-
}
140+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
147141

148142
void printResult(AsyncResult &aResult)
149143
{

examples/App/AppInitialization/Async/Callback/TokenAuth/IDToken/IDToken.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ void loop()
126126
// app.ttl();
127127
}
128128

129-
void asyncCB(AsyncResult &aResult)
130-
{
131-
// WARNING!
132-
// Do not put your codes inside the callback and printResult.
133-
134-
printResult(aResult);
135-
}
129+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
136130

137131
void printResult(AsyncResult &aResult)
138132
{

examples/App/AppInitialization/Async/Callback/UserAuth/UserAuth.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,7 @@ void loop()
154154
}
155155
}
156156

157-
void asyncCB(AsyncResult &aResult)
158-
{
159-
// WARNING!
160-
// Do not put your codes inside the callback and printResult.
161-
162-
printResult(aResult);
163-
}
157+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
164158

165159
void printResult(AsyncResult &aResult)
166160
{

examples/App/NetworkInterfaces/Async/Callback/DefaultNetworks/DefaultEthernetNetwork/ESP32/ESP32.ino

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,7 @@ void loop()
220220
// app.ttl();
221221
}
222222

223-
void asyncCB(AsyncResult &aResult)
224-
{
225-
// WARNING!
226-
// Do not put your codes inside the callback and printResult.
227-
228-
printResult(aResult);
229-
}
223+
void asyncCB(AsyncResult &aResult) { printResult(aResult); }
230224

231225
void printResult(AsyncResult &aResult)
232226
{

0 commit comments

Comments
 (0)