Skip to content

Commit

Permalink
#244 destroy cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
beber32 committed Jun 23, 2020
1 parent fcd11a8 commit fb0c9ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions FrontEnd/src/components/Main/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ class NavBar extends Component {


async logout(){
await apis.authentication.logOut()
this.props.resetReducer()

this.props.resetReducer() //empty all reducer
document.cookie = 'tokenOrthancJs=undefined' //change value of the cookie to delete the token
await apis.authentication.logOut() //do nothing (need to modify in back to increase security)

}

componentDidMount(){
Expand Down

0 comments on commit fb0c9ac

Please sign in to comment.