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

[Android] logut() - Data intent null #986

Closed jspizziri closed 5 months ago

jspizziri commented 5 months ago

Issue

Calling logout on Android results in Data intent null error. I've taken a look at https://github.com/FormidableLabs/react-native-app-auth/issues/494 & https://github.com/FormidableLabs/react-native-app-auth/issues/958 but this seems to be sightly different. Authorization is working completely fine for me, its just logout.

Backstory is that I previously was using revoke but recently upgraded to logout.


Environment

jspizziri commented 5 months ago

Also, for context, I do have deep-linking setup via react-navigation and, per the documentation, I'm using two different scheme's.

jspizziri commented 5 months ago

Actually, after playing around with it for a bit, I think I found the issue.

It seems that the postLogoutRedirectUrl needs to reference your "Auth" scheme, and referencing your deep-link scheme causes the issue, which makes sense. So in the scenario where:

Your postLogoutRedirectUrl needs to be like: com.myapp.auth://some_route.