Back at school i did this piece of code to validate tokens, users role and user auth: Auth Token:
const setAuthToken = token => { if (token) { //appl