what’s the proper workflow for changing PRISMA_SEC...
# prisma-whats-new
m
what’s the proper workflow for changing PRISMA_SECRET and APP_SECRET? I created my service using
prisma init
and the first thing I did was change those values in the
.env
file and redeployed. Then I get a token error.
l
There's a lingering bug where if only the secret changes, it doesn't update. Try changing the model and it should work
m
worked! thanks so much.
😀 1
n
@matthew_epler @lawjolla is it like the issue described here: https://github.com/graphcool/prisma/issues/1433? To my knowledge, that has been fixed already. Are you still experiencing this problem?
m
@nilan sorry for the delay. I’m not sure if it’s the same. Here are the steps I took (and which I verified still cause the same issue): 1. run
prisma init
, selected node-basic and deploy target of <my-name>.us1… 2. run
yarn dev
3. in playground, run a basic ‘feed’ query. Two Post results returned. 4. in code editor, change the value of
secret
filed in
prisma.yml
5. run
yarn prisma deploy
in project root 6. in playground, run same query. Token error. 7. change the secret value back to default 8. run
yarn prisma deploy
9. run query again. Two Post results returned. I captured the flow in a video which I’ve put here: https://www.dropbox.com/s/mlfvhx7zdqlh1os/prisma_cap.mov?dl=0
n
Thanks a lot for taking the time to help me out, @matthew_epler 🙂 I now see what's going on. After you deployed the secret change for the first time, you would need to generate a new token using
prisma token
, or close the playground and open it again so that happens automatically. When changing the secret to something else, all tokens that were generated with the old secret become invalid immediately. So there is no real "bug" here, it's just not super obvious what happens. I think changing the error message to something more helpful is the best course of action 🙂
m
thanks for explaining!
l
Sorry for the bad info