This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import DatePicker from 'react-datepicker'; | |
import moment from 'moment'; | |
import 'react-datepicker/dist/react-datepicker.css'; | |
import DatePickerCustomInput from './datepicker_custom_input'; | |
class RenderDatePicker extends Component { | |
constructor(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { checkToken } = require("../services/token-validator"); | |
// create the router | |
const apiRouter = express.Router(); | |
// tell the router to use checkToken function | |
apiRouter.use(checkToken); | |
// create routes | |
const routes = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const User = require("../models/users.js"); | |
const google = require("googleapis"); | |
const OAuth2 = google.auth.OAuth2; | |
const auth = require("./auth"); | |
const moment = require("moment"); | |
// create auth client | |
const oauth2Client = new OAuth2( | |
auth.googleAuth.clientID, | |
auth.googleAuth.clientSecret, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passport.use(new GoogleStrategy({ | |
clientID: configAuth.googleAuth.clientID, | |
clientSecret: configAuth.googleAuth.clientSecret, | |
callbackURL: configAuth.googleAuth.callbackURL, | |
passReqToCallback: true | |
}, | |
function(req, accessToken, refreshToken, params, profile, done) { | |
/* | |
params = { | |
access_token: 'Long_string', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
export default class GoogleAd extends Component { | |
static propTypes = { | |
client: PropTypes.string, | |
slot: PropTypes.string, | |
format: PropTypes.string, | |
wrapperDivStyle: PropTypes.object | |
} |
NewerOlder