Hi
Im using Expo Auth Session for sms based password auth.
Only on android when I’m leaving the app to get my sms code the browser closes.
Here is a video to explain:
Is there a way to fix this situation?
thanks
I did found that the WebBrowser.openBrowserAsync
has an option for showInRecents: true
that should solve this android issue:
But I am using the AuthSession API and the WebBrowser.openAuthSessionAsync API which dont share this option.
What would you suggest?
I have found this issue and relevant PR:
opened 03:17PM - 15 Oct 19 UTC
closed 11:11AM - 30 Jan 20 UTC
Android
bug
AuthSession
## 🐛 Bug Report
### Environment
```
Expo CLI 3.2.3 environment info:
…
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.14.0 - ~/.nvm/versions/node/v8.14.0/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.14.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
@storybook/react: ^5.2.1 => 5.2.1
@testing-library/react: ^9.2.0 => 9.2.0
```
This issue occurs on Android!
### Steps to Reproduce
<!--
How would you describe your issue to someone who doesn’t know you or your project?
Try to write a sequence of steps that anybody can repeat to see the issue.
Be specific! If the bug cannot be reproduced, your issue may be closed.
-->
Quite simply, use `AuthSession.startAsync`. After the Expo page opens in a Chrome tab, navigate to another app (which would occur in an example where authentication requires some 2FA via another app).
### Expected Behaviour
<!--
How did you expect your project to behave?
It’s fine if you’re not sure your understanding is correct.
Just write down what you thought would happen.
-->
The opened tab remains open.
### Actual Behaviour
<!--
Did something go wrong?
Is something broken, or not behaving as you expected?
Describe this section in detail, and attach screenshots if possible.
Don't just say "it doesn't work"!
-->
The tab will instantly close of its own accord.
### Reproducible Demo
<!--
Please share a project that reproduces the issue.
There are two ways to do it:
* Create a new app using https://snack.expo.io/ and try to reproduce the issue in it.
This is useful if you roughly know where the problem is, or can’t share the real code.
* Or, copy your app and remove things until you’re left with the minimal reproducible demo.
This is useful for finding the root cause. You may then optionally create a Snack.
This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
Once you’re done, copy and paste the link to the Snack or a public GitHub repository below:
-->
Here is an incredibly simple demo: https://snack.expo.io/ryTX3UXFr
Try it on Android, go to the app switcher and you'll see that the browser tab will close. This seems related to https://github.com/expo/expo/issues/5422, which was seemingly solved with this change: https://github.com/expo/expo/pull/5442. This only solves the issue for `WebBrowser`, and not for `AuthSession`.
<!--
What happens if you skip this step?
Someone will read your bug report, and maybe will be able to help you,
but it’s unlikely that it will get much attention from the team. Eventually,
the issue will likely get closed in favor of issues that have reproducible demos.
Please remember that:
* Issues without reproducible demos have a very low priority.
* The person fixing the bug would have to do that anyway. Please be respectful of their time.
* You might figure out the issues yourself as you work on extracting it.
Thanks for helping us help you!
-->
system
Closed
April 9, 2020, 9:32am
4
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.