├── client ├── .watchmanconfig ├── genymotion │ ├── hosts │ └── README.md ├── .babelrc ├── android │ ├── app │ │ ├── src │ │ │ └── main │ │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ └── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── oauth │ │ │ │ └── MainActivity.java │ │ ├── proguard-rules.pro │ │ ├── react.gradle │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── build.gradle │ ├── gradle.properties │ ├── gradlew.bat │ └── gradlew ├── ios │ ├── RNCookieManagerIOS │ │ ├── RNCookieManagerIOS.h │ │ └── RNCookieManagerIOS.m │ ├── oAuth │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── AppDelegate.m │ │ └── Base.lproj │ │ │ └── LaunchScreen.xib │ ├── oAuthTests │ │ ├── Info.plist │ │ └── oAuthTests.m │ └── oAuth.xcodeproj │ │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── oAuth.xcscheme │ │ └── project.pbxproj ├── index.ios.js ├── index.android.js ├── package.json ├── .gitignore ├── src │ ├── Http.js │ ├── LoggedIn.js │ └── App.js └── .flowconfig ├── .gitignore ├── server ├── .gitignore ├── config-example.js ├── package.json └── server.js ├── README.md └── npm-debug.log /client/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .tern-project 2 | node_modules 3 | .tern-port 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /client/genymotion/hosts: -------------------------------------------------------------------------------- 1 | 192.168.56.1 localhost 2 | 10.0.3.2 localhost -------------------------------------------------------------------------------- /server/.gitignore: -------------------------------------------------------------------------------- 1 | .tern-project 2 | node_modules 3 | .tern-port 4 | .DS_Store 5 | config.js -------------------------------------------------------------------------------- /client/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "react-native/packager/react-packager/.babelrc" 3 | } 4 | -------------------------------------------------------------------------------- /client/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | oAuth 3 | 4 | -------------------------------------------------------------------------------- /client/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartonhammond/reactnative-oauth-hapi/HEAD/client/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /client/ios/RNCookieManagerIOS/RNCookieManagerIOS.h: -------------------------------------------------------------------------------- 1 | // RNCookieManagerIOS.h 2 | #import "RCTBridgeModule.h" 3 | 4 | @interface RNCookieManagerIOS : NSObject 5 | 6 | @end -------------------------------------------------------------------------------- /client/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartonhammond/reactnative-oauth-hapi/HEAD/client/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /client/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartonhammond/reactnative-oauth-hapi/HEAD/client/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /client/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartonhammond/reactnative-oauth-hapi/HEAD/client/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /client/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bartonhammond/reactnative-oauth-hapi/HEAD/client/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /server/config-example.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | github: { 3 | clientId: 'Add your clientId from https://github.com/settings/developers', 4 | clientSecret: 'Add your clientSecret from https://github.com/settings/developers' 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /client/index.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React from 'react-native'; 4 | import ReactNativeLogin from './src/App'; 5 | 6 | var { 7 | AppRegistry 8 | } = React; 9 | 10 | AppRegistry.registerComponent('oAuth', () => ReactNativeLogin); 11 | -------------------------------------------------------------------------------- /client/index.android.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React from 'react-native'; 4 | import ReactNativeLogin from './src/App'; 5 | 6 | var { 7 | AppRegistry 8 | } = React; 9 | 10 | AppRegistry.registerComponent('oAuth', () => ReactNativeLogin); 11 | -------------------------------------------------------------------------------- /client/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'oAuth' 2 | 3 | include ':app' 4 | include ':react-native-cookies' 5 | project(':react-native-cookies').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cookies/android') 6 | 7 | -------------------------------------------------------------------------------- /client/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /client/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "oAuth", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-native start" 7 | }, 8 | "dependencies": { 9 | "cookie": "^0.2.3", 10 | "react-native": "^0.18.1", 11 | "react-native-button": "^1.3.1", 12 | "react-native-cookies": "https://github.com/Psykar/react-native-cookies/tarball/master", 13 | "regenerator": "^0.8.42", 14 | "underscore": "^1.8.3", 15 | "url-parse": "^1.0.5" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | .idea 28 | .gradle 29 | local.properties 30 | 31 | # node.js 32 | # 33 | node_modules/ 34 | npm-debug.log 35 | -------------------------------------------------------------------------------- /client/ios/oAuth/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /client/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /client/genymotion/README.md: -------------------------------------------------------------------------------- 1 | * see 2 | [http://blog.emaillenin.com/2015/01/editing-etchosts-file-in-genymotion-emulator.html](http://blog.emaillenin.com/2015/01/editing-etchosts-file-in-genymotion-emulator.html) 3 | 4 | ``` 5 | ./adb root 6 | 7 | ./adb remount 8 | 9 | ./adb push /tmp/hosts /system/etc/ 10 | 11 | ./adb push /tmp/hosts /etc/ 12 | ``` 13 | 14 | 15 | 16 | 17 | * after pushing the hosts file, just reload 18 | ``` 19 | react-native run-android 20 | ``` 21 | 22 | * for ios 23 | 24 | ``` 25 | open . 26 | select ios/oAuth.xcodeproj 27 | within XCode - Run 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /client/ios/oAuth/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hapi-oauth", 3 | "version": "0.0.1", 4 | "description": "hapi-oauth", 5 | "author": { 6 | "name": "barton hammond" 7 | }, 8 | "engines": { 9 | "node": ">= 4.2.3", 10 | "npm": ">= 2.14.7" 11 | }, 12 | "scripts": { 13 | "test": "echo \"Error: no test specified\" && exit 1", 14 | "debug": "node-debug --preload false --nodejs --harmony server.js", 15 | "start": "node server.js" 16 | }, 17 | "dependencies": { 18 | "bell": "^6.1.0", 19 | "hapi": "^12.1.0", 20 | "hapi-auth-cookie": "^5.0.0" 21 | }, 22 | "devDependencies": {}, 23 | "bundleDependencies": [], 24 | "private": true, 25 | "main": "server.js" 26 | } 27 | -------------------------------------------------------------------------------- /client/ios/oAuth/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /client/ios/oAuthTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /client/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /client/src/Http.js: -------------------------------------------------------------------------------- 1 | /** 2 | * # Http 3 | * 4 | * 5 | */ 6 | 'use string'; 7 | 8 | require('regenerator/runtime'); 9 | import _ from 'underscore'; 10 | 11 | class Http{ 12 | constructor() { 13 | this.API_BASE_URL= 'http://localhost:5000'; 14 | } 15 | 16 | 17 | async logout() { 18 | return await this._fetch({ 19 | method: 'GET', 20 | url: '/logout' 21 | }) 22 | .then((response) => { 23 | if ((response.status === 200 || response.status === 201)) { 24 | return true; 25 | } else { 26 | throw(false); 27 | } 28 | }) 29 | .catch((error) => { 30 | throw(error); 31 | }); 32 | } 33 | async _fetch(opts) { 34 | opts = _.extend({ 35 | method: 'GET', 36 | url: null 37 | }, opts); 38 | 39 | let reqOpts = {}; 40 | reqOpts.method= opts.method; 41 | return await fetch(this.API_BASE_URL + opts.url, reqOpts); 42 | } 43 | }; 44 | 45 | module.exports = Http; 46 | -------------------------------------------------------------------------------- /client/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /client/android/app/src/main/java/com/oauth/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.oauth; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactPackage; 5 | import com.facebook.react.shell.MainReactPackage; 6 | //add 7 | import com.psykar.cookiemanager.CookieManagerPackage; 8 | 9 | import java.util.Arrays; 10 | import java.util.List; 11 | 12 | public class MainActivity extends ReactActivity { 13 | 14 | /** 15 | * Returns the name of the main component registered from JavaScript. 16 | * This is used to schedule rendering of the component. 17 | */ 18 | @Override 19 | protected String getMainComponentName() { 20 | return "oAuth"; 21 | } 22 | 23 | /** 24 | * Returns whether dev mode should be enabled. 25 | * This enables e.g. the dev menu. 26 | */ 27 | @Override 28 | protected boolean getUseDeveloperSupport() { 29 | return BuildConfig.DEBUG; 30 | } 31 | 32 | /** 33 | * A list of packages used by the app. If the app uses additional views 34 | * or modules besides the default ones, add more packages here. 35 | */ 36 | @Override 37 | protected List getPackages() { 38 | return Arrays.asList( 39 | new MainReactPackage(), 40 | //add 41 | new CookieManagerPackage() 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /client/ios/oAuth/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSAllowsArbitraryLoads 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # oAuth example with ReactNative and Hapi Server 2 | 3 | For a great writeup about the Hapi server implementation see [http://www.sitepoint.com/oauth-integration-using-hapi/](http://www.sitepoint.com/oauth-integration-using-hapi/) 4 | 5 | These instructions assume you've setup ReactNative locally. 6 | 7 | ======= 8 | 9 | 10 | |Platform| Signin | Authorize | Logout 11 | |--------|-----------|-------|---------| 12 | |Android|![Signin](https://cloud.githubusercontent.com/assets/1282364/12727495/f2af0200-c8e2-11e5-8e15-b4a0289a4585.png)|![Auth](https://cloud.githubusercontent.com/assets/1282364/12727496/f2b0fc9a-c8e2-11e5-8413-6bb79c1a73b1.png)|![Logout](https://cloud.githubusercontent.com/assets/1282364/12727497/f2b240dc-c8e2-11e5-8f7c-5df6867d903a.png)| 13 | |iOS|![Signin](https://cloud.githubusercontent.com/assets/1282364/12727710/bc723da0-c8e3-11e5-82ed-95f4c5e13193.png)|![Auth](https://cloud.githubusercontent.com/assets/1282364/12727712/bc779ef8-c8e3-11e5-9473-45a5b6a9f34f.png)|![Logout](https://cloud.githubusercontent.com/assets/1282364/12727711/bc764ee0-c8e3-11e5-869d-15833d50461d.png)| 14 | ## Setup 15 | 16 | ### Client 17 | ``` 18 | cd client 19 | npm install 20 | ``` 21 | #### Android 22 | 23 | * start emulator 24 | * if using genyMotion, read and follow directions of genymotion/README.md 25 | 26 | ``` 27 | react-native run-android 28 | ``` 29 | 30 | #### IOS 31 | ``` 32 | open . 33 | select ios/oAuth.xcodeproj 34 | within XCode -> Run 35 | ``` 36 | 37 | 38 | ### Server 39 | The server is dependent on having a GitHub Application. You will need to join the [Github Developer Program](https://developer.github.com/) and register an application [here](https://github.com/settings/developers) 40 | 41 | 42 | ``` 43 | cd server 44 | npm install 45 | cp config-example.js config.js 46 | edit config.js for GitHub application info 47 | npm start 48 | ``` 49 | -------------------------------------------------------------------------------- /npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 3 | 2 info using npm@2.14.7 4 | 3 info using node@v4.2.3 5 | 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 6 | 5 info prestart snowflake@0.0.9-b 7 | 6 info start snowflake@0.0.9-b 8 | 7 verbose unsafe-perm in lifecycle true 9 | 8 info snowflake@0.0.9-b Failed to exec start script 10 | 9 verbose stack Error: snowflake@0.0.9-b start: `react-native start` 11 | 9 verbose stack Exit status 1 12 | 9 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16) 13 | 9 verbose stack at emitTwo (events.js:87:13) 14 | 9 verbose stack at EventEmitter.emit (events.js:172:7) 15 | 9 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 16 | 9 verbose stack at emitTwo (events.js:87:13) 17 | 9 verbose stack at ChildProcess.emit (events.js:172:7) 18 | 9 verbose stack at maybeClose (internal/child_process.js:818:16) 19 | 9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 20 | 10 verbose pkgid snowflake@0.0.9-b 21 | 11 verbose cwd /Users/barton/projects/stargazers/temp/oAuth 22 | 12 error Darwin 14.5.0 23 | 13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 24 | 14 error node v4.2.3 25 | 15 error npm v2.14.7 26 | 16 error code ELIFECYCLE 27 | 17 error snowflake@0.0.9-b start: `react-native start` 28 | 17 error Exit status 1 29 | 18 error Failed at the snowflake@0.0.9-b start script 'react-native start'. 30 | 18 error This is most likely a problem with the snowflake package, 31 | 18 error not with npm itself. 32 | 18 error Tell the author that this fails on your system: 33 | 18 error react-native start 34 | 18 error You can get their info via: 35 | 18 error npm owner ls snowflake 36 | 18 error There is likely additional logging output above. 37 | 19 verbose exit [ 1, true ] 38 | -------------------------------------------------------------------------------- /client/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.web.js 5 | .*/*.android.js 6 | 7 | # Some modules have their own node_modules with overlap 8 | .*/node_modules/node-haste/.* 9 | 10 | # Ugh 11 | .*/node_modules/babel.* 12 | .*/node_modules/babylon.* 13 | .*/node_modules/invariant.* 14 | 15 | # Ignore react and fbjs where there are overlaps, but don't ignore 16 | # anything that react-native relies on 17 | .*/node_modules/fbjs/lib/Map.js 18 | .*/node_modules/fbjs/lib/Promise.js 19 | .*/node_modules/fbjs/lib/fetch.js 20 | .*/node_modules/fbjs/lib/ExecutionEnvironment.js 21 | .*/node_modules/fbjs/lib/isEmpty.js 22 | .*/node_modules/fbjs/lib/crc32.js 23 | .*/node_modules/fbjs/lib/ErrorUtils.js 24 | 25 | # Flow has a built-in definition for the 'react' module which we prefer to use 26 | # over the currently-untyped source 27 | .*/node_modules/react/react.js 28 | .*/node_modules/react/lib/React.js 29 | .*/node_modules/react/lib/ReactDOM.js 30 | 31 | # Ignore commoner tests 32 | .*/node_modules/commoner/test/.* 33 | 34 | # See https://github.com/facebook/flow/issues/442 35 | .*/react-tools/node_modules/commoner/lib/reader.js 36 | 37 | # Ignore jest 38 | .*/node_modules/jest-cli/.* 39 | 40 | # Ignore Website 41 | .*/website/.* 42 | 43 | [include] 44 | 45 | [libs] 46 | node_modules/react-native/Libraries/react-native/react-native-interface.js 47 | 48 | [options] 49 | module.system=haste 50 | 51 | munge_underscores=true 52 | 53 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 54 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' 55 | 56 | suppress_type=$FlowIssue 57 | suppress_type=$FlowFixMe 58 | suppress_type=$FixMe 59 | 60 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 61 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 62 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 63 | 64 | [version] 65 | 0.20.1 66 | -------------------------------------------------------------------------------- /client/ios/oAuth/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | /** 21 | * Loading JavaScript code - uncomment the one you want. 22 | * 23 | * OPTION 1 24 | * Load from development server. Start the server from the repository root: 25 | * 26 | * $ npm start 27 | * 28 | * To run on device, change `localhost` to the IP address of your computer 29 | * (you can get this by typing `ifconfig` into the terminal and selecting the 30 | * `inet` value under `en0:`) and make sure your computer and iOS device are 31 | * on the same Wi-Fi network. 32 | */ 33 | 34 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; 35 | 36 | /** 37 | * OPTION 2 38 | * Load from pre-bundled file on disk. The static bundle is automatically 39 | * generated by "Bundle React Native code and images" build step. 40 | */ 41 | 42 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 43 | 44 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 45 | moduleName:@"oAuth" 46 | initialProperties:nil 47 | launchOptions:launchOptions]; 48 | 49 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 50 | UIViewController *rootViewController = [UIViewController new]; 51 | rootViewController.view = rootView; 52 | self.window.rootViewController = rootViewController; 53 | [self.window makeKeyAndVisible]; 54 | return YES; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /client/ios/oAuthTests/oAuthTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 240 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface oAuthTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation oAuthTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /client/src/LoggedIn.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React, {Platform, StyleSheet, Text, View, Component} from 'react-native'; 4 | import Button from 'react-native-button'; 5 | import Cookie from 'cookie'; 6 | import CookieManager from 'react-native-cookies'; 7 | import ReactNativeLogin from './App'; 8 | import HttpRequest from './Http'; 9 | 10 | require('regenerator/runtime'); 11 | 12 | var styles = StyleSheet.create({ 13 | container: { 14 | flex: 1, 15 | justifyContent: 'center', 16 | alignItems: 'center', 17 | backgroundColor: '#F5FCFF' 18 | }, 19 | welcome: { 20 | textAlign: 'center', 21 | color: '#333333', 22 | marginBottom: 5 23 | }, 24 | }); 25 | 26 | 27 | export default class LoggedIn extends Component { 28 | constructor(props) { 29 | super(props); 30 | this.state = { 31 | loggedIn: true 32 | }; 33 | } 34 | 35 | async logout () { 36 | let loggedOut = await (new HttpRequest()).logout(); 37 | if (loggedOut) { 38 | CookieManager.clearAll(() => { 39 | this.setState({ 40 | loggedIn: false, 41 | userName: '' 42 | }); 43 | }); 44 | }//loggedout 45 | } 46 | 47 | render () { 48 | if (Platform.OS === 'ios') { 49 | CookieManager.getAll((cookie) => { 50 | if (cookie.dotcom_user && cookie.dotcom_user.value) { 51 | this.setState({ 52 | userName: cookie.dotcom_user.value, 53 | token: cookie.user_session.value 54 | }); 55 | } 56 | }); 57 | } else { 58 | CookieManager.get('https://github.com', (res) => { 59 | if (res) { 60 | let cookie = Cookie.parse(res); 61 | if (cookie.dotcom_user && cookie.user_session) { 62 | if (this.state.userName !== cookie.dotcom_user) { 63 | this.setState({ 64 | userName: cookie.dotcom_user, 65 | token: cookie.user_session 66 | }); 67 | } 68 | } 69 | } 70 | }); 71 | } 72 | if (this.state.loggedIn) { 73 | return ( 74 | 75 | 76 | {this.state.userName}, You are authenticated! 77 | 78 | 79 | Token: {this.state.token} 80 | 81 | 82 | 83 | 84 | ); 85 | } 86 | else { 87 | return ( 88 | 89 | ); 90 | } 91 | 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /client/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | 30 | # Do not strip any method/class that is annotated with @DoNotStrip 31 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 32 | -keepclassmembers class * { 33 | @com.facebook.proguard.annotations.DoNotStrip *; 34 | } 35 | 36 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 37 | void set*(***); 38 | *** get*(); 39 | } 40 | 41 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 42 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 43 | -keepclassmembers,includedescriptorclasses class * { native ; } 44 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 45 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } 46 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } 47 | 48 | -dontwarn com.facebook.react.** 49 | 50 | # okhttp 51 | 52 | -keepattributes Signature 53 | -keepattributes *Annotation* 54 | -keep class com.squareup.okhttp.** { *; } 55 | -keep interface com.squareup.okhttp.** { *; } 56 | -dontwarn com.squareup.okhttp.** 57 | 58 | # okio 59 | 60 | -keep class sun.misc.Unsafe { *; } 61 | -dontwarn java.nio.file.* 62 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 63 | -dontwarn okio.** 64 | 65 | # stetho 66 | 67 | -dontwarn com.facebook.stetho.** 68 | -------------------------------------------------------------------------------- /client/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | var Hapi = require('hapi'); 2 | var Bell = require('bell'); 3 | var AuthCookie = require('hapi-auth-cookie'); 4 | var CONFIG = require('./config'); 5 | 6 | var server = new Hapi.Server(); 7 | server.connection({ 8 | port: 5000, 9 | routes: { 10 | cors: true 11 | } 12 | }); 13 | 14 | server.register([Bell, AuthCookie], function (err) { 15 | 16 | if (err) { 17 | console.error(err); 18 | return process.exit(1); 19 | } 20 | 21 | var authCookieOptions = { 22 | password: 'cookie-encryption-password', //Password used for encryption 23 | cookie: 'sitepoint-auth', // Name of cookie to set 24 | isSecure: false 25 | }; 26 | 27 | server.auth.strategy('site-point-cookie', 'cookie', authCookieOptions); 28 | 29 | var bellAuthOptions = { 30 | provider: 'github', 31 | password: 'github-encryption-password', //Password used for encryption 32 | clientId: CONFIG.github.clientId, 33 | clientSecret: CONFIG.github.clientSecret, 34 | isSecure: false //true for https 35 | 36 | }; 37 | 38 | server.auth.strategy('github-oauth', 'bell', bellAuthOptions); 39 | 40 | server.auth.default('site-point-cookie'); 41 | 42 | server.route([ 43 | { 44 | method: 'GET', 45 | path: '/', 46 | config: { 47 | auth: { 48 | mode: 'optional' 49 | }, 50 | handler: function (request, reply) { 51 | if (request.auth.isAuthenticated) { 52 | return reply('welcome back ' + 53 | request.auth.credentials.profile.displayName); 54 | } 55 | return reply('hello stranger!'); 56 | } 57 | } 58 | }, { 59 | method: 'GET', 60 | path: '/account', 61 | config: { 62 | handler: function (request, reply) { 63 | return reply(request.auth.credentials.profile); 64 | } 65 | } 66 | }, { 67 | method: ['GET','POST'], 68 | path: '/login', 69 | config: { 70 | auth: 'github-oauth', 71 | handler: function (request, reply) { 72 | 73 | if (request.auth.isAuthenticated) { 74 | request.cookieAuth.set(request.auth.credentials); 75 | return reply('Hello ' + request.auth.credentials.profile.displayName); 76 | } 77 | return reply('Not logged in...').code(401); 78 | } 79 | } 80 | }, { 81 | method: 'GET', 82 | path: '/logout', 83 | config: { 84 | auth: false, 85 | handler: function (request, reply) { 86 | request.cookieAuth.clear(); 87 | return reply.redirect('/'); 88 | } 89 | } 90 | } 91 | ]); 92 | 93 | server.start(function (err) { 94 | 95 | if (err) { 96 | console.error(err); 97 | return process.exit(1); 98 | } 99 | 100 | console.log('Server started at %s', server.info.uri); 101 | }); 102 | 103 | 104 | }); 105 | 106 | 107 | -------------------------------------------------------------------------------- /client/ios/RNCookieManagerIOS/RNCookieManagerIOS.m: -------------------------------------------------------------------------------- 1 | #import "RNCookieManagerIOS.h" 2 | #import "RCTConvert.h" 3 | 4 | @implementation RNCookieManagerIOS 5 | 6 | RCT_EXPORT_MODULE() 7 | 8 | RCT_EXPORT_METHOD(set:(NSDictionary *)props callback:(RCTResponseSenderBlock)callback) { 9 | NSString *name = [RCTConvert NSString:props[@"name"]]; 10 | NSString *value = [RCTConvert NSString:props[@"value"]]; 11 | NSString *domain = [RCTConvert NSString:props[@"domain"]]; 12 | NSString *origin = [RCTConvert NSString:props[@"origin"]]; 13 | NSString *path = [RCTConvert NSString:props[@"path"]]; 14 | NSString *version = [RCTConvert NSString:props[@"version"]]; 15 | NSDate *expiration = [RCTConvert NSDate:props[@"expiration"]]; 16 | 17 | NSMutableDictionary *cookieProperties = [NSMutableDictionary dictionary]; 18 | [cookieProperties setObject:name forKey:NSHTTPCookieName]; 19 | [cookieProperties setObject:value forKey:NSHTTPCookieValue]; 20 | [cookieProperties setObject:domain forKey:NSHTTPCookieDomain]; 21 | [cookieProperties setObject:origin forKey:NSHTTPCookieOriginURL]; 22 | [cookieProperties setObject:path forKey:NSHTTPCookiePath]; 23 | [cookieProperties setObject:version forKey:NSHTTPCookieVersion]; 24 | [cookieProperties setObject:expiration forKey:NSHTTPCookieExpires]; 25 | 26 | NSLog(@"SETTING COOKIE"); 27 | NSLog(@"%@", cookieProperties); 28 | 29 | NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieProperties]; 30 | [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookie:cookie]; 31 | 32 | callback(@[[NSNull null], @"success"]); 33 | } 34 | 35 | RCT_EXPORT_METHOD(setFromHeader:(NSURL *)url value:(NSDictionary *)value callback:(RCTResponseSenderBlock)callback) { 36 | NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:value forURL:url]; 37 | [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:cookies forURL:url mainDocumentURL:NULL]; 38 | callback(@[[NSNull null], @"success"]); 39 | } 40 | 41 | 42 | RCT_EXPORT_METHOD(getCookieHeader:(NSURL *)url callback:(RCTResponseSenderBlock)callback) { 43 | NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:url]; 44 | NSDictionary *headers = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies]; 45 | callback(@[headers[@"Cookie"], @"success"]); 46 | } 47 | 48 | RCT_EXPORT_METHOD(clearAll:(RCTResponseSenderBlock)callback) { 49 | NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 50 | for (NSHTTPCookie *c in cookieStorage.cookies) { 51 | [cookieStorage deleteCookie:c]; 52 | } 53 | callback(@[[NSNull null], @"success"]); 54 | } 55 | 56 | // TODO: return a better formatted list of cookies per domain 57 | RCT_EXPORT_METHOD(getAll:(RCTResponseSenderBlock)callback) { 58 | NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 59 | NSMutableDictionary *cookies = [NSMutableDictionary dictionary]; 60 | for (NSHTTPCookie *c in cookieStorage.cookies) { 61 | NSMutableDictionary *d = [NSMutableDictionary dictionary]; 62 | [d setObject:c.value forKey:@"value"]; 63 | [d setObject:c.name forKey:@"name"]; 64 | [d setObject:c.domain forKey:@"domain"]; 65 | [d setObject:c.path forKey:@"path"]; 66 | [cookies setObject:d forKey:c.name]; 67 | } 68 | callback(@[cookies, @"success"]); 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /client/src/App.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React, { 4 | Platform, 5 | StyleSheet, 6 | View, 7 | WebView, 8 | Component} from 9 | 'react-native'; 10 | 11 | import _ from 'underscore'; 12 | import Cookie from 'cookie'; 13 | import CookieManager from 'react-native-cookies'; 14 | import URL from 'url-parse'; 15 | 16 | import LoggedIn from './LoggedIn'; 17 | 18 | const LOGIN_URL = "http://localhost:5000/login"; 19 | 20 | var styles = StyleSheet.create({ 21 | container: { 22 | flex: 1, 23 | backgroundColor: '#F5FCFF' 24 | } 25 | }); 26 | 27 | export default class ReactNativeLogin extends Component { 28 | constructor(props) { 29 | super(props); 30 | 31 | this.state = { 32 | loggedIn: false, 33 | url: LOGIN_URL 34 | }; 35 | } 36 | /** 37 | * @returns Promise w/ true/false 38 | */ 39 | async _isAuthenticated() { 40 | return new Promise((resolve, reject) => { 41 | if (Platform.OS === 'ios') { 42 | return CookieManager.getAll((cookie) => { 43 | if (cookie && cookie.logged_in && cookie.logged_in.value === 44 | 'yes') { 45 | return resolve(true); 46 | } 47 | return resolve(false); 48 | }); 49 | } else { //android 50 | return CookieManager.get('https://github.com', (res) => { 51 | if (res) { 52 | let cookie = Cookie.parse(res); 53 | if (cookie.logged_in === 'yes') { 54 | return resolve(true); 55 | } 56 | } 57 | return resolve(false); 58 | }); 59 | } 60 | return reject(); 61 | }); 62 | } 63 | 64 | onNavigationStateChange (navState) { 65 | let self = this; 66 | if (!navState.loading) { 67 | const url = new URL(navState.url); 68 | if (url 69 | && url.hostname === 'localhost' 70 | && url.pathname === '/login') { 71 | self._isAuthenticated() 72 | .then((res) => { 73 | self.setState({ 74 | loggedIn: res 75 | }); 76 | }) 77 | .catch(() => { 78 | self.setState({ 79 | loggedIn: false 80 | }); 81 | }); 82 | } 83 | //back to home page? 84 | if (url 85 | && url.hostname === 'localhost' 86 | && url.pathname === '/') { 87 | self.setState({ 88 | loggedIn: false, 89 | url: LOGIN_URL 90 | }); 91 | } 92 | } 93 | } 94 | 95 | 96 | render () { 97 | 98 | if (this.state.loggedIn) { 99 | return ( 100 | 101 | ); 102 | } else { 103 | return ( 104 | 105 | 116 | 117 | ); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /client/ios/oAuth/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /client/android/app/react.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.taskdefs.condition.Os 2 | 3 | def config = project.hasProperty("react") ? project.react : []; 4 | 5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" 6 | def entryFile = config.entryFile ?: "index.android.js" 7 | 8 | // because elvis operator 9 | def elvisFile(thing) { 10 | return thing ? file(thing) : null; 11 | } 12 | 13 | def reactRoot = elvisFile(config.root) ?: file("../../") 14 | def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: 15 | file("$buildDir/intermediates/assets/debug") 16 | def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: 17 | file("$buildDir/intermediates/assets/release") 18 | def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: 19 | file("$buildDir/intermediates/res/merged/debug") 20 | def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: 21 | file("$buildDir/intermediates/res/merged/release") 22 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] 23 | 24 | def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") 25 | def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") 26 | 27 | task bundleDebugJsAndAssets(type: Exec) { 28 | // create dirs if they are not there (e.g. the "clean" task just ran) 29 | doFirst { 30 | jsBundleDirDebug.mkdirs() 31 | resourcesDirDebug.mkdirs() 32 | } 33 | 34 | // set up inputs and outputs so gradle can cache the result 35 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 36 | outputs.dir jsBundleDirDebug 37 | outputs.dir resourcesDirDebug 38 | 39 | // set up the call to the react-native cli 40 | workingDir reactRoot 41 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 42 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 43 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 44 | } else { 45 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", 46 | entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug 47 | } 48 | 49 | enabled config.bundleInDebug ?: false 50 | } 51 | 52 | task bundleReleaseJsAndAssets(type: Exec) { 53 | // create dirs if they are not there (e.g. the "clean" task just ran) 54 | doFirst { 55 | jsBundleDirRelease.mkdirs() 56 | resourcesDirRelease.mkdirs() 57 | } 58 | 59 | // set up inputs and outputs so gradle can cache the result 60 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 61 | outputs.dir jsBundleDirRelease 62 | outputs.dir resourcesDirRelease 63 | 64 | // set up the call to the react-native cli 65 | workingDir reactRoot 66 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 67 | commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 68 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 69 | } else { 70 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", 71 | entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease 72 | } 73 | 74 | enabled config.bundleInRelease ?: true 75 | } 76 | 77 | void runBefore(String dependentTaskName, Task task) { 78 | Task dependentTask = tasks.findByPath(dependentTaskName); 79 | if (dependentTask != null) { 80 | dependentTask.dependsOn task 81 | } 82 | } 83 | 84 | gradle.projectsEvaluated { 85 | 86 | // hook bundleDebugJsAndAssets into the android build process 87 | 88 | bundleDebugJsAndAssets.dependsOn mergeDebugResources 89 | bundleDebugJsAndAssets.dependsOn mergeDebugAssets 90 | 91 | runBefore('processArmeabi-v7aDebugResources', bundleDebugJsAndAssets) 92 | runBefore('processX86DebugResources', bundleDebugJsAndAssets) 93 | runBefore('processUniversalDebugResources', bundleDebugJsAndAssets) 94 | runBefore('processDebugResources', bundleDebugJsAndAssets) 95 | 96 | // hook bundleReleaseJsAndAssets into the android build process 97 | 98 | bundleReleaseJsAndAssets.dependsOn mergeReleaseResources 99 | bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets 100 | 101 | runBefore('processArmeabi-v7aReleaseResources', bundleReleaseJsAndAssets) 102 | runBefore('processX86ReleaseResources', bundleReleaseJsAndAssets) 103 | runBefore('processUniversalReleaseResources', bundleReleaseJsAndAssets) 104 | runBefore('processReleaseResources', bundleReleaseJsAndAssets) 105 | 106 | } 107 | -------------------------------------------------------------------------------- /client/ios/oAuth.xcodeproj/xcshareddata/xcschemes/oAuth.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /client/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. 7 | * These basically call `react-native bundle` with the correct arguments during the Android build 8 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 9 | * bundle directly from the development server. Below you can see all the possible configurations 10 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 11 | * `apply from: "react.gradle"` line. 12 | * 13 | * project.ext.react = [ 14 | * // the name of the generated asset file containing your JS bundle 15 | * bundleAssetName: "index.android.bundle", 16 | * 17 | * // the entry file for bundle generation 18 | * entryFile: "index.android.js", 19 | * 20 | * // whether to bundle JS and assets in debug mode 21 | * bundleInDebug: false, 22 | * 23 | * // whether to bundle JS and assets in release mode 24 | * bundleInRelease: true, 25 | * 26 | * // the root of your project, i.e. where "package.json" lives 27 | * root: "../../", 28 | * 29 | * // where to put the JS bundle asset in debug mode 30 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 31 | * 32 | * // where to put the JS bundle asset in release mode 33 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 34 | * 35 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 36 | * // require('./image.png')), in debug mode 37 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 38 | * 39 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 40 | * // require('./image.png')), in release mode 41 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 42 | * 43 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 44 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 45 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 46 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 47 | * // for example, you might want to remove it from here. 48 | * inputExcludes: ["android/**", "ios/**"] 49 | * ] 50 | */ 51 | 52 | apply from: "react.gradle" 53 | 54 | /** 55 | * Set this to true to create three separate APKs instead of one: 56 | * - A universal APK that works on all devices 57 | * - An APK that only works on ARM devices 58 | * - An APK that only works on x86 devices 59 | * The advantage is the size of the APK is reduced by about 4MB. 60 | * Upload all the APKs to the Play Store and people will download 61 | * the correct one based on the CPU architecture of their device. 62 | */ 63 | def enableSeparateBuildPerCPUArchitecture = false 64 | 65 | /** 66 | * Run Proguard to shrink the Java bytecode in release builds. 67 | */ 68 | def enableProguardInReleaseBuilds = false 69 | 70 | android { 71 | compileSdkVersion 23 72 | buildToolsVersion "23.0.1" 73 | 74 | defaultConfig { 75 | applicationId "com.oauth" 76 | minSdkVersion 16 77 | targetSdkVersion 22 78 | versionCode 1 79 | versionName "1.0" 80 | ndk { 81 | abiFilters "armeabi-v7a", "x86" 82 | } 83 | } 84 | splits { 85 | abi { 86 | enable enableSeparateBuildPerCPUArchitecture 87 | universalApk true 88 | reset() 89 | include "armeabi-v7a", "x86" 90 | } 91 | } 92 | buildTypes { 93 | release { 94 | minifyEnabled enableProguardInReleaseBuilds 95 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 96 | } 97 | } 98 | // applicationVariants are e.g. debug, release 99 | applicationVariants.all { variant -> 100 | variant.outputs.each { output -> 101 | // For each separate APK per architecture, set a unique version code as described here: 102 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 103 | def versionCodes = ["armeabi-v7a":1, "x86":2] 104 | def abi = output.getFilter(OutputFile.ABI) 105 | if (abi != null) { // null for the universal-debug, universal-release variants 106 | output.versionCodeOverride = 107 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 108 | } 109 | } 110 | } 111 | } 112 | 113 | dependencies { 114 | compile project(':react-native-cookies') 115 | compile fileTree(dir: "libs", include: ["*.jar"]) 116 | compile "com.android.support:appcompat-v7:23.0.1" 117 | compile "com.facebook.react:react-native:0.18.+" 118 | } 119 | -------------------------------------------------------------------------------- /client/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /client/ios/oAuth.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* oAuthTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* oAuthTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 366CE5FB1C566FAC005954CC /* RNCookieManagerIOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 366CE5FA1C566FAC005954CC /* RNCookieManagerIOS.m */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 34 | remoteInfo = RCTActionSheet; 35 | }; 36 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 39 | proxyType = 2; 40 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 41 | remoteInfo = RCTGeolocation; 42 | }; 43 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 48 | remoteInfo = RCTImage; 49 | }; 50 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 55 | remoteInfo = RCTNetwork; 56 | }; 57 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 62 | remoteInfo = RCTVibration; 63 | }; 64 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 67 | proxyType = 1; 68 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 69 | remoteInfo = oAuth; 70 | }; 71 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 74 | proxyType = 2; 75 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 76 | remoteInfo = RCTSettings; 77 | }; 78 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 79 | isa = PBXContainerItemProxy; 80 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 81 | proxyType = 2; 82 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 83 | remoteInfo = RCTWebSocket; 84 | }; 85 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 86 | isa = PBXContainerItemProxy; 87 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 88 | proxyType = 2; 89 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 90 | remoteInfo = React; 91 | }; 92 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 95 | proxyType = 2; 96 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 97 | remoteInfo = RCTLinking; 98 | }; 99 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 102 | proxyType = 2; 103 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 104 | remoteInfo = RCTText; 105 | }; 106 | /* End PBXContainerItemProxy section */ 107 | 108 | /* Begin PBXFileReference section */ 109 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 110 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 111 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 112 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 113 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 114 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 115 | 00E356EE1AD99517003FC87E /* oAuthTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = oAuthTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 116 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 117 | 00E356F21AD99517003FC87E /* oAuthTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = oAuthTests.m; sourceTree = ""; }; 118 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 119 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 120 | 13B07F961A680F5B00A75B9A /* oAuth.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = oAuth.app; sourceTree = BUILT_PRODUCTS_DIR; }; 121 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = oAuth/AppDelegate.h; sourceTree = ""; }; 122 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = oAuth/AppDelegate.m; sourceTree = ""; }; 123 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 124 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = oAuth/Images.xcassets; sourceTree = ""; }; 125 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = oAuth/Info.plist; sourceTree = ""; }; 126 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = oAuth/main.m; sourceTree = ""; }; 127 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 128 | 366CE5F91C566FAC005954CC /* RNCookieManagerIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNCookieManagerIOS.h; sourceTree = ""; }; 129 | 366CE5FA1C566FAC005954CC /* RNCookieManagerIOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNCookieManagerIOS.m; sourceTree = ""; }; 130 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 131 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 132 | /* End PBXFileReference section */ 133 | 134 | /* Begin PBXFrameworksBuildPhase section */ 135 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 136 | isa = PBXFrameworksBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 143 | isa = PBXFrameworksBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 147 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 148 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 149 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 150 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 151 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 152 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 153 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 154 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 155 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXFrameworksBuildPhase section */ 160 | 161 | /* Begin PBXGroup section */ 162 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 166 | ); 167 | name = Products; 168 | sourceTree = ""; 169 | }; 170 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 174 | ); 175 | name = Products; 176 | sourceTree = ""; 177 | }; 178 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 182 | ); 183 | name = Products; 184 | sourceTree = ""; 185 | }; 186 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 190 | ); 191 | name = Products; 192 | sourceTree = ""; 193 | }; 194 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 198 | ); 199 | name = Products; 200 | sourceTree = ""; 201 | }; 202 | 00E356EF1AD99517003FC87E /* oAuthTests */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 00E356F21AD99517003FC87E /* oAuthTests.m */, 206 | 00E356F01AD99517003FC87E /* Supporting Files */, 207 | ); 208 | path = oAuthTests; 209 | sourceTree = ""; 210 | }; 211 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 00E356F11AD99517003FC87E /* Info.plist */, 215 | ); 216 | name = "Supporting Files"; 217 | sourceTree = ""; 218 | }; 219 | 139105B71AF99BAD00B5F7CC /* Products */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 223 | ); 224 | name = Products; 225 | sourceTree = ""; 226 | }; 227 | 139FDEE71B06529A00C62182 /* Products */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 231 | ); 232 | name = Products; 233 | sourceTree = ""; 234 | }; 235 | 13B07FAE1A68108700A75B9A /* oAuth */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 239 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 240 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 241 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 242 | 13B07FB61A68108700A75B9A /* Info.plist */, 243 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 244 | 13B07FB71A68108700A75B9A /* main.m */, 245 | ); 246 | name = oAuth; 247 | sourceTree = ""; 248 | }; 249 | 146834001AC3E56700842450 /* Products */ = { 250 | isa = PBXGroup; 251 | children = ( 252 | 146834041AC3E56700842450 /* libReact.a */, 253 | ); 254 | name = Products; 255 | sourceTree = ""; 256 | }; 257 | 366CE5F81C566FAC005954CC /* RNCookieManagerIOS */ = { 258 | isa = PBXGroup; 259 | children = ( 260 | 366CE5F91C566FAC005954CC /* RNCookieManagerIOS.h */, 261 | 366CE5FA1C566FAC005954CC /* RNCookieManagerIOS.m */, 262 | ); 263 | path = RNCookieManagerIOS; 264 | sourceTree = ""; 265 | }; 266 | 78C398B11ACF4ADC00677621 /* Products */ = { 267 | isa = PBXGroup; 268 | children = ( 269 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 270 | ); 271 | name = Products; 272 | sourceTree = ""; 273 | }; 274 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 275 | isa = PBXGroup; 276 | children = ( 277 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 278 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 279 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 280 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 281 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 282 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 283 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 284 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 285 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 286 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 287 | ); 288 | name = Libraries; 289 | sourceTree = ""; 290 | }; 291 | 832341B11AAA6A8300B99B32 /* Products */ = { 292 | isa = PBXGroup; 293 | children = ( 294 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 295 | ); 296 | name = Products; 297 | sourceTree = ""; 298 | }; 299 | 83CBB9F61A601CBA00E9B192 = { 300 | isa = PBXGroup; 301 | children = ( 302 | 366CE5F81C566FAC005954CC /* RNCookieManagerIOS */, 303 | 13B07FAE1A68108700A75B9A /* oAuth */, 304 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 305 | 00E356EF1AD99517003FC87E /* oAuthTests */, 306 | 83CBBA001A601CBA00E9B192 /* Products */, 307 | ); 308 | indentWidth = 2; 309 | sourceTree = ""; 310 | tabWidth = 2; 311 | }; 312 | 83CBBA001A601CBA00E9B192 /* Products */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | 13B07F961A680F5B00A75B9A /* oAuth.app */, 316 | 00E356EE1AD99517003FC87E /* oAuthTests.xctest */, 317 | ); 318 | name = Products; 319 | sourceTree = ""; 320 | }; 321 | /* End PBXGroup section */ 322 | 323 | /* Begin PBXNativeTarget section */ 324 | 00E356ED1AD99517003FC87E /* oAuthTests */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "oAuthTests" */; 327 | buildPhases = ( 328 | 00E356EA1AD99517003FC87E /* Sources */, 329 | 00E356EB1AD99517003FC87E /* Frameworks */, 330 | 00E356EC1AD99517003FC87E /* Resources */, 331 | ); 332 | buildRules = ( 333 | ); 334 | dependencies = ( 335 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 336 | ); 337 | name = oAuthTests; 338 | productName = oAuthTests; 339 | productReference = 00E356EE1AD99517003FC87E /* oAuthTests.xctest */; 340 | productType = "com.apple.product-type.bundle.unit-test"; 341 | }; 342 | 13B07F861A680F5B00A75B9A /* oAuth */ = { 343 | isa = PBXNativeTarget; 344 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "oAuth" */; 345 | buildPhases = ( 346 | 13B07F871A680F5B00A75B9A /* Sources */, 347 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 348 | 13B07F8E1A680F5B00A75B9A /* Resources */, 349 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 350 | ); 351 | buildRules = ( 352 | ); 353 | dependencies = ( 354 | ); 355 | name = oAuth; 356 | productName = "Hello World"; 357 | productReference = 13B07F961A680F5B00A75B9A /* oAuth.app */; 358 | productType = "com.apple.product-type.application"; 359 | }; 360 | /* End PBXNativeTarget section */ 361 | 362 | /* Begin PBXProject section */ 363 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 364 | isa = PBXProject; 365 | attributes = { 366 | LastUpgradeCheck = 0610; 367 | ORGANIZATIONNAME = Facebook; 368 | TargetAttributes = { 369 | 00E356ED1AD99517003FC87E = { 370 | CreatedOnToolsVersion = 6.2; 371 | TestTargetID = 13B07F861A680F5B00A75B9A; 372 | }; 373 | }; 374 | }; 375 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "oAuth" */; 376 | compatibilityVersion = "Xcode 3.2"; 377 | developmentRegion = English; 378 | hasScannedForEncodings = 0; 379 | knownRegions = ( 380 | en, 381 | Base, 382 | ); 383 | mainGroup = 83CBB9F61A601CBA00E9B192; 384 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 385 | projectDirPath = ""; 386 | projectReferences = ( 387 | { 388 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 389 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 390 | }, 391 | { 392 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 393 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 394 | }, 395 | { 396 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 397 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 398 | }, 399 | { 400 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 401 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 402 | }, 403 | { 404 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 405 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 406 | }, 407 | { 408 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 409 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 410 | }, 411 | { 412 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 413 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 414 | }, 415 | { 416 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 417 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 418 | }, 419 | { 420 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 421 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 422 | }, 423 | { 424 | ProductGroup = 146834001AC3E56700842450 /* Products */; 425 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 426 | }, 427 | ); 428 | projectRoot = ""; 429 | targets = ( 430 | 13B07F861A680F5B00A75B9A /* oAuth */, 431 | 00E356ED1AD99517003FC87E /* oAuthTests */, 432 | ); 433 | }; 434 | /* End PBXProject section */ 435 | 436 | /* Begin PBXReferenceProxy section */ 437 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 438 | isa = PBXReferenceProxy; 439 | fileType = archive.ar; 440 | path = libRCTActionSheet.a; 441 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 442 | sourceTree = BUILT_PRODUCTS_DIR; 443 | }; 444 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 445 | isa = PBXReferenceProxy; 446 | fileType = archive.ar; 447 | path = libRCTGeolocation.a; 448 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 449 | sourceTree = BUILT_PRODUCTS_DIR; 450 | }; 451 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 452 | isa = PBXReferenceProxy; 453 | fileType = archive.ar; 454 | path = libRCTImage.a; 455 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 456 | sourceTree = BUILT_PRODUCTS_DIR; 457 | }; 458 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 459 | isa = PBXReferenceProxy; 460 | fileType = archive.ar; 461 | path = libRCTNetwork.a; 462 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 463 | sourceTree = BUILT_PRODUCTS_DIR; 464 | }; 465 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 466 | isa = PBXReferenceProxy; 467 | fileType = archive.ar; 468 | path = libRCTVibration.a; 469 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 470 | sourceTree = BUILT_PRODUCTS_DIR; 471 | }; 472 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 473 | isa = PBXReferenceProxy; 474 | fileType = archive.ar; 475 | path = libRCTSettings.a; 476 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 477 | sourceTree = BUILT_PRODUCTS_DIR; 478 | }; 479 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 480 | isa = PBXReferenceProxy; 481 | fileType = archive.ar; 482 | path = libRCTWebSocket.a; 483 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 484 | sourceTree = BUILT_PRODUCTS_DIR; 485 | }; 486 | 146834041AC3E56700842450 /* libReact.a */ = { 487 | isa = PBXReferenceProxy; 488 | fileType = archive.ar; 489 | path = libReact.a; 490 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 491 | sourceTree = BUILT_PRODUCTS_DIR; 492 | }; 493 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 494 | isa = PBXReferenceProxy; 495 | fileType = archive.ar; 496 | path = libRCTLinking.a; 497 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 498 | sourceTree = BUILT_PRODUCTS_DIR; 499 | }; 500 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 501 | isa = PBXReferenceProxy; 502 | fileType = archive.ar; 503 | path = libRCTText.a; 504 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 505 | sourceTree = BUILT_PRODUCTS_DIR; 506 | }; 507 | /* End PBXReferenceProxy section */ 508 | 509 | /* Begin PBXResourcesBuildPhase section */ 510 | 00E356EC1AD99517003FC87E /* Resources */ = { 511 | isa = PBXResourcesBuildPhase; 512 | buildActionMask = 2147483647; 513 | files = ( 514 | ); 515 | runOnlyForDeploymentPostprocessing = 0; 516 | }; 517 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 518 | isa = PBXResourcesBuildPhase; 519 | buildActionMask = 2147483647; 520 | files = ( 521 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 522 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 523 | ); 524 | runOnlyForDeploymentPostprocessing = 0; 525 | }; 526 | /* End PBXResourcesBuildPhase section */ 527 | 528 | /* Begin PBXShellScriptBuildPhase section */ 529 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 530 | isa = PBXShellScriptBuildPhase; 531 | buildActionMask = 2147483647; 532 | files = ( 533 | ); 534 | inputPaths = ( 535 | ); 536 | name = "Bundle React Native code and images"; 537 | outputPaths = ( 538 | ); 539 | runOnlyForDeploymentPostprocessing = 0; 540 | shellPath = /bin/sh; 541 | shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; 542 | }; 543 | /* End PBXShellScriptBuildPhase section */ 544 | 545 | /* Begin PBXSourcesBuildPhase section */ 546 | 00E356EA1AD99517003FC87E /* Sources */ = { 547 | isa = PBXSourcesBuildPhase; 548 | buildActionMask = 2147483647; 549 | files = ( 550 | 00E356F31AD99517003FC87E /* oAuthTests.m in Sources */, 551 | ); 552 | runOnlyForDeploymentPostprocessing = 0; 553 | }; 554 | 13B07F871A680F5B00A75B9A /* Sources */ = { 555 | isa = PBXSourcesBuildPhase; 556 | buildActionMask = 2147483647; 557 | files = ( 558 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 559 | 366CE5FB1C566FAC005954CC /* RNCookieManagerIOS.m in Sources */, 560 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 561 | ); 562 | runOnlyForDeploymentPostprocessing = 0; 563 | }; 564 | /* End PBXSourcesBuildPhase section */ 565 | 566 | /* Begin PBXTargetDependency section */ 567 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 568 | isa = PBXTargetDependency; 569 | target = 13B07F861A680F5B00A75B9A /* oAuth */; 570 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 571 | }; 572 | /* End PBXTargetDependency section */ 573 | 574 | /* Begin PBXVariantGroup section */ 575 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 576 | isa = PBXVariantGroup; 577 | children = ( 578 | 13B07FB21A68108700A75B9A /* Base */, 579 | ); 580 | name = LaunchScreen.xib; 581 | path = oAuth; 582 | sourceTree = ""; 583 | }; 584 | /* End PBXVariantGroup section */ 585 | 586 | /* Begin XCBuildConfiguration section */ 587 | 00E356F61AD99517003FC87E /* Debug */ = { 588 | isa = XCBuildConfiguration; 589 | buildSettings = { 590 | BUNDLE_LOADER = "$(TEST_HOST)"; 591 | FRAMEWORK_SEARCH_PATHS = ( 592 | "$(SDKROOT)/Developer/Library/Frameworks", 593 | "$(inherited)", 594 | ); 595 | GCC_PREPROCESSOR_DEFINITIONS = ( 596 | "DEBUG=1", 597 | "$(inherited)", 598 | ); 599 | INFOPLIST_FILE = oAuthTests/Info.plist; 600 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 602 | PRODUCT_NAME = "$(TARGET_NAME)"; 603 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/oAuth.app/oAuth"; 604 | }; 605 | name = Debug; 606 | }; 607 | 00E356F71AD99517003FC87E /* Release */ = { 608 | isa = XCBuildConfiguration; 609 | buildSettings = { 610 | BUNDLE_LOADER = "$(TEST_HOST)"; 611 | COPY_PHASE_STRIP = NO; 612 | FRAMEWORK_SEARCH_PATHS = ( 613 | "$(SDKROOT)/Developer/Library/Frameworks", 614 | "$(inherited)", 615 | ); 616 | INFOPLIST_FILE = oAuthTests/Info.plist; 617 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 618 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 619 | PRODUCT_NAME = "$(TARGET_NAME)"; 620 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/oAuth.app/oAuth"; 621 | }; 622 | name = Release; 623 | }; 624 | 13B07F941A680F5B00A75B9A /* Debug */ = { 625 | isa = XCBuildConfiguration; 626 | buildSettings = { 627 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 628 | DEAD_CODE_STRIPPING = NO; 629 | HEADER_SEARCH_PATHS = ( 630 | "$(inherited)", 631 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 632 | "$(SRCROOT)/../node_modules/react-native/React/**", 633 | ); 634 | INFOPLIST_FILE = oAuth/Info.plist; 635 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 636 | OTHER_LDFLAGS = "-ObjC"; 637 | PRODUCT_NAME = oAuth; 638 | }; 639 | name = Debug; 640 | }; 641 | 13B07F951A680F5B00A75B9A /* Release */ = { 642 | isa = XCBuildConfiguration; 643 | buildSettings = { 644 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 645 | HEADER_SEARCH_PATHS = ( 646 | "$(inherited)", 647 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 648 | "$(SRCROOT)/../node_modules/react-native/React/**", 649 | ); 650 | INFOPLIST_FILE = oAuth/Info.plist; 651 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 652 | OTHER_LDFLAGS = "-ObjC"; 653 | PRODUCT_NAME = oAuth; 654 | }; 655 | name = Release; 656 | }; 657 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | ALWAYS_SEARCH_USER_PATHS = NO; 661 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 662 | CLANG_CXX_LIBRARY = "libc++"; 663 | CLANG_ENABLE_MODULES = YES; 664 | CLANG_ENABLE_OBJC_ARC = YES; 665 | CLANG_WARN_BOOL_CONVERSION = YES; 666 | CLANG_WARN_CONSTANT_CONVERSION = YES; 667 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 668 | CLANG_WARN_EMPTY_BODY = YES; 669 | CLANG_WARN_ENUM_CONVERSION = YES; 670 | CLANG_WARN_INT_CONVERSION = YES; 671 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 672 | CLANG_WARN_UNREACHABLE_CODE = YES; 673 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 674 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 675 | COPY_PHASE_STRIP = NO; 676 | ENABLE_STRICT_OBJC_MSGSEND = YES; 677 | GCC_C_LANGUAGE_STANDARD = gnu99; 678 | GCC_DYNAMIC_NO_PIC = NO; 679 | GCC_OPTIMIZATION_LEVEL = 0; 680 | GCC_PREPROCESSOR_DEFINITIONS = ( 681 | "DEBUG=1", 682 | "$(inherited)", 683 | ); 684 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 685 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 686 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 687 | GCC_WARN_UNDECLARED_SELECTOR = YES; 688 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 689 | GCC_WARN_UNUSED_FUNCTION = YES; 690 | GCC_WARN_UNUSED_VARIABLE = YES; 691 | HEADER_SEARCH_PATHS = ( 692 | "$(inherited)", 693 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 694 | "$(SRCROOT)/../node_modules/react-native/React/**", 695 | ); 696 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 697 | MTL_ENABLE_DEBUG_INFO = YES; 698 | ONLY_ACTIVE_ARCH = YES; 699 | SDKROOT = iphoneos; 700 | }; 701 | name = Debug; 702 | }; 703 | 83CBBA211A601CBA00E9B192 /* Release */ = { 704 | isa = XCBuildConfiguration; 705 | buildSettings = { 706 | ALWAYS_SEARCH_USER_PATHS = NO; 707 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 708 | CLANG_CXX_LIBRARY = "libc++"; 709 | CLANG_ENABLE_MODULES = YES; 710 | CLANG_ENABLE_OBJC_ARC = YES; 711 | CLANG_WARN_BOOL_CONVERSION = YES; 712 | CLANG_WARN_CONSTANT_CONVERSION = YES; 713 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 714 | CLANG_WARN_EMPTY_BODY = YES; 715 | CLANG_WARN_ENUM_CONVERSION = YES; 716 | CLANG_WARN_INT_CONVERSION = YES; 717 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 718 | CLANG_WARN_UNREACHABLE_CODE = YES; 719 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 720 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 721 | COPY_PHASE_STRIP = YES; 722 | ENABLE_NS_ASSERTIONS = NO; 723 | ENABLE_STRICT_OBJC_MSGSEND = YES; 724 | GCC_C_LANGUAGE_STANDARD = gnu99; 725 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 726 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 727 | GCC_WARN_UNDECLARED_SELECTOR = YES; 728 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 729 | GCC_WARN_UNUSED_FUNCTION = YES; 730 | GCC_WARN_UNUSED_VARIABLE = YES; 731 | HEADER_SEARCH_PATHS = ( 732 | "$(inherited)", 733 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 734 | "$(SRCROOT)/../node_modules/react-native/React/**", 735 | ); 736 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 737 | MTL_ENABLE_DEBUG_INFO = NO; 738 | SDKROOT = iphoneos; 739 | VALIDATE_PRODUCT = YES; 740 | }; 741 | name = Release; 742 | }; 743 | /* End XCBuildConfiguration section */ 744 | 745 | /* Begin XCConfigurationList section */ 746 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "oAuthTests" */ = { 747 | isa = XCConfigurationList; 748 | buildConfigurations = ( 749 | 00E356F61AD99517003FC87E /* Debug */, 750 | 00E356F71AD99517003FC87E /* Release */, 751 | ); 752 | defaultConfigurationIsVisible = 0; 753 | defaultConfigurationName = Release; 754 | }; 755 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "oAuth" */ = { 756 | isa = XCConfigurationList; 757 | buildConfigurations = ( 758 | 13B07F941A680F5B00A75B9A /* Debug */, 759 | 13B07F951A680F5B00A75B9A /* Release */, 760 | ); 761 | defaultConfigurationIsVisible = 0; 762 | defaultConfigurationName = Release; 763 | }; 764 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "oAuth" */ = { 765 | isa = XCConfigurationList; 766 | buildConfigurations = ( 767 | 83CBBA201A601CBA00E9B192 /* Debug */, 768 | 83CBBA211A601CBA00E9B192 /* Release */, 769 | ); 770 | defaultConfigurationIsVisible = 0; 771 | defaultConfigurationName = Release; 772 | }; 773 | /* End XCConfigurationList section */ 774 | }; 775 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 776 | } 777 | --------------------------------------------------------------------------------