You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user cancels the accountkit window, it's suppose to return token as null. This works with iOS in my project. However, in Android, it does not return token as null, instead it throws a Login Cancelled error.
Steps to Reproduce / Code Snippets
Create normal login steps based on example in repo.
Add a .catch under RNAccountKit.loginWithPhone().then(....).catch(e => console.log(e) function.
Error shows up in console.log for Android if you cancel/press back from the accountkit window popup.
Expected Results
Error shows up in console.log for Android if you cancel/press back from the accountkit window popup. Shown in screenshot.
Additional Information
I usually would have a fallback login logic written when the token returns null. However, i have to write the code twice in both !token and `.catch(e => if (e.code === 'cancel') { ...}).
React Native Account Kit version: ^2.1.0
React Native version: 0.60.4
Platform(s) (iOS, Android, or both?): both
Platform Version(s): iOS 12.4 / Android 9.0
The text was updated successfully, but these errors were encountered:
Issue Description
When a user cancels the accountkit window, it's suppose to return token as
null
. This works with iOS in my project. However, in Android, it does not return token asnull
, instead it throws aLogin Cancelled
error.Steps to Reproduce / Code Snippets
.catch
underRNAccountKit.loginWithPhone().then(....).catch(e => console.log(e)
function.Expected Results
Error shows up in console.log for Android if you cancel/press back from the accountkit window popup. Shown in screenshot.
Additional Information
I usually would have a fallback login logic written when the token returns
null
. However, i have to write the code twice in both!token
and `.catch(e => if (e.code === 'cancel') { ...}).The text was updated successfully, but these errors were encountered: