question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Homepage example stops working with recent packages

See original GitHub issue

Hello, here you can find you “homepage” example, with just a basic “export” of the routes. Using these packages

"hapi": "13.5.0", "hapi-auth-jwt2": "7.0.1"

it works, while using these packages

"hapi": "16.1.0", "hapi-auth-jwt2": "7.2.4"

it does not work (Error: Unknown authentication strategy jwt in…)

The code is at this gist.

As you can see, it is basically your example. How to refactor it? Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ubirajaramnetocommented, Mar 15, 2017

yes, correct, ill edit accordingly, thanks for the correction.

but I do not understand how removing the auth key in the config object breaks it, can you give more details?

The restricted route should look like this:

`{

        method: 'GET',

        path: '/restricted',

        handler: function (request, reply) {

            reply({text: 'You used a Token!'})

                .header("Authorization", request.headers.authorization);

        }

}`

1reaction
carlokcommented, Mar 18, 2017

Hi, I created a new, now working gists with comments (httpie client: cleanear than curl) on its head with link to the docs and this thread. It is at https://gist.github.com/carlok/599443aebbfad8312dd5294c48ab9d31 This is almost the same example of the homepage of the project but this one is working with the recent versions so I’d suggest to update the example according to this one (or a variant) also according to the links you pointed me out to. Thank you so much for your help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexplained Windows or software behavior may be caused ...
Describes behavior that may occur if your computer has deceptive software that is installed and running, and describes steps that you can take...
Read more >
50 Most Common WordPress Errors and How to Fix Them
Is your WordPress website not showing the recent changes you made? The most common reason for this issue is caching. Basically, your browser...
Read more >
Common Build Problems - Travis CI Docs
A very common cause when a test is suddenly breaking without any major code changes involved is a change in upstream dependencies. This...
Read more >
Sunsetting Atom | The GitHub Blog
We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.
Read more >
The Comprehensive R Archive Network
The Comprehensive R Archive Network. Download and Install R. Precompiled binary distributions of the base system and contributed packages, Windows and Mac users ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found