How do I redirect to a desired page after Facebook login is authenticated? I want it to redirect to /Appointment page that I created. Please help! I am 2 days stuck with this task.
I have this in my code
}).AddCookie(options =>{ // Customize cookie-based authentication options.Events = new CookieAuthenticationEvents { OnRedirectToLogin = async context => { // Perform the redirection to your custom login page context.Response.Redirect("/Appoinment"); await context.Response.WriteAsync(""); }, // Optionally, handle other events like OnSigningOut, OnValidatePrincipal, etc. }; });
I expect it to redirect to /Appointment page but it isn’t.
Pio Leonardo Rapirap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.