Next.js capacitor application Auth0 doesn't redirect back to app

I am using capacitor to turn a next.js website into an application. I am using Google’s Auth0 authentication and it works properly on the web but i have issues making it work on mobile. More specifically my login element in next.js look like this:

const signInGoogle = (e) => {
console.log(“signing in”)
signIn(“google”,{ callbackUrl: ‘http://localhost:3000/ch_usr_existence’ });

This does not seem to be the proper way for it to work on capacitor and i cannot find any suitable documentation. Could you please help me?

Note: I am relatively new to capacitor.