Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save padhyakash/efcde947e114e49e2e9ab1728c0061be to your computer and use it in GitHub Desktop.
Save padhyakash/efcde947e114e49e2e9ab1728c0061be to your computer and use it in GitHub Desktop.
Service:
function chngPwd(password, token) {
return $http.put(BASE_URL + 'user/password/reset/{token}', {password: password, token: token});
}
controller:
this.check_pass = function (change) {
if (change.password !== change.confirmPassword) {
toastr.error('Passwords do not match', 'Error');
return;
}
Auth.chngPwd(change.password)
.then(function (res) {
console.log(res);
if (res.status === 200) {
toastr.success('Password changed successfully');
$location.path('login');
}
})
};
in my email i am getting
https://abcdefgh.com/changepassword?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGFpbXMiOiJ7OnNlc3Npb24vaWQgI3V1aWQgXCI5NGRiODI1Zi01YjExLTRlMzQtOTFkYS01M2Y1Zjc1MzcyOGRcIiwgOnNlc3Npb24vZXhwaXJ5ICNpbnN0IFwiMjAxOC0wNi0xOVQyMDo0MDozNy40MzAtMDA6MDBcIiwgOnNlc3Npb24vcmVtb3RlLWFkZHIgXCI0My4yMzAuMTczLjE4MCwgMTAuMC4zLjFcIiwgOmVtYWlsIFwiYWthc2gucGFkaHlAZW5hYmxlaXQuZGtcIn0ifQ.elaiikP9FLKpmEfoyS8F0CCjzZBKK4XEiBQtBZAQwjM
@padhyakash
Copy link
Author

how can i send the token to my service which i am getting in email?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment