Giter VIP home page Giter VIP logo

Comments (3)

nelsonic avatar nelsonic commented on June 2, 2024

Annoying error when attempting to use a JWT in Authorization header:

  1) test AuthMvp.Email send/1 an email (AuthMvp.EmailTest)
     test/auth_mvp/email_test.exs:5
     ** (ArgumentError) argument error
     code: res = AuthMvp.Email.send(params)
     stacktrace:
       :erlang.iolist_to_binary([Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJKb2tlbiIsImVtYWlsIjoic3VjY2Vzc0BzaW11bGF0b3IuYW1hem9uc2VzLmNvbSIsImV4cCI6MTYxNjg2MDcyOSwiaWF0IjoxNTg1MzIzNzI5LCJpc3MiOiJKb2tlbiIsImp0aSI6IjJvMDM3MjJhYjA0bmg4bGppazAwMDBmMSIsIm5hbWUiOiJTdXBlciBTdWNjZXNzZnVsIiwibmJmIjoxNTg1MzIzNzI5LCJ0ZW1wbGF0ZSI6IndlbGNvbWUifQ.iVjxMsyCTmaem_N4TH3YiXOasTPIGTHR0XOpnlEK2qc", "Content-Type": "application/json"])
       (hackney 1.15.2) /Users/n/code/auth-mvp/deps/hackney/src/hackney_request.erl:348: :hackney_request.handle_body/4
       (hackney 1.15.2) /Users/n/code/auth-mvp/deps/hackney/src/hackney_request.erl:83: :hackney_request.perform/2
       (hackney 1.15.2) /Users/n/code/auth-mvp/deps/hackney/src/hackney.erl:376: :hackney.send_request/2
       (httpoison 1.6.2) lib/httpoison/base.ex:796: HTTPoison.Base.request/6
       (auth_mvp 0.1.0) lib/auth_mvp/email.ex:14: AuthMvp.Email.send/1
       test/auth_mvp/email_test.exs:12: (test)

from auth.

nelsonic avatar nelsonic commented on June 2, 2024

Figured out the hackney error. It was because of an incorrect ordering of parameters.
The correct code is:
https://github.com/dwyl/auth-mvp/blob/556f1b186c5399a42004ff047e4f5a8de08ee069/lib/auth_mvp/email.ex#L31

PR dwyl/auth-mvp#17 created.

from auth.

nelsonic avatar nelsonic commented on June 2, 2024

Included in #43 💌

from auth.

Related Issues (20)

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.