Auth0 Home Blog Docs

Redirect to URL after login



I have a link that is sent in an email to users. The link is When the user clicks on the link they are forced to authenticate (which is what I want). But then they are redirected back to instead of If someone can show me what code is needed where to make this work that would be awesome.


If using Lock, you will need to set the appropriate redirectUrl configuration option:

If using the API, you will need to pass the redirect_uri parameter:


I am using Lock. I changed the redirectUrl to but that doesnt work. Here is what my code looks like. I want the user to be redirected ( which is the link that is sent in an email. I feel like this should be easy but not able to find the right code to solve the problem. I am also using .NET. Any help is greatly appreciated!

var lock = new Auth0Lock(’@ConfigurationManager.AppSettings"auth0:ClientId"]’, ‘@ConfigurationManager.AppSettings"auth0:Domain"]’,
container: ‘root’,
languageDictionary: {
title: “login”
auth: {
redirectUrl: window.location.origin + ‘/signin-auth0’,
responseType: ‘code’,
params: {
scope: ‘openid’