Fixed 4 problems of the sc2-cookie project

in utopian-io •  7 years ago  (edited)
  • New Features

I find there are some problems in the project during I used it in my project. I fixed 4 problems listed as below:

  1. Fix the <a> tag do not work problem. Before I fix this, all the links in the project are not working.
  2. Delete the cookie when logout. Before I fix this, after you log out, refresh the page, the status will be loggin again.
  3. Save the cookie on the base uri. Before I fix this, it's working fine in this project. But if you use the same code in other project, then it will not work.
  4. Deleted useless if sentense. the if sentense always return true.
  • How did I implement them
    Link to relevant lines in the code on GitHub and explain briefly what you added/changed.
  1. Item 1: added two options to the config method of the module: requireBase: true, and rewriteLinks: false.
  2. Item 2: add ipCookie.remove('st_access_token', {path:'/'}); to the function $scope.logout.
  3. Item 3: changed the $scope.logout and the controller of SetCookies.
  4. Item 4: delete the first if function in app.js.



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:  

Congratulations @steemian-io! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @steemian-io! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!