InvalidToken error but migration works

prisma

#1

I’m having some issues running prisma deploy. The migration is successful but i get error messages about the auth token. When I provide a correct value for PRISMA_MANAGEMENT_API_SECRET then the migration is successful but I get the following error:

"exception":
"com.prisma.deploy.schema.InvalidToken: Authentication token is invalid: 'Authorization' header not provided",
"query": "{
    listProjects {
        name
    }
}",
"variables": "{}",
"code": "3015"

When I intentionally provide an incorrect PRISMA_MANAGEMENT_API_SECRET I instead get:

"exception": "com.prisma.deploy.schema.InvalidToken: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.",
"query":"
    query($name: String! $stage: String!) {
    project(name: $name stage: $stage) {
        name
        stage
    }
    }
",
"variables":"{\"name\":\"default\",\"stage\":\"default\"}"

Any ideas why? I have the same secret secret: some-secret in prisma.ymland managementApiSecret: some-secretin docker-compose and PRISMA_MANAGEMENT_API_SECRET=some-secret as environment variable from docker compose.


#2

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.