Skip to content

Commit 7e8031b

Browse files
committed
moved everything to /src dir
1 parent fd8bf15 commit 7e8031b

8 files changed

+10
-16
lines changed

README.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Logging Into React Native Apps with Facebook/Google/GitHub and storing user sessions in RethinkDB
1+
## [Passport.JS](http://www.passportjs.org/) authentication for [React Native](https://facebook.github.io/react-native/) user account sessions stored with [RethinkDB](https://www.rethinkdb.com/)
22

3-
Learn how to log users into React Native apps via Facebook/Google/GitHub OAuth.
3+
npm install
44

5-
make sure to **activate port forwarding** in your browser: ie - `chrome://inspect/#devices`
5+
make sure to **activate port forwarding** in your desktop browser to port **3000**: ie - [`chrome://inspect/#devices`](chrome://inspect/#devices)
66

77
rethinkdb
88

@@ -12,16 +12,10 @@ make sure to **activate port forwarding** in your browser: ie - `chrome://inspec
1212
or
1313
npm run ios
1414

15-
#### thanks to:
15+
## thanks to:
1616

17-
[Konstantin Shkut](https://github.com/KonstantinShkut) for [demonstrating](https://github.com/rationalappdev/react-native-oauth-login-tutorial) how passport.js works with react native
18-
[Jorge Silva](https://github.com/thejsj) for [demonstrating](https://github.com/thejsj/passport-rethinkdb-tutorial) how passport.js works with rethinkDB
19-
20-
## original tutorial
21-
22-
Read the full tutorial [here](http://rationalappdev.com/logging-into-react-native-apps-with-facebook-or-google)
23-
24-
in this repository, i decided to split up the workflow into a few separate files instead of a single `./backend/server.js` file
17+
- [Konstantin Shkut](https://github.com/KonstantinShkut) for [demonstrating](https://github.com/rationalappdev/react-native-oauth-login-tutorial) how passport.js works with react native. Read the full original tutorial [here](http://rationalappdev.com/logging-into-react-native-apps-with-facebook-or-google).
18+
- [Jorge Silva](https://github.com/thejsj) for [demonstrating](https://github.com/thejsj/passport-rethinkdb-tutorial) how passport.js works with rethinkDB. Read the full original tutorial [here](https://rethinkdb.com/blog/passport-oauth-with-rethinkdb/).
2519

2620
## Demo
2721

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"ios": "react-native run-ios",
77
"android": "react-native run-android",
8-
"server": "node_modules/nodemon/bin/nodemon.js -- node_modules/babel-cli/bin/babel-node.js ./backend/server.js"
8+
"server": "node_modules/nodemon/bin/nodemon.js -- node_modules/babel-cli/bin/babel-node.js ./src/server"
99
},
1010
"dependencies": {
1111
"express": "^4.16.3",
File renamed without changes.

backend/authRoutes.js src/server/authRoutes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
app,
33
passport,
4-
} from './server'
4+
} from '.'
55

66
// Set up Facebook auth routes
77
app.get('/auth/facebook', passport.authenticate('facebook'))

backend/authStrategies.js src/server/authStrategies.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from './config'
1010
import {
1111
passport,
12-
} from './server'
12+
} from '.'
1313
import {
1414
r,
1515
dbConnx,
File renamed without changes.

backend/db.js src/server/db.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from './config'
77
import {
88
server,
9-
} from './server'
9+
} from '.'
1010
var r = require('rethinkdb')
1111
var dbConnx = null
1212
var io = require('socket.io')(server, {pingTimeout: 1})
File renamed without changes.

0 commit comments

Comments
 (0)