Comments (2)
I met the same issue.
To sovle this, you need to know two things:
- this app will send request to kong admin api, but this request is not send from the app's ip, but your browser's ip, so make sure your browser can send request to kong admin api successfully.
- maybe you use the lastest kong , and this app seems does't update in time. so you can modify it by your self.
before modify
kong-oauth2-hello-world/app.js
Lines 70 to 76 in 4ffe961
after modify
if (json_response.data.length == 1) {
+ console.log(json_response); // print json_response, if json_response =='{"message":"not found"}', it seems your browser can't send request to kong admin api
+ application_name = json_response[name];
- application_name = json_response.data[0].name;
}
}
callback(application_name);
});
}
from kong-oauth2-hello-world.
you should check first if json_response.data is not undefined, before invoke length, without this, server can fail:
if (json_response.data && json_response.data.length == 1) { application_name = json_response.data[0].name; }
from kong-oauth2-hello-world.
Related Issues (15)
- Access Denied: You must use HTTPS HOT 2
- example problem with kong version 0.11.1 (running in docker ce version 17.09.0-ce-mac35 (19611) on macOS 10.13.1) HOT 2
- What is the License for this repository?
- Does the oauth plugin work with routes (as opposed to apis)? HOT 2
- Update for Kong CE 0.14? HOT 2
- wrong scopes HOT 1
- Can it support multiple consumers? HOT 1
- Error: Invalid client_id HOT 1
- [Needs clarification] - Creating oauth2 application: redirect_uris <===> redirect_uri
- After clicking the "Authorize" button, the server error, can be not redirected to the redirect_uri HOT 7
- How to generate tokens
- how does node verify if the access token sent to an API endpoint valid? HOT 1
- how does kong deal with claims in oauth2?
- Plugin problems HOT 3
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 kong-oauth2-hello-world.