Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Authentication with Grandstack starter not working with netlify deploy @neo4j/graphql #148

Closed
jaedag opened this issue Jun 11, 2021 · 1 comment

Comments

@jaedag
Copy link

jaedag commented Jun 11, 2021

Hi Everyone,

I'm trying to deploy my first app using GRANDstack with netlify.
I'm having some issues implementing authentication.

I've created an @auth directive

extend type Member @auth(rules: [{ roles: ["federalAdmin"] }])

{
  members {
    id
  }
}

I don't know what it is, but the same queries that I run on my local machine work perfectly but when I run them against my function in the cloud, I get the response

{
  "errors": [
    {
      "message": "Forbidden",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "maritalStatuses"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "Neo4jGraphQLForbiddenError: Forbidden",
            "    at Object.<anonymous> (/Users/jd/Documents/dev/fl-admin-portal/api/node_modules/@neo4j/graphql/src/utils/execute.ts:95:19)",
            "    at Generator.throw (<anonymous>)",
            "    at rejected (/Users/jd/Documents/dev/fl-admin-portal/api/node_modules/@neo4j/graphql/dist/utils/execute.js:24:65)",
            "    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
          ]
        }
      }
    }
  ],
  "data": null
}

I would like to know if there is something I am doing wrong or if this is a bug in netlify or in GRANDstack. Any help?

Has anyone been able to implement authentication with a netlify function so far?

My code can be found here https://github.com/jaedag/fl-admin-portal.

Thanks in advance!

@jaedag
Copy link
Author

jaedag commented Jun 11, 2021

This was solved here

@jaedag jaedag closed this as completed Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant