Git Product home page Git Product logo

Comments (6)

dandoh avatar dandoh commented on May 22, 2024 1

@bradsherman Thank you for supporting.

I've pushed a fix to master that accept authorization header with/without bearer, as well as returning the error response properly followed the Graphql spec (6f24d43)

I'll close this issue as this would solve the problem. If it persists feel free to reopen the issue.

from web-haskell-graphql-postgres-boilerplate.

dandoh avatar dandoh commented on May 22, 2024

@locallycompact Can you provide additional information, e.g, step to reproduce the bug, which operating system?

from web-haskell-graphql-postgres-boilerplate.

bradsherman avatar bradsherman commented on May 22, 2024

I am getting the same error on wsl 2 (Ubuntu 18.04) when I run the myUserInfo query or the changePassword mutation. login and register work fine so maybe it has something to do with the JWT? I do have the token included in the http headers in the GraphQL playground as well.

Side note: thanks for making this! I just started learning Haskell and I've learned a ton already from setting this up and trying to create my own app.

from web-haskell-graphql-postgres-boilerplate.

dandoh avatar dandoh commented on May 22, 2024

@bradsherman Could you checkout the branch debug, run the query and see what's logged?

Basically I added printing:
image

from web-haskell-graphql-postgres-boilerplate.

bradsherman avatar bradsherman commented on May 22, 2024

I just see it say "Error" and then "Unauthorized". I can see that the "currentUserId" is Nothing so it must be something with parsing the jwt

from web-haskell-graphql-postgres-boilerplate.

bradsherman avatar bradsherman commented on May 22, 2024

I think I found the problem. My Authorization header was "Bearer " as I have grown used to doing it that way. It works if I remove "Bearer "

from web-haskell-graphql-postgres-boilerplate.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.