Created
June 19, 2018 09:17
-
-
Save padhyakash/efcde947e114e49e2e9ab1728c0061be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can i send the token to my service which i am getting in email?