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

**URL:** <https://forum.ionicframework.com/t/next-js-capacitor-application-auth0-doesnt-redirect-back-to-app/231666>\
**Category:** Capacitor\
**Created:** [March 11, 2023, 11:02am UTC](https://forum.ionicframework.com/t/next-js-capacitor-application-auth0-doesnt-redirect-back-to-app/231666 "2023-03-11T11:02:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billyzeim](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/billyzeim/32/143912_2.png) [@Billyzeim](https://forum.ionicframework.com/u/Billyzeim)\
**Post date:** [March 11, 2023, 11:02am UTC](https://forum.ionicframework.com/t/next-js-capacitor-application-auth0-doesnt-redirect-back-to-app/231666/1 "2023-03-11T11:02:58Z")

</div>

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) =\> {  
e.preventDefault();  
console.log(“signing in”)  
signIn(“google”,{ callbackUrl: ‘[http://localhost:3000/ch\_usr\_existence](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.
