Comments (3)
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.
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.
Included in #43
from auth.
Related Issues (20)
- Groups UI/UX HOT 1
- Phoenix.Template.UndefinedError Could not render "live.html" for AuthWeb.LayoutView HOT 1
- Chore: Fix Failing Auth Tests HOT 3
- Review how auth application works
- Chore: Sample `people` for testing `groups` on `localhost` HOT 3
- Chore: Use `statuses` [in-memory] in `auth`
- Auth: Deploy Demo Version to Fly.io HOT 11
- Bug: GitHub Username Not Returned by Auth ... 🤦♂️ HOT 7
- BLOCKER: Internal Server Error when Registering with Email Address! HOT 5
- Error `expected a binary but got: nil` HOT 7
- Technical Question: should we use a `JWT` for `AUTH_API_KEY`? HOT 8
- Feat: Auth Setup Wizard `#discuss`
- Feat: Use `Gmail` to send Email!! 📧 🤯
- Tech Question: Do we even Need an `AUTH_API_KEY`? 💭 🤷♂️ HOT 5
- Feat: Copy `AUTH_URL` to clipboard
- Feat: Allowed List of URLs for each `AUTH_API_KEY`
- Chore: Generate ERD for `mix phx.gen.auth` HOT 2
- Chore: Update the `people.email` to use `Fields.EmailEncrypted` HOT 4
- Feat: Re-create Login Screen Using Tailwind CSS HOT 2
- Feat: Delegated Auth
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth.