File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
android/src/main/java/com/rnappauth Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 7
7
import android .content .Intent ;
8
8
import android .net .Uri ;
9
9
import android .os .Bundle ;
10
+ import android .content .ActivityNotFoundException ;
10
11
import androidx .annotation .Nullable ;
11
12
import androidx .browser .customtabs .CustomTabsCallback ;
12
13
import androidx .browser .customtabs .CustomTabsClient ;
@@ -245,6 +246,8 @@ public void authorize(
245
246
usePKCE ,
246
247
additionalParametersMap
247
248
);
249
+ } catch (ActivityNotFoundException e ) {
250
+ promise .reject ("browser_not_found" , e .getMessage ());
248
251
} catch (Exception e ) {
249
252
promise .reject ("authentication_failed" , e .getMessage ());
250
253
}
@@ -327,6 +330,8 @@ public void refresh(
327
330
clientSecret ,
328
331
promise
329
332
);
333
+ } catch (ActivityNotFoundException e ) {
334
+ promise .reject ("browser_not_found" , e .getMessage ());
330
335
} catch (Exception e ) {
331
336
promise .reject ("token_refresh_failed" , e .getMessage ());
332
337
}
You can’t perform that action at this time.
0 commit comments