-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"/auth/linkedin" Does not redirect to linkedin. #15
Comments
I'm just going to guess you where you using 'localhost' which is rewritten to 127.0.0.1, which means your cookie is lost. LinkedIn auth has been stable for 3 minor releases. |
I had 127.0.0.1 set, I'm sure I was doing something wrong. Any chance on getting a linkedin tutorial out on http://avoidwork.github.io/tenso/tutorials.html anytime soon? |
Yeah, sure... but it'll be pretty basic. You're only filling out the config and not setting the routes right? They're generated for you. |
I wrote the above in my config (with correct client and scope data) and it didn't redirect, it just waited.. My complete config: var config = {
routes: routes,
hostname: "127.0.0.1",
port: 1337,
auth: {
protect: ["/something"],
bearer: {
enabled: true,
tokens: []
},
linkedin: {
enabled: true,
auth: function(token, tokenSecret, profile, done) {
users.linkedin(token, profile).then(function(result) {
done(null, result);
});
},
client_id: "...",
client_secret: "...",
scope: ['r_network', 'rw_groups', 'r_fullprofile']
}
},
headers: {
}
} |
I'll test that tonight, but it's practically the same as my tests. I do see you not handling the error case of your promise tsk tsk ;) |
The combo of bearer + linkedin is not playing nice. |
Bearer auth is currently not tied to an end point, so when you try to access the first step of the linkedin auth, you're already technically unauthorized via the session, hence the message. Bearer & Basic will have to be tied to new |
…earer` under `/auth`, such that they don't collide with stateful strategies, updated `hypermedia()` to add a `collection` link for non `Array/Object` representations & to set a `rel` of `item` for `Array` based links, updated tests, fixes #15 Reverting a test condition
My config has linkedin enabled like so:
My linkedin account also has the correct port for callback. My same setup was not changed from a working version with express.
After diving into your code, I found a couple differences:
passReqToCallback: true
to my passport options so I could add the token to the session store.This could very well be my own error, so if it is not an error, and you in fact are able to get redirected, maybe I could be pointed in the right direction.
The text was updated successfully, but these errors were encountered: