-
Notifications
You must be signed in to change notification settings - Fork 4
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
#159987698 Social media auth integration #26
Conversation
- user sign up and login through their existing facebook, twitter and google account 159987698
- ensure user is authenticated using facebook - ensure the user is authenticated using google - ensure the user is authenticated using twitter 159987698
- ensure a user can signup or login to the app using their existing facebook, google account - Store the received parameters in the dtatabase
- user signup and login by facebook account is available - user signup and login using google account is available - fix the coveralls error [Delivers #159987698]
- user can login with either their existing facebook and google accounts - fix the coverage errors in the repo [Delivers #159987698]
= change a few files to fix travis build error [Fixes #159987698]
|
||
router.post('/auth/response', SocialAuthController.response); | ||
|
||
export default router; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'export' is only available in ES6 (use 'esversion: 6').
import { Router } from 'express'; | ||
import SocialAuthController from '../../controllers/socialAuth'; | ||
|
||
const router = Router(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
@@ -0,0 +1,23 @@ | |||
import passport from 'passport'; | |||
import { Router } from 'express'; | |||
import SocialAuthController from '../../controllers/socialAuth'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1,23 @@ | |||
import passport from 'passport'; | |||
import { Router } from 'express'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1,23 @@ | |||
import passport from 'passport'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
firstName: req.user.firstName, | ||
image: req.user.image | ||
}; | ||
const { email } = user; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
* @memberof SocialAuthController | ||
*/ | ||
static response(req, res) { | ||
const user = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
id, email, username, firstName, lastName, image | ||
} = foundOrCreated.dataValues; | ||
done(null, { | ||
email, id, username, firstName, lastName, image, created, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}, | ||
defaults: user, | ||
}).spread((foundOrCreated, created) => { | ||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
email: user.email | ||
}, | ||
defaults: user, | ||
}).spread((foundOrCreated, created) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
What does this PR do?
Add social media authentication login in the app
Description of Task to be completed?
added two new endpoints to the routes GET /api/auth/facebook GET /api/auth/facebook
User can signup on the app with their existing Google and facebook account
How should this be manually tested?
What are the relevant pivotal tracker stories?
159987698