Login and Pre Register Redirect Action

Hi guys,

I found that issues but i didn’t fix that.

I can redirect any website, google.com or auth0.com bla bla… but i can not redirect my website, localhot. Cuz sign in or login button first redirect universal login&register page and this page redirect my website. I wish everybody understood… so how can i fix that ?

exports.onExecutePostLogin = async (event, api) => {

    api.redirect.sendUserTo('http://localhost:3000/MyProfile'
); //didn't redirect
  }
exports.onExecutePostLogin = async (event, api) => {

    api.redirect.sendUserTo('https://google.com'
); //redirect success
  }

Hi @tolgahanbora,

Welcome to the Auth0 Community!

Based on your information, you would like to redirect users to your website in the POST Login action. Auth0 Actions are serverless functions that run on the Auth0 side, so redirecting the user to localhost:3000 won’t redirect to your local application. To achieve the expected flow, you must host your application and make it accessible from places other than your local machine. You can learn more about redirecting in actions from here.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.