or in the server: ``` function getUserId(context)...
# orm-help
b
or in the server:
Copy code
function getUserId(context) {
  const Authorization = context.request.get('Authorization')
  if (Authorization) {
    const token = Authorization.replace('Bearer ', '')
    const { userId } = jwt.verify(token, APP_SECRET)
    return userId
  }

  throw new Error('Not authenticated')
}
t
yes, this is what i m doing right now... i dont understand... in index.js and prisma.yml, i specified the secret (from env vars), those 2 places should be the ones for the app and the dev playground respectively.
ok i finally figured it out... so i edited the url in the app playground to point it to my ec2 instance instead of
localhost
...
once i replaced that to
localhost
, it works as expected.. thanks~