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.

middleware (node-oauth2-server) can't return it's string

See original GitHub issue

Hi, I am implementing oauth2 like I did in the expressjs project.

I put the following codes in routes/index.js

app.all('/oauth/token', oauth.grant());

It is triggered and token is generated in console.log.

in saveAccessToken (token: 4d82d4a819a6814459dde40e2e8f9d5f956d6028, clientId: myclientid, userId: 12345566666666, expires: Sun Feb 08 2015 11:15:51 GMT+0800 (HKT))

However, there is no return and Timeout.

In my expressjs, the oauth.grant() will return a token string. Is there anything I need to override in Keystonejs in order to let the middleware run the response?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
connor11528commented, Apr 17, 2016

Has anyone made a starter template for oauth login with Keystone.js? It would be awesome to have and I’d be down to collaborate on one!

0reactions
r1bcommented, Apr 18, 2016

@cleechtech I believe this Sydjs Site repo has an implementation

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-oauth2-server/migrating-v2-to-v3.rst at master - GitHub
getAccessToken(token) should return an object with: accessToken (String); accessTokenExpiresAt (Date); client (Object), containing at least an id property that ...
Read more >
How to implement OAuth 2.0 in Node.js - LogRocket Blog
Learn how to implement OAuth 2.0 in Node.js by developing an overwritten implementation and testing it through a real API.
Read more >
node-oauth2-server - npm
Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js. Latest version: 2.4.0, ...
Read more >
Express JS OAuth 2 Server using oauth2-server package
In this tutorial we will create an OAuth 2 server using Express JS and test using postman. For database we will use Mongo...
Read more >
oauth2-server Documentation - Read the Docs
Adapters typically do the following: • Inherit from OAuth2Server. • Override authenticate(), authorize() and token().
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