Auth0-spa-js on a wkwbeview + ASWebAuthenticationSession for google log in

I’m not sure if what I’m trying to do is even possible.
I have a spa running inside an wkwebview, everything runs smoothly but google is not fond to webviews, so what I’m trying to do is use a ASWebAuthenticationSession just for the login with google part, the app detects the google auth url, and opens it on the ASWebAuthenticationSession and after the user logs in it gets back to the app with the state, code and the other parameters, and the app loads the callback url(where handleRedirectCallback() is called) but I get a invalid state error.

I checked the process with everything inside the wkwebview and everything seems to be the same, does auth0 need the cookie created by google on login? Am I missing something else?