FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.04k stars 441 forks source link

Fix booleanValue() on a null object on Android #941

Closed federicorabbiosi closed 9 months ago

federicorabbiosi commented 9 months ago

In some cases the boolean variable skipCodeExchange may be null and cause an error.

Fixes #672

Description

I added a check before using skipCodeExchange. If the variable is null I will consider it false

Steps to verify

Unable to reproduce. The error occured when skipCodeExchange is strangely null returning in Activity into onActivityResult after authorize()

RubenPM-dev commented 9 months ago

Hey @federicorabbiosi, thanks for your PR. I have just created a new PR with a few more checks than this to fix this issue as I can't edit yours, hope it helps and it can get merged soon.