This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install && cd app && npm install | |
| up to date, audited 2 packages in 2s | |
| found 0 vulnerabilities | |
| npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. | |
| npm WARN deprecated flatten@1.0.2: flatten is deprecated in favor of utility frameworks such as lodash. | |
| npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained | |
| npm WARN deprecated @hapi/topo@3.1.4: This version has been deprecated and is no longer supported or maintained | |
| npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| truffle unbox drizzle | |
| Starting unbox... | |
| ================= | |
| ✔ Preparing to download box | |
| ✔ Downloading | |
| npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that. | |
| npm WARN deprecated flatten@1.0.2: flatten is deprecated in favor of utility frameworks such as lodash. | |
| npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from "axios"; | |
| import Cookies from "js-cookie"; | |
| import TokenValidate from "./TokenValidate"; | |
| //Request Interceptor | |
| axios.interceptors.request.use( | |
| async (config) => { | |
| if (config.url.includes("/login")) return config; | |
| if (config.url.includes("/refreshToken")) return config; | |
| } | |
| TokenValidate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from "axios"; | |
| import Cookies from "js-cookie"; | |
| import jwt_decode from "jwt-decode"; | |
| import moment from "moment"; | |
| import { history } from "../index"; | |
| const TokenValidate = async () => { | |
| let access_token = Cookies.get("access"); | |
| let refresh_token = localStorage.getItem("refresh_token"); | |
| if (!refresh_token) return history.push("/logout"); |