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
router.post("/linkedin-sso-response", async (req, res) => { | |
try { | |
if (!req.body.redirectUri || !req.body.authCode) { | |
return res.json({ msg: "Some Error occured! Try again" }); | |
} | |
const { authCode, redirectUri } = req.body; | |
const clientId = config.get("clientId"); | |
const clientSecret = config.get("clientSecret"); | |
var response = await axios.get( | |
`https://www.linkedin.com/oauth/v2/accessToken?grant_type=authorization_code&client_id=${clientId}&client_secret=${clientSecret}&code=${authCode}&redirect_uri=${redirectUri}` |
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 from "react"; | |
import PropTypes from "prop-types"; | |
import { connect } from "react-redux"; | |
import store from "../../store.js"; | |
import { Route, Redirect } from "react-router-dom"; | |
import { LinkedIn } from "react-linkedin-login-oauth2"; | |
import { Button } from "carbon-components-react"; | |
import { Typography, CircularProgress } from "@material-ui/core"; | |
const axios = require("axios"); | |
const config = require("../../config/default.json"); |
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 from "react"; | |
import PropTypes from "prop-types"; | |
import { connect } from "react-redux"; | |
import store from "../../store.js"; | |
import { Route, Redirect } from "react-router-dom"; | |
import FacebookLogin from 'react-facebook-login/dist/facebook-login-render-props' | |
import {Button} from "carbon-components-react" | |
const SSOWithFacebook = ({ |
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
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET", | |
"PUT", | |
"POST", | |
"HEAD", |
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
{ | |
"Version": "2012-10-17", | |
"Id": "Policy1618249237358", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1618249235135", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:*", | |
"Resource": "arn:aws:s3:::bucket-name/*", |
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 AWS from 'aws-sdk' | |
import S3 from 'react-aws-s3'; | |
const path = require("path") | |
const S3Encode = require("s3encode").default | |
const S3_BUCKET = process.env.REACT_APP_BUCKET_NAME; | |
const REGION = process.env.REACT_APP_AWS_S3_REGION; | |
AWS.config.update({ |
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 brain = require('brain.js') | |
const data = require('./data') | |
const express = require('express') | |
var app = express() | |
const cors = require('cors') | |
app.use(cors()) | |
var trainingData = [] | |
var testingData = [] | |
var maxClose = Math.max.apply(Math, data.map(function(o) { | |
return o.Close |
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,{useEffect, useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
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,{useEffect, useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
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,{useState} from 'react'; | |
import logo from './logo.svg'; | |
import axios from 'axios' | |
import './App.css'; | |
function App() { | |
const[data,setData] = useState({ | |
flag:false, | |
result:'' |
NewerOlder