Comments (13)
Does it work with Discogs Auth as the authentication method?
from disconnect.
Apologies for my lack of knowledge but how would I do that?
from disconnect.
Like this: https://www.discogs.com/developers/#page:authentication,header:authentication-discogs-auth-flow
from disconnect.
So does the identity example no longer work then? I was just following the readme. Is it out of date?
from disconnect.
I think this was closed by mistake? It's still not working. Could you maybe try the examples? The identity example does not work.
from disconnect.
Oops, I didn't mean to close this indeed! Probably clicked the wrong button. Sorry! I will probably have time to look into this tomorrow.
from disconnect.
Cheers! I'm trying to help a mate out by building him an app and stuck at the moment :-(
On 13 Jun 2016, at 6:39 AM, Bart [email protected] wrote:
Oops, I didn't mean to close this indeed! Probably clicked the wrong button. Sorry! I will probably have time to look into this tomorrow.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from disconnect.
I did some tests and I don't seem to be able to reproduce the issue. Are you sure the access token is correctly persisted and passed? The OAuth flow is quite complicated and you must pass the final access token and not a token from an earlier step. Both Discogs Auth and OAuth authentication in combination with the identity endpoint seem to be working fine here. I also would have expected others to complain if this was broken.
from disconnect.
Thanks for taking a look. I'll send some more info when I get home.
On 14 Jun 2016, at 7:52 AM, Bart [email protected] wrote:
I did some tests and I don't seem to be able to reproduce the issue. Are you sure the access token is correctly persisted and passed? The OAuth flow is quite complicated and you must pass the final access token and not a token from an earlier step. Both Discogs Auth and OAuth authentication in combination with the identity endpoint seem to be working fine here. I also would have expected others to complain if this was broken.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from disconnect.
I'm using cookie-session to persist the accessData
and requestData
:
cookieSession = require('cookie-session');
app.use(cookieSession({
keys: ['key1', 'key2']
}));
and then I store what's returned in accessData
as below in the callback after oauth:
// Persist "accessData" here for following OAuth calls
req.session.accessData = accessData;
console.log(accessData === req.session.accessData)
straight after returns true
as does console.log(dis.authenticated())
. accessData
returns the following (some parts hidden):
{
method: 'oauth',
level: 0,
consumerKey: '...',
consumerSecret: '...',
token: '...',
tokenSecret: '...',
authorizeUrl: 'https://www.discogs.com/oauth/authorize?oauth_token=...'
}
In the method that uses getIdentity a console.log(req.session.accessData)
returns the same as above but it still doesn't seem to authenticate. I tried passing the token
and tokenSecret
properties rather than the whole object but it didn't seem to work either...
Which seems to be very similar to the requestData
used in the earlier step? Sorry if it's a little confusing. I can send you the server.js
file if it helps.
from disconnect.
OK, I figured it out. It was earlier in the process. Getting the access token was actually failing silently (as I wasn't checking the err
argument value) due to the oauth_verifier
query parameter being missing. It was because I wasn't accessing the query
property when parsing the URL:
var query = url.parse(req.url, true).query;
Sorry about all this. Thanks for looking into it for me though
from disconnect.
No problem. Glad you got it to work
from disconnect.
Hi. I just found this exampe of a similar problem I'm having. I'm using the oAuth method and it's working fine up until trying the /identity test. The flow completes succesfully bringing me back to my app succesfully but I get a 401 auth error on /identity and when I investigate I discover that the accessData that I persisted in the /callback is the same as the requestData that I persisted in the /authorise. I'm persisting both those objects in app.locals. Any idea why they are the same? Neither the /authorise or /callback return any err.
Thanks
from disconnect.
Related Issues (20)
- Unwinding sub-arrays
- sorting releases from marketplace HOT 1
- Problem with Client().database().getRelease() HOT 4
- CORS Error on res.redirect() to OAuth authorizeURL -- Ngrok, Express, Ubuntu HOT 1
- Identity AuthError: You must authenticate to access this resource HOT 1
- Cannot access to my data w/ OAuth or userToken HOT 2
- Receiving error on larger requests
- How to get Master Release by ID? HOT 1
- Need more usage examples. It's a real struggle to decipher. HOT 3
- Handle statusMessage: 'Too Many Requests' ? HOT 4
- How to deal with rate limit using async await ? HOT 3
- Add new release marketplace statistics endpoint
- Using disconnect with browserify HOT 1
- Issue running disconnect w/ webpack
- cant get data for master release HOT 1
- outputFormat not working, found a solution
- Typescript support HOT 3
- Question: Search release by barcode
- More set methods?
- How to use pagination with getInventory HOT 1
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 disconnect.