I am trying to allow a new user to be able to set a password on the creation of User account, on the creation of user account I am sending an E-mail containing a link to the user email-id where on click of the link I am redirecting him to set password state without login/session.
But I am having a problem with URL regex (i guess) as I am not able to send any parameters within the URL.
e.g., if I am sending www.mywebsite.com/setPassword/userId=12
or www.mywebsite.com/setPassword?userId=2
I am getting www.mywebsite.com/setPassword
only, I need to be able to send userId so that I can identify the user and set the password for the same.
P.S. I am using angularJS and Rothe R for backend, but this issue I think is angular-side.
For starter, i am skipping the session part for the my setPassword state. Will it affect the security of the website?
var urlWithoutlLogin = ["setPassword"];
if (urlWithoutlLogin.indexOf($state.current.name) != -1){
console.log("$state.current.name",$state.current.name);
$state.go($state.current.name);
}
On click of the link i am checking is 'setPassword' given then i am going to the state without checking for session/login which i have written in else part, but how to send parameters in url to fetch and save data in the state for particular User.
Comments
Post a Comment