Coder Social home page Coder Social logo

saiupadhyayula / angular-reddit-clone Goto Github PK

View Code? Open in Web Editor NEW
170.0 170.0 151.0 2.31 MB

This repository contains source code for the Reddit Clone application built in Angular, the backend is built using Spring boot - https://github.com/SaiUpadhyayula/spring-reddit-clone

JavaScript 2.41% TypeScript 62.86% HTML 22.74% CSS 11.98%

angular-reddit-clone's People

Contributors

saiupadhyayula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-reddit-clone's Issues

Requests sent twice & token sent to backend can't be converted to jwt

Thanks again Sai, I finished the Angular part yesterday yet I found two problems: the HTTP requests get sent twice and I don't know if the problem stems from my own code since I have the same problem in two other personal small projects and the token that's sent back to the backend can't be converted from string to jwt. Can you please check that out again ?

insert comment with username null

Hi @SaiUpadhyayula,

New comment was added with Null username, can you fix this in your code ?

My proposition was to add username from authservice that was stored in local storage.

ViewPostComponent file :

before :

      this.commentPayload = {
        text : '',
        postId : this.postId,
      };

after :

      this.commentPayload = {
        text : '',
        postId : this.postId,
        username : authService.getUsername(),
      };

storing tokens in localStorage is a security risk

return this.localStorage.retrieve('authenticationToken');

Storing JWTs in local storage is a security risk in accordance to OWASP. LocalStorage is accessible from javascript which means in case of en XSS any token can be stolen.

OWASP Local Storage

quotes from the text:

A single Cross Site Scripting can be used to steal all the data in these objects, so again it's recommended not to store sensitive information in local storage.

and

Do not store session identifiers in local storage as the data is always accessible by JavaScript. Cookies can mitigate this risk using the httpOnly flag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.