What is the difference between Prisma Token and Pr...
# orm-help
j
What is the difference between Prisma Token and Prisma Secret? If I'm understanding this correctly, Prisma Secret is when, let's say in a development environment, Node communicates with prisma.yml on the Prisma server, the two (Prisma Secret from prisma.js in Node and Prisma Secret in prisma.yml on Prisma server) check against each other to make sure they match. In that sense, Prisma Secret is something I can arbitrarily create with any series of characters, where as Token is something Prisma generates. What is Prisma Token and when is it used?
v
If I’m correct, prisma secret is used to sign the token (jwt)
j
@Venky I'm not sure if that's correct because I have configuration for both Prisma secret and JWT secret separately
h
We use the secret to sign the jwt that the cli send in order to authenticate with the Prisma Server. You might have a separate JWT for your own authentication system, but jwt used by Prisma is completely different thing.
j
@Harshit I see. I keep getting "A valid environment variable to satisfy the declaration ! 'env:PRISMA_SECRET' could not be found." even though I have the PRISMA_SECRET configured in dev.env.
Following is how I start in package.json: "dev": "env-cmd ./config/dev.env nodemon src/index.js --ext js,graphql --exec babel-node",
And when I console.log(process.env.PRISMA_SECRET), it shows content properly, but I'm not sure why it keeps telling me the error message
h
You will need to run
prisma deploy -e dev.env
j
I've actually done that and it says everything is up-to-date. I've also restarted Docker, but to no avail
h
Can you please send a screenshot of the error?