From 8533025fdc7535e7b75aed28aaa88097e496296f Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Fri, 21 Jul 2017 14:06:35 -0700 Subject: [PATCH] Easier development flow on with-facebook --- with-facebook-auth/app/main.js | 2 +- with-facebook-auth/backend/index.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/with-facebook-auth/app/main.js b/with-facebook-auth/app/main.js index c24834e..85d73c9 100644 --- a/with-facebook-auth/app/main.js +++ b/with-facebook-auth/app/main.js @@ -4,7 +4,7 @@ import { Alert, Button, Linking, StyleSheet, Text, View } from 'react-native'; const AppID = '288424861584897'; const RedirectURI = __DEV__ - ? 'https://redirect-with-params-kwpsftqjdy.now.sh/facebook' +? 'https://expo-test.ngrok.io/facebook' : 'https://redirect-with-params-vwlrmrqtzt.now.sh/facebook'; const FacebookAuthURI = `https://www.facebook.com/v2.8/dialog/oauth?client_id=${AppID}&redirect_uri=${RedirectURI}`; diff --git a/with-facebook-auth/backend/index.js b/with-facebook-auth/backend/index.js index 474238c..b552e04 100644 --- a/with-facebook-auth/backend/index.js +++ b/with-facebook-auth/backend/index.js @@ -2,7 +2,11 @@ const app = require('express')(); app.get('/facebook', (req, res) => { let qs = req._parsedUrl.query; - res.redirect('exp://exp.host/@community/with-facebook-auth/+redirect/?' + qs); + if (process.env.NODE_ENV === 'development') { + res.redirect('exp://ge-cha.notbrent.app.exp.direct:80/+redirect/?' + qs); + } else { + res.redirect('exp://exp.host/@community/with-facebook-auth/+redirect/?' + qs); + } }); app.listen(3000);