mirror of
https://github.com/zhigang1992/examples.git
synced 2026-01-12 22:47:03 +08:00
Easier development flow on with-facebook
This commit is contained in:
@@ -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}`;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user