File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 5.0.0" ,
4
4
"private" : true ,
5
5
"scripts" : {
6
- "build" : " REACT_APP_BACKEND=true PUBLIC_URL='/sing-app-react' node scripts/build.js" ,
6
+ "build" : " cross-env REACT_APP_BACKEND=true cross-env PUBLIC_URL='/sing-app-react' node scripts/build.js" ,
7
7
"start" : " node scripts/start.js" ,
8
8
"start:backend" : " cross-env REACT_APP_BACKEND=true node scripts/start.js" ,
9
9
"test" : " node scripts/test.js"
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export function loginUser(creds) {
122
122
type : LOGIN_REQUEST ,
123
123
} ) ;
124
124
if ( creds . social ) {
125
- window . location . href = config . baseURLApi + "/auth/signin/" + creds . social ;
125
+ window . location . href = config . baseURLApi + "/auth/signin/" + creds . social + '?app=' + config . redirectUrl ;
126
126
} else if ( creds . email . length > 0 && creds . password . length > 0 ) {
127
127
axios . post ( "/auth/signin/local" , creds ) . then ( res => {
128
128
const token = res . data ;
Original file line number Diff line number Diff line change 1
1
const hostApi = process . env . NODE_ENV === "development" ? "http://localhost" : "https://sing-generator-node.herokuapp.com" ;
2
2
const portApi = process . env . NODE_ENV === "development" ? 8080 : "" ;
3
3
const baseURLApi = `${ hostApi } ${ portApi ? `:${ portApi } ` : `` } /api` ;
4
+ const redirectUrl = process . env . NODE_ENV === "development" ? "http://localhost:5000/sing-app-react" : "https://demo.flatlogic.com/sing-app-react" ;
4
5
5
6
export default {
7
+ redirectUrl,
6
8
hostApi,
7
9
portApi,
8
10
baseURLApi,
You can’t perform that action at this time.
0 commit comments