Passport strategy for authenticating with Twitter using the OAuth 1.0a API.
Questions tagged [passport-twitter]
60 questions
8
votes
5 answers
Twitter authentication with Passport middleware in Node
I'm developing a website with Node.js (using Express framework). In order to use Twitter authentication, I'm using passport module (http://passportjs.org), and his wrapper for Twitter called passport-twitter.
My server-side script is:
/**
* Module…
user1288707
7
votes
2 answers
How to use session variable req.user in passport-twitter strategy
As I can use req.user to get the logged in user in any of route by passing in:
passport.authenticate("jwt", { session: false })
I want to allow the user to sign in with twitter other than local login, so I have a passport-twitter strategy in…

Ibtisam Ur Rehman
- 119
- 6
6
votes
3 answers
sails.js with passport-twitter
I am integrating passport with sails.
While google and facebook is working fine in my application I struggle with twitter authentication! When clicking on the 'login with twitter' button there is an error thrown wich says: Error: OAuthStrategy…

Sven
- 6,288
- 24
- 74
- 116
4
votes
2 answers
Social Login in NestJS using @AuthGuard, Passport
So, I have almost finished attempt to implement social login in NestJS powered app. I have some problems though:
First things first. I have AuthModule and in there is provider TwitterGuard:
const twitterOptions: IStrategyOptionWithRequest = {
…

PeS
- 3,757
- 3
- 40
- 51
4
votes
1 answer
Passport.js OAuth 2.0 to use bearers
I'm trying to implement the Google OAuth Passport.js strategy but due to the lack of documentation and examples, I can't seem to able to answer certain questions.
My application is using bearers rather than cookies for security and technological…

m_vdbeek
- 3,704
- 7
- 46
- 77
3
votes
0 answers
Node.js passport-twitter: Unable to get user email in passport-twitter authentication
I want to get the user email when the user is logging in with the Twitter strategy within the profile object. I searched for answers. I found these links where people are saying to use includeEmail or the URL with include_email endpoint. Sadly their…

Abeer
- 155
- 1
- 11
3
votes
0 answers
Using html5 localstorage instead of cookies with passport.js
Is there any way to use localstorage instead of cookies when dealing with passport.js oauth implementations (such as google, twitter or facebook) for persistence login?
The reason is quite simple: you can't use cookies in native apps wrappers like…

Integral
- 115
- 1
- 8
3
votes
1 answer
Nodejs + Passport + MySQL
I'm trying to figure out how to use nodejs + Passport + MySQL. It seems as though just about every tutorial out there is using mongoDB and I don't want to do that. In fact some quick searches of this type will yield web pages like…

user1572597
- 373
- 3
- 15
2
votes
0 answers
passport-twitter returns "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"
I am stuck trying to solve the problem, but ended up with here. This is the erroneous code repo.
I got an error saying:
Failed to load resource: the server responded with a status of 500(Internal Server Error)`
and for such a code snippet, it…

Leon
- 811
- 10
- 21
2
votes
1 answer
Sails.js + passport behind Nginx proxy
I've started a new Sails.js project and want to implement passport-twitter for authentication.
Everything is implemented correctly using the sails-generator-auth module, but after Twitter authorization I get redirected to…

Steffen
- 589
- 6
- 16
2
votes
0 answers
Change the callback URL with passport-twitter
I am using passport-twitter to add a twitter connect to my website.
User can connect via different actions and I'd like to redirect them to different pages depending on where they clicked.
So far I am using the same callback url every…

Spearfisher
- 8,445
- 19
- 70
- 124
2
votes
1 answer
Login with twitter oAuth and Passport.js
I'm building an application in node.js that allows to login with an twitter account.
The first time that I've run the code, wit worked, but some days later it simply returns some error.
I tried to change my twitter application configuration, but it…

Tomás Juárez
- 1,517
- 3
- 21
- 51
2
votes
2 answers
Cannot GET /auth/twitter/callback while using twitter oauth in nodejs
I'm trying to do twitter oauth in nodejs using passportjs but getting error
Cannot GET /auth/twitter/callback?oauth_token=alksdkalsjdsjd23232378skjdfjsdhf&oauth_verifier=234jjh23j4k234k23h4j2h342k34hj
Here is my node js code
var express =…

iJade
- 23,144
- 56
- 154
- 243
1
vote
1 answer
Linking Twitter account to user account (twitter-passport)
Currently, a user is able to login in and sign up for my application no problem. I've then added a "Link your twitter user to account" button which when clicked takes the user to '/auth/twitter'. This then kicks off passport-twitter and the oAuth…

Seth King
- 11
- 3
1
vote
0 answers
InternalOAuthError: failed to obtain request token passport-twitter
I followed the docs of passport-twitter
`
const TwitterStrategy = require("passport-twitter").Strategy
passport.use(new TwitterStrategy({
consumerKey: process.env.TWITTER_CONSUMER_KEY,
consumerSecret: process.env.TWITTER_CONSUMER_SECRET,
…

Naeem Navjivan
- 29
- 1
- 3