Comments (3)
You can choose between the sails way http://sailsjs.org/documentation/concepts/configuration or using environment variables.
passport.use(new TwitterStrategy({
consumerKey: process.env.TWITTER_KEY,
consumerSecret: process.env.TWITTER_SECRET,
callbackURL: 'http://localhost:1337/auth/twitter/callback'
}, verifyHandler));
Now, the magic happens when you run the application like this
TWITTER_KEY=123 TWITTER_SECRET=456 sails lift
from sails-social-auth-example.
Ok, but the idea is before login, select a parameter, then based on this select the appropriate tokens in the database.
Is change tokens in time execute.
The parameters is selected before login, itΒ΄s param save in 'req.session'. by it want to use req.session
Thanks !
from sails-social-auth-example.
I'm not sure if this is possible and how you could do that. Your questions is how to plug-in a middleware at run-time. Ask the maintainer if and how this is possible. Good luck
from sails-social-auth-example.
Related Issues (20)
- auth/google/callback never gets called HOT 1
- Google plus and facebook detail HOT 2
- MySQL Database HOT 8
- Authentication for socket requests HOT 1
- mongo auth fails in sails_0.10 branch HOT 1
- sails 0.10.x HOT 4
- Failed to login more than one person. HOT 1
- Do you know how to add basic Email and Password auth HOT 1
- Return URL problem when using path.join HOT 2
- Google authentication callback never triggers HOT 4
- Twitter auth stopped working HOT 2
- change call back url HOT 1
- Instructions for adding new Strategies HOT 1
- How to store user ids and api keys in config/env/production.js? HOT 1
- Cancelling the facebook permissions request causes 500 error HOT 1
- Getting username from the req.user HOT 1
- Errors for missing policies in api/policies/ HOT 1
- Cannot find module 'express/node_modules/cookie' HOT 2
- how can i enable sail's default CRUD operations? 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 sails-social-auth-example.