简体   繁体   中英

Forked project return unauthorized token

So I have just completed my coding boot camp and wanted my final React project on my github to show potential employers. I forked my final project from my school's github. Everything was running smoothly prior to when i forked the project, but i wanted to ensure it would load in case other employers want to check it out. I did a git clone to my personal repo and installed all my files including my env files. I did a yarn start only to get this:

invalid request error message -  **{"type":"https://httpstatus.es/401",
    "status":401, "title":"Unauthorized",
    "detail":"Access token invalid or expired"}**

My api and secret keys are still active and my api file from petfinder-sdk i pulled from github to my project handles the token key generation.

link to my repo - https://github.com/mrshawnhum/capstone-starter-mrshawnhum

I don't know how an access token could expire, going to the pointed url points to a very public page describing the "401" error .

If the dependency comes from your code: rewrite your code so that it doesn't make an http request to the web just for fetching a description of an HTTP status. Or at least, doesn't try to authenticate, if the public information is OK.

If the dependency comes from a module: track the culprit, see if you can easily change its behavior (make an unautenticated call? a config variable at setup? dropping this module in favor of another one? ...).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM