Anyone have any luck getting [<@U6Z07HY14>](<https...
# orm-help
r
Anyone have any luck getting [@lawjolla](https://github.com/LawJolla/prisma-auth0-example/blob/master/server/database/prisma.yml) repo to work with Auth0 on an up to date package loadout of prisma? I've tried almost every way I could think of to debug the issues going on (facepalming and head-banging included) 🙃 Thus far I'm able to get everything setup and running I'm at an impasse with getting any data to successfully authenticate and pass onto my prisma demo service. I've narrowed down the issue to something along the lines of an error in how the json is being formatted, but can't seem to find any errors in the json tokens being passed to and from the client from Auth0. It's just with any attempt to post to my prisma service . Any ideas, thoughts, fixes, similar stories, prayers, condolences, etc sadparrot
l
Hi Ryo, I need to set aside some time to update that repo. However, it appears to be working correctly. You’re getting a 401 (unauthorized) and it’s returning an error message that’s not JSON formatted. Where my readme lacks is in the Auth0 dashboard set up. That’s likely where the issue is.
r
Thanks for the quick reply! I was initially getting some cors errors but tacked in as a quick fix
Copy code
<http://server.express.post|server.express.post>(server.options.endpoint, (req, res, next) => {
  res.header('Access-Control-Allow-Origin', '*')
  res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization, Content-Length, X-Requested-With')
  getUser(req, res, next, db)
  }
)
Then was planning to later on swap out the * for a proper env variable. So you’re thinking it’s an Auth0 configuration issue? I’ll try playing with the Auth0 dash settings again and see if there’s any changes.
l
Good work! That’s one of those things in tutorials that are glossed over but shouldn’t be. People think there’s a CORS error when really there’s just a non 200 route without a CORS header. You’re getting valid JWTs, but your server isn’t authenticating them so that’s suggesting an Auth0 config issue. Recheck that the ENV correctly matches the Auth0 API.