-
Notifications
You must be signed in to change notification settings - Fork 451
fix(getCustomBrowser): explicitly set browser to nil if type not found #1064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.m
to explicitly check the return value ofbrowser
. If the value is not in the dictionary, it will returnnil
to trigger an ephemeral session.Steps to verify
iosCustomBrowser
, that includes: