Social logout behavior

Is there any way to automatically close the iOS webview after doing a federated logout for gmail? When I login the webview is automatically closed. However when I logout the webview stays open, and I have to press the close button on the webview.

I am using the React-Native SDK

Please let me know if this is possible!

HI @kchoy

One way to automatically close the iOS webview after federated logout is to use the onNavigationStateChange prop of the WebView component. This prop allows you to monitor the navigation state of the webview and perform some actions based on the current URL or loading status. For example, you can check if the webview has reached the logout URL and then close it by setting the modalVisible state to false. You can see an example of this approach in this answer.

Another way to close the webview is to use the onMessage prop of the WebView component. This prop enables communication between the webview and the React-Native app using the window.postMessage function. You can send a message from the webview to the app when the logout is completed and then close the webview by setting the modalVisible state to false. You can see an example of this approach in this answer.

I hope this helps you with your problem. If you have any other questions, feel free to ask. :blush: