Coder Social home page Coder Social logo

leaonline / oauth2-server Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 9.0 390 KB

OAuth 2 Server package for Meteor to create your own OAuth 2 authorization server. Zero config. Uses continuous updated @node-oauth/oauth2-server library

License: MIT License

JavaScript 100.00%
meteor meteorjs oauth2 nodejs hacktoberfest authorization-code-grant authorization-server

oauth2-server's Issues

Linter not running on macOX

Describe the bug
I do not get the linter to run on macOS.

To Reproduce
Steps to reproduce the behavior:

  1. Install test-proxy according to the contribution guidelines.
  2. Run meteor npm run lint

Expected behavior
Lint script should run without errors.

Logs


> test-proxy@ lint /folder/oauth2-server/test-proxy
> standardx -v ./packages/oauth2-server | snazzy

internal/modules/cjs/loader.js:936
  throw err;
  ^

Error: Cannot find module './lib/_stream_readable.js'
Require stack:
- /folder/oauth2-server/test-proxy/node_modules/readable-stream/readable.js
- /folder/oauth2-server/test-proxy/node_modules/snazzy/index.js
- /folder/oauth2-server/test-proxy/node_modules/snazzy/bin/cmd.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:933:15)
    at Function.Module._load (internal/modules/cjs/loader.js:776:27)
    at Module.require (internal/modules/cjs/loader.js:1005:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/folder/oauth2-server/test-proxy/node_modules/readable-stream/readable.js:7:30)
    at Module._compile (internal/modules/cjs/loader.js:1116:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1145:10)
    at Module.load (internal/modules/cjs/loader.js:981:32)
    at Function.Module._load (internal/modules/cjs/loader.js:821:12)
    at Module.require (internal/modules/cjs/loader.js:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/folder/oauth2-server/test-proxy/node_modules/readable-stream/readable.js',
    '/folder/oauth2-server/test-proxy/node_modules/snazzy/index.js',
    '/folder/oauth2-server/test-proxy/node_modules/snazzy/bin/cmd.js'
  ]
}
standardx: Unexpected linter output:

Error: Failed to load plugin 'react' declared in 'BaseConfig » eslint-config-standard-jsx': Cannot find module 'es-errors'
Require stack:
- /folder/oauth2-server/test-proxy/node_modules/get-intrinsic/index.js
- /folder/oauth2-server/test-proxy/node_modules/call-bind/index.js
- /folder/oauth2-server/test-proxy/node_modules/object.fromentries/index.js
- /folder/oauth2-server/test-proxy/node_modules/eslint-plugin-react/index.js
- /folder/oauth2-server/test-proxy/node_modules/@eslint/eslintrc/lib/config-array-factory.js
- /folder/oauth2-server/test-proxy/node_modules/@eslint/eslintrc/lib/index.js
- /folder/oauth2-server/test-proxy/node_modules/eslint/lib/cli-engine/cli-engine.js
- /folder/oauth2-server/test-proxy/node_modules/eslint/lib/cli-engine/index.js
- /folder/oauth2-server/test-proxy/node_modules/eslint/lib/api.js
- /folder/oauth2-server/test-proxy/node_modules/standard/options.js
- /folder/oauth2-server/test-proxy/node_modules/standardx/options.js
- /folder/oauth2-server/test-proxy/node_modules/standardx/bin/cmd.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:933:15)
    at Function.Module._load (internal/modules/cjs/loader.js:776:27)
    at Module.require (internal/modules/cjs/loader.js:1005:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/folder/oauth2-server/test-proxy/node_modules/get-intrinsic/index.js:5:14)
    at Module._compile (internal/modules/cjs/loader.js:1116:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1145:10)
    at Module.load (internal/modules/cjs/loader.js:981:32)
    at Function.Module._load (internal/modules/cjs/loader.js:821:12)
    at Module.require (internal/modules/cjs/loader.js:1005:19)

If you think this is a bug in `standardx`, open an issue: https://github.com/standard/standardx/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-proxy@ lint: `standardx -v ./packages/oauth2-server | snazzy`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test-proxy@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.3

refresh_token request to /oauth/token not possible

Describe the bug
According to RFC 6749, a refresh of an access token only requires the grant_type and the refresh_token. However, an incoming request fails with the message [validation error]: key <code> => expected <[object Object]>, got <undefined>.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a oauth2 according to the docs, enable debug.
  2. request an access token (eg. via postman)
  3. place a refresh token request, with a body like {refresh_token: "12345xyz", grant_type: "refresh_token"}
  4. check the logs

Expected behavior
Refresh request should provide a fresh access token

Error in callback when unregistered client requests the authorization GET route

I20190830-14:03:45.614(2)? Exception in callback of async function: Error: Can't set headers after they are sent.
I20190830-14:03:45.614(2)?     at validateHeader (_http_outgoing.js:491:11)
I20190830-14:03:45.614(2)?     at ServerResponse.setHeader (_http_outgoing.js:498:3)
I20190830-14:03:45.614(2)?     at ServerResponse.setWriteHeadHeaders (/Users/admin/.meteor/packages/webapp/.1.7.4.11um7dv.19c5h++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/on-headers/index.js:82:19)
I20190830-14:03:45.614(2)?     at ServerResponse.writeHead (/Users/admin/.meteor/packages/webapp/.1.7.4.11um7dv.19c5h++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/on-headers/index.js:41:36)
I20190830-14:03:45.614(2)?     at errorHandler (packages/leaonline:oauth2-server/error.js:3:7)
I20190830-14:03:45.614(2)?     at packages/leaonline:oauth2-server/oauth.js:155:11
I20190830-14:03:45.615(2)?     at runWithEnvironment (packages/meteor.js:1286:24)
I20190830-14:03:45.615(2)?     at packages/meteor.js:1299:14
I20190830-14:03:45.615(2)?     at packages/leaonline:oauth2-server/webapp.js:11:15
I20190830-14:03:45.615(2)?     at /Users/admin/.meteor/packages/promise/.0.11.2.hy69oz.ytuae++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
W20190830-14:03:45.615(2)? (STDERR) [ERROR] 500 - unauthorized_client - This client is not authorized to use this service

update ci

  • update actions to v3
  • update node to 14
  • update Meteor to 2.8.1

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.