agora-appbuilder-core 4.0.0-beta.17 → 4.0.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-beta.17",
3
+ "version": "4.0.0-beta.18",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -284,6 +284,12 @@ const AuthProvider = (props: AuthProviderProps) => {
284
284
  }
285
285
 
286
286
  useEffect(() => {
287
+ // Ignore if on sdk since IDP flow is not supported
288
+ if (isSDK()) {
289
+ setIsAuthenticated(true);
290
+ setLoading(false);
291
+ return () => {};
292
+ }
287
293
  //if application in authorization state then don't call authlogin
288
294
  if (
289
295
  //to check authoriztion
@@ -304,9 +310,6 @@ const AuthProvider = (props: AuthProviderProps) => {
304
310
  setIsAuthenticated(true);
305
311
  } else {
306
312
  setIsAuthenticated(true);
307
- if (isSDK()) {
308
- history.push(location.pathname);
309
- }
310
313
  }
311
314
  })
312
315
  .catch(() => {
@@ -440,7 +440,15 @@ const DeviceConfigure: React.FC<Props> = (props: any) => {
440
440
  checkDeviceExists(storedDevice, deviceList)
441
441
  ) {
442
442
  log(logTag, deviceLogTag, 'Setting to active id', storedDevice);
443
- setDevice(storedDevice);
443
+ setDevice(storedDevice).catch((e:Error) => {
444
+ log(
445
+ logTag,
446
+ deviceLogTag,
447
+ 'ERROR:Setting to active id',
448
+ storedDevice,
449
+ e.message,
450
+ );
451
+ });
444
452
  } else {
445
453
  eventEmitter(currentDevice);
446
454
  setDeviceUi(currentDevice);
@@ -624,7 +632,7 @@ const DeviceConfigure: React.FC<Props> = (props: any) => {
624
632
  return new Promise<void>((res, rej) => {
625
633
  if (mutexRef.current) {
626
634
  const e = new Error(logtag + ' Change already in progress');
627
- log('DeviceConfigure:', logtag, 'Error setting', kind, e);
635
+ log('DeviceConfigure:', logtag, 'Error setting', kind, e.message);
628
636
  rej(e);
629
637
  return;
630
638
  }