Authorization using a own proxy

Hello everyone
I’m trying to do oauth authorization in my Expo app.

I have my own website on which authorization takes place via Google.

I’m trying to log in using WebBrowser.open Auth Session Async, but I don’t quite understand how to close the browser with successful authorization and receive tokens that are generated on my server.

Here is an example of my code.

On iOS, it works fine in Expo Go, but on android, when I redirect, the app crashes.

Please tell me how to properly authorize through my personal proxy server on iOS and android.