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 77import android .content .Intent ;
88import android .net .Uri ;
99import android .os .Bundle ;
10+ import android .content .ActivityNotFoundException ;
1011import androidx .annotation .Nullable ;
1112import androidx .browser .customtabs .CustomTabsCallback ;
1213import androidx .browser .customtabs .CustomTabsClient ;
@@ -245,6 +246,8 @@ public void authorize(
245246 usePKCE ,
246247 additionalParametersMap
247248 );
249+ } catch (ActivityNotFoundException e ) {
250+ promise .reject ("browser_not_found" , e .getMessage ());
248251 } catch (Exception e ) {
249252 promise .reject ("authentication_failed" , e .getMessage ());
250253 }
@@ -327,6 +330,8 @@ public void refresh(
327330 clientSecret ,
328331 promise
329332 );
333+ } catch (ActivityNotFoundException e ) {
334+ promise .reject ("browser_not_found" , e .getMessage ());
330335 } catch (Exception e ) {
331336 promise .reject ("token_refresh_failed" , e .getMessage ());
332337 }
You can’t perform that action at this time.
0 commit comments