Susi Chromebot-Added recover password option in it

in utopian-io •  7 years ago  (edited)

Recover Password option in Susi Chromebot

Chromebot is the chrome extension made for SUSI.AI which is a open source project by FOSSASIA.

This time I added the option of recover password to the chromebot.

In Susi Accounts Server there is a endpoint present for recovering forgotten password -

api.susi.ai/aaa/recoverpassword.json?forgotemail=EMAIL

So using it I added the recover password option to it
The task was divided into two parts -

  • UI design - For Front end design I had just gone with the Susi themed colour blue

Screenshot of UI
Screenshot from 2018-01-06 10-48-16.png

This is a simple UI design which was made by using bootstrap.

  • Working behind the UI

I had to access the API endpoint with AJAX and make the request for recover password the JS code for it is attached below -

var resetPasswordEndPoint = BASE_URL+"/aaa/recoverpassword.json?forgotemail="+ encodeURIComponent(email);
$.ajax({
    url: resetPasswordEndPoint,
    dataType: "jsonp",
    jsonpCallback: "p",
    jsonp: "callback",
    crossDomain: true,
    success: function (response) {
        if(response.accepted){
            alert(response.message);
            showResetBlock(false);
        }
    },
    error: function (jqXHR) {
        var msg = "";
        console.log(jqXHR);
        var jsonValue =  jqXHR.status;
        if (jsonValue === 404) {
            msg = "Reset Password Failed. Try Again";
        }
        alert(msg);
    }
});

Now after clicking on the reset password button the screen changes to

Screenshot from 2018-01-06 10-48-12.png

And when I check my email viola there you have it the reset link.
Screenshot from 2018-01-06 10-49-05.png

Just as a proof of work -
Link to commit

My merged PR link is attached to the post.

Thanks! For reading



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hello ms10398,

@SteemEngineTeam would like to take the time to thank you for signing up and participating in our community. Your contributions and support are important to us and we hope you will continue to use our platform.

We plan to give back to our community members, so have an upvote on us

Thank you.

Poor susi has been stumped for 20 mins :( in all seriousness though, I'm looking forward to seeing where this goes, especially with me hoping to specialise in AI after graduation.

We are developing its skills
Feel free to explore it and add more skills to it

  ·  7 years ago (edited)

Hey @ms10398 I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x