fix(getCustomBrowser): explicitly set browser to nil if type not found#1064
fix(getCustomBrowser): explicitly set browser to nil if type not found#1064carbonrobot merged 2 commits intoFormidableLabs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 443871b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@valentinrey logout does not work after these changes |
|
@tuladharjaa, I had to refactor my logout logic a bit. Basically moved the check up in the file tree |
|
@valentinrey what do you mean with "moved the check up in the file tree"? |
|
@tuladharjaa I have an application with a simple auth logic, and take a check in App.tsx now that was in another file. It checks if the user is authenticated, if not, runs a logout function that also wipes tokens and other stored data |
|
I've introduced what I think may be the fix for |
Fixes #1063
Description
This pull request fixes an issue in the
getCustomBrowser:method where an invalid or empty browser type (e.g., an empty string or NSNull) received from the JavaScript layer would not be properly handled. In iOS release builds, such values caused the method to pass a non-nil result, leading to an attempt to execute an invalid browser block and resulting in a crash.getCustomBrowser:inRNAppAuth.mto explicitly check the return value ofbrowser. If the value is not in the dictionary, it will returnnilto trigger an ephemeral session.Steps to verify
iosCustomBrowser, that includes: