Permalink
Please sign in to comment.
Browse files
Remove .iml, migrated auth into helpers, add PasswordAuthHelper, clea…
…n-up dependencies
- Loading branch information...
Showing
with
278 additions
and 616 deletions.
- +2 −1 .gitignore
- +0 −19 FirebaseUI-Android.iml
- +0 −127 app/app.iml
- +60 −30 app/src/main/java/com/firebase/uidemo/RecyclerViewDemoActivity.java
- +1 −0 build.gradle
- +3 −0 library/build.gradle
- +0 −118 library/library.iml
- +4 −2 library/src/main/java/com/firebase/ui/FirebaseArray.java
- +0 −66 library/src/main/java/com/firebase/ui/FirebaseLogin.java
- +31 −138 library/src/main/java/com/firebase/ui/FirebaseLoginBaseActivity.java
- +13 −7 library/src/main/java/com/firebase/ui/FirebaseLoginDialog.java
- +17 −16 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/FacebookAuthHelper.java
- +57 −7 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/FirebaseAuthHelper.java
- +13 −11 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/GoogleAuthHelper.java
- +0 −1 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/GoogleTokenTask.java
- +2 −1 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/SocialProvider.java
- +5 −5 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TokenAuthHandler.java
- +13 −16 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TwitterAuthHelper.java
- +0 −2 library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TwitterPromptActivity.java
- +57 −49 library/src/main/res/layout/fragment_firebase_login.xml
3
.gitignore
19
FirebaseUI-Android.iml
@@ -1,19 +0,0 @@ | ||
-<?xml version="1.0" encoding="UTF-8"?> | ||
-<module external.linked.project.id="FirebaseUI-Android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> | ||
- <component name="FacetManager"> | ||
- <facet type="java-gradle" name="Java-Gradle"> | ||
- <configuration> | ||
- <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" /> | ||
- <option name="BUILDABLE" value="false" /> | ||
- </configuration> | ||
- </facet> | ||
- </component> | ||
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true"> | ||
- <exclude-output /> | ||
- <content url="file://$MODULE_DIR$"> | ||
- <excludeFolder url="file://$MODULE_DIR$/.gradle" /> | ||
- </content> | ||
- <orderEntry type="inheritedJdk" /> | ||
- <orderEntry type="sourceFolder" forTests="false" /> | ||
- </component> | ||
-</module> |
127
app/app.iml
@@ -1,127 +0,0 @@ | ||
-<?xml version="1.0" encoding="UTF-8"?> | ||
-<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="FirebaseUI-Android" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> | ||
- <component name="FacetManager"> | ||
- <facet type="android-gradle" name="Android-Gradle"> | ||
- <configuration> | ||
- <option name="GRADLE_PROJECT_PATH" value=":app" /> | ||
- </configuration> | ||
- </facet> | ||
- <facet type="android" name="Android"> | ||
- <configuration> | ||
- <option name="SELECTED_BUILD_VARIANT" value="debug" /> | ||
- <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> | ||
- <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> | ||
- <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> | ||
- <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> | ||
- <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> | ||
- <afterSyncTasks> | ||
- <task>generateDebugAndroidTestSources</task> | ||
- <task>generateDebugSources</task> | ||
- </afterSyncTasks> | ||
- <option name="ALLOW_USER_CONFIGURATION" value="false" /> | ||
- <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> | ||
- <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> | ||
- <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> | ||
- <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | ||
- </configuration> | ||
- </facet> | ||
- </component> | ||
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> | ||
- <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> | ||
- <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" /> | ||
- <exclude-output /> | ||
- <content url="file://$MODULE_DIR$"> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/google-services/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/22.2.1/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.android/facebook-android-sdk/4.6.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-appindexing/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-identity/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/8.1.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | ||
- </content> | ||
- <orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" /> | ||
- <orderEntry type="sourceFolder" forTests="false" /> | ||
- <orderEntry type="library" exported="" name="play-services-measurement-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-appindexing-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-base-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-ads-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="recyclerview-v7-22.2.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-identity-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="firebase-client-jvm-2.3.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-core-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="firebase-client-android-2.3.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-databind-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-basement-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="tubesock-0.0.11" level="project" /> | ||
- <orderEntry type="library" exported="" name="facebook-android-sdk-4.6.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-analytics-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-annotations-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="bolts-android-1.2.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="twitter4j-core-4.0.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-plus-8.1.0" level="project" /> | ||
- <orderEntry type="module" module-name="library" exported="" /> | ||
- </component> | ||
-</module> |
90
app/src/main/java/com/firebase/uidemo/RecyclerViewDemoActivity.java
1
build.gradle
3
library/build.gradle
118
library/library.iml
@@ -1,118 +0,0 @@ | ||
-<?xml version="1.0" encoding="UTF-8"?> | ||
-<module external.linked.project.id=":library" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="FirebaseUI-Android" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> | ||
- <component name="FacetManager"> | ||
- <facet type="android-gradle" name="Android-Gradle"> | ||
- <configuration> | ||
- <option name="GRADLE_PROJECT_PATH" value=":library" /> | ||
- </configuration> | ||
- </facet> | ||
- <facet type="android" name="Android"> | ||
- <configuration> | ||
- <option name="SELECTED_BUILD_VARIANT" value="debug" /> | ||
- <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> | ||
- <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> | ||
- <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> | ||
- <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> | ||
- <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> | ||
- <afterSyncTasks> | ||
- <task>generateDebugAndroidTestSources</task> | ||
- <task>generateDebugSources</task> | ||
- </afterSyncTasks> | ||
- <option name="ALLOW_USER_CONFIGURATION" value="false" /> | ||
- <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> | ||
- <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> | ||
- <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> | ||
- <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | ||
- <option name="LIBRARY_PROJECT" value="true" /> | ||
- </configuration> | ||
- </facet> | ||
- </component> | ||
- <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> | ||
- <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> | ||
- <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" /> | ||
- <exclude-output /> | ||
- <content url="file://$MODULE_DIR$"> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/google-services/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> | ||
- <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/22.2.0/jars" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> | ||
- <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> | ||
- </content> | ||
- <orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" /> | ||
- <orderEntry type="sourceFolder" forTests="false" /> | ||
- <orderEntry type="library" exported="" name="play-services-measurement-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="recyclerview-v7-22.2.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-appindexing-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-base-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-ads-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-identity-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="firebase-client-jvm-2.3.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="firebase-client-android-2.3.1" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-core-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-databind-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-basement-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="tubesock-0.0.11" level="project" /> | ||
- <orderEntry type="library" exported="" name="facebook-android-sdk-4.6.0" level="project" /> | ||
- <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-analytics-8.1.0" level="project" /> | ||
- <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" /> | ||
- <orderEntry type="library" exported="" name="jackson-annotations-2.2.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="bolts-android-1.2.0" level="project" /> | ||
- <orderEntry type="library" exported="" name="twitter4j-core-4.0.2" level="project" /> | ||
- <orderEntry type="library" exported="" name="play-services-plus-8.1.0" level="project" /> | ||
- </component> | ||
-</module> |
6
library/src/main/java/com/firebase/ui/FirebaseArray.java
66
library/src/main/java/com/firebase/ui/FirebaseLogin.java
@@ -1,66 +0,0 @@ | ||
-package com.firebase.ui; | ||
- | ||
- | ||
-import android.os.Bundle; | ||
-import android.app.Fragment; | ||
-import android.view.LayoutInflater; | ||
-import android.view.View; | ||
-import android.view.ViewGroup; | ||
- | ||
- | ||
-/** | ||
- * A simple {@link Fragment} subclass. | ||
- * Use the {@link FirebaseLogin#newInstance} factory method to | ||
- * create an instance of this fragment. | ||
- */ | ||
-public class FirebaseLogin extends Fragment { | ||
- // TODO: Rename parameter arguments, choose names that match | ||
- // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER | ||
- private static final String ARG_PARAM1 = "param1"; | ||
- private static final String ARG_PARAM2 = "param2"; | ||
- | ||
- // TODO: Rename and change types of parameters | ||
- private String mParam1; | ||
- private String mParam2; | ||
- | ||
- | ||
- /** | ||
- * Use this factory method to create a new instance of | ||
- * this fragment using the provided parameters. | ||
- * | ||
- * @param param1 Parameter 1. | ||
- * @param param2 Parameter 2. | ||
- * @return A new instance of fragment FirebaseLogin. | ||
- */ | ||
- // TODO: Rename and change types and number of parameters | ||
- public static FirebaseLogin newInstance(String param1, String param2) { | ||
- FirebaseLogin fragment = new FirebaseLogin(); | ||
- Bundle args = new Bundle(); | ||
- args.putString(ARG_PARAM1, param1); | ||
- args.putString(ARG_PARAM2, param2); | ||
- fragment.setArguments(args); | ||
- return fragment; | ||
- } | ||
- | ||
- public FirebaseLogin() { | ||
- // Required empty public constructor | ||
- } | ||
- | ||
- @Override | ||
- public void onCreate(Bundle savedInstanceState) { | ||
- super.onCreate(savedInstanceState); | ||
- if (getArguments() != null) { | ||
- mParam1 = getArguments().getString(ARG_PARAM1); | ||
- mParam2 = getArguments().getString(ARG_PARAM2); | ||
- } | ||
- } | ||
- | ||
- @Override | ||
- public View onCreateView(LayoutInflater inflater, ViewGroup container, | ||
- Bundle savedInstanceState) { | ||
- // Inflate the layout for this fragment | ||
- return inflater.inflate(R.layout.fragment_firebase_login, container, false); | ||
- } | ||
- | ||
- | ||
-} |
169
library/src/main/java/com/firebase/ui/FirebaseLoginBaseActivity.java
20
library/src/main/java/com/firebase/ui/FirebaseLoginDialog.java
33
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/FacebookAuthHelper.java
64
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/FirebaseAuthHelper.java
@@ -1,15 +1,65 @@ | ||
package com.firebase.ui.com.firebasei.ui.authimpl; | ||
-import com.google.android.gms.auth.GoogleAuthException; | ||
-import com.google.android.gms.auth.UserRecoverableAuthException; | ||
+import android.util.Log; | ||
-import java.io.IOException; | ||
+import com.firebase.client.AuthData; | ||
+import com.firebase.client.Firebase; | ||
+import com.firebase.client.FirebaseError; | ||
+ | ||
+import java.util.HashMap; | ||
+import java.util.Map; | ||
/** | ||
* Created by abehaskins on 11/4/15. | ||
*/ | ||
-public interface FirebaseAuthHelper { | ||
- String getProviderName(); | ||
- void login(); | ||
- void logout(); | ||
+public abstract class FirebaseAuthHelper { | ||
+ public abstract void logout(); | ||
+ public abstract String getProviderName(); | ||
+ public abstract Firebase getFirebaseRef(); | ||
+ | ||
+ public void login() { | ||
+ Log.d("FirebaseAuthHelper", "Login() is not supported for provider type " + getProviderName()); | ||
+ }; | ||
+ public void login(String email, String password) { | ||
+ Log.d("FirebaseAuthHelper", "Login(String email, String password) is not supported for provider type " + getProviderName()); | ||
+ }; | ||
+ | ||
+ public void onFirebaseTokenReceived(FirebaseOAuthToken token, TokenAuthHandler handler) { | ||
+ authenticateRefWithOAuthFirebasetoken(token, handler); | ||
+ } | ||
+ | ||
+ private void authenticateRefWithOAuthFirebasetoken(FirebaseOAuthToken token, final TokenAuthHandler handler) { | ||
+ if (token.mode == FirebaseOAuthToken.SIMPLE) { | ||
+ // Simple mode is used for Facebook and Google auth | ||
+ getFirebaseRef().authWithOAuthToken(token.provider, token.token, new Firebase.AuthResultHandler() { | ||
+ @Override | ||
+ public void onAuthenticated(AuthData authData) { | ||
+ // Do nothing. Auth updates are handled in the AuthStateListener | ||
+ } | ||
+ | ||
+ @Override | ||
+ public void onAuthenticationError(FirebaseError firebaseError) { | ||
+ handler.onUserError(new FirebaseError(0, "auth_error")); | ||
+ } | ||
+ }); | ||
+ } else if (token.mode == FirebaseOAuthToken.COMPLEX) { | ||
+ // Complex mode is used for Twitter auth | ||
+ Map<String, String> options = new HashMap<>(); | ||
+ options.put("oauth_token", token.token); | ||
+ options.put("oauth_token_secret", token.secret); | ||
+ options.put("user_id", token.uid); | ||
+ | ||
+ getFirebaseRef().authWithOAuthToken(token.provider, options, new Firebase.AuthResultHandler() { | ||
+ @Override | ||
+ public void onAuthenticated(AuthData authData) { | ||
+ // Do nothing. Auth updates are handled in the AuthStateListener | ||
+ } | ||
+ | ||
+ @Override | ||
+ public void onAuthenticationError(FirebaseError firebaseError) { | ||
+ handler.onUserError(new FirebaseError(0, "auth_error")); | ||
+ } | ||
+ }); | ||
+ } | ||
+ } | ||
} |
24
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/GoogleAuthHelper.java
1
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/GoogleTokenTask.java
3
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/SocialProvider.java
10
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TokenAuthHandler.java
@@ -1,13 +1,13 @@ | ||
package com.firebase.ui.com.firebasei.ui.authimpl; | ||
-import java.util.HashMap; | ||
-import java.util.Map; | ||
+import com.firebase.client.AuthData; | ||
+import com.firebase.client.FirebaseError; | ||
/** | ||
* Created by deast on 9/25/15. | ||
*/ | ||
public interface TokenAuthHandler { | ||
- void onTokenReceived(FirebaseOAuthToken token); | ||
- void onCancelled(); | ||
- void onError(Exception ex); | ||
+ void onSuccess(AuthData auth); | ||
+ void onUserError(FirebaseError err); | ||
+ void onProviderError(FirebaseError err); | ||
} |
29
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TwitterAuthHelper.java
2
library/src/main/java/com/firebase/ui/com/firebasei/ui/authimpl/TwitterPromptActivity.java
106
library/src/main/res/layout/fragment_firebase_login.xml
0 comments on commit
891947f