Approaches to achieving a working logout on iOS
See original GitHub issueLogout on iOS is problematic for us, due to additionalParameters: { prompt: 'login' }
being ignored. I’m looking at the approaches I could take to get a working logout.
Previously, I had edited AppAuth-iOS to force the use of SFAuthenticationSession and then used react-native-safari-view to clear the authentication cookie. https://github.com/openid/AppAuth-iOS/issues/182, but these customizations were lost during our last update and look more difficult now since the pod is now being pulled automatically.
Some possible solutions I was looking at:
-
Disable Pod install of AppAuth-iOS, include source manually and update as before.
-
Fork this and update the code to allow implementation as per the gist here which changes AppAuth to always use the SFSafariViewController https://gist.github.com/WilliamDenniss/18f3779b4a310361bb955cf4e534f29c (https://github.com/openid/AppAuth-iOS/issues/209).
-
Fork this and add an iOS only method which will call out to the signout endpoint on iOS only. The issue with this is it looks like it opens with a prompt stating sign-in which doesn’t look good. https://github.com/openid/AppAuth-iOS/issues/461
I am currently thinking approach 2 looks to be the best, if I’m missing anything or anyone has any better suggestions please let me know!
Related to https://github.com/FormidableLabs/react-native-app-auth/issues/68
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:10 (5 by maintainers)
Top GitHub Comments
+1 I’d really like to see this resolved… When I revoke tokens I want the ability to actually log the user out / clear their session. When I add additionalParameters to my config… it doesn’t even work.
Ending a user’s session through the Idp should now be supported on the latest version -
6.4.2
. SeeendSessionEndpoint
here and the logout method here.