This file contains hidden or 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
| // RNApp/app/loggedIn.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| export default React.createClass({ | |
| /* | |
| * Removed from snippet for brevity | |
| */ |
This file contains hidden or 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
| // RNApp/app/index.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| import LoggedOut from './loggedOut'; | |
| export default React.createClass({ | |
| getInitialState() { | |
| return { |
This file contains hidden or 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
| // RNApp/app/loggedOut.js | |
| import React, { | |
| View, | |
| Text, | |
| TextInput, | |
| StyleSheet | |
| } from 'react-native'; | |
| import Button from './button'; |
This file contains hidden or 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
| // RNApp/app/index.js | |
| import React, { | |
| View, | |
| StyleSheet | |
| } from 'react-native'; | |
| import ddpClient from './ddp'; | |
| import LoggedIn from './loggedIn'; |
This file contains hidden or 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
| // RNApp/app/loggedIn.js | |
| import React, { | |
| View, | |
| Text | |
| } from 'react-native'; | |
| import Button from './button'; | |
| import ddpClient from './ddp'; |
This file contains hidden or 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
| // RNApp/app/ddp.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| ddpClient.logout = (cb) => { | |
| AsyncStorage.multiRemove(['userId', 'loginToken', 'loginTokenExpires']). | |
| then((res) => { | |
| ddpClient.call("logout", [], cb) |
This file contains hidden or 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
| // RNApp/app/ddp.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| ddpClient.loginWithToken = (loginToken, cb) => { | |
| let params = { resume: loginToken }; | |
| return ddpClient.call("login", [params], cb) |
This file contains hidden or 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
| // RNApp/app/ddp.js | |
| import DDPClient from 'ddp-client'; | |
| import { AsyncStorage } from 'react-native'; | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| ddpClient.onAuthResponse = (err, res) => { |
This file contains hidden or 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
| // RNApp/app/ddp.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| ddpClient.loginWithUsername = (username, password, cb) => { | |
| let params = { | |
| user: { | |
| username: username |
This file contains hidden or 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
| // RNApp/app/ddp.js | |
| /* | |
| * Removed from snippet for brevity | |
| */ | |
| ddpClient.loginWithEmail = (email, password, cb) => { | |
| let params = { | |
| user: { | |
| email: email |