File tree Expand file tree Collapse file tree 8 files changed +18
-27
lines changed
java/com/firebase/ui/auth Expand file tree Collapse file tree 8 files changed +18
-27
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,6 @@ startActivityForResult(
156
156
RC_SIGN_IN );
157
157
```
158
158
159
- To enable all supported providers in their basic configuration, use ` setProviders(AuthUI.ALL_PROVIDERS) `
160
-
161
159
If a terms of service URL and a custom theme are required:
162
160
163
161
``` java
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ android {
32
32
33
33
dependencies {
34
34
testCompile ' junit:junit:4.12'
35
- testCompile ' org.mockito:mockito-core:2.2.0 '
35
+ testCompile ' org.mockito:mockito-core:2.2.2 '
36
36
testCompile ' org.robolectric:robolectric:3.1.2'
37
37
// See https://github.com/robolectric/robolectric/issues/1932#issuecomment-219796474
38
38
testCompile ' org.khronos:opengl-api:gl1.1-android-2.1_r1'
39
39
40
- compile ' com.facebook.android:facebook-android-sdk:4.14.1 '
41
- compile(" com.twitter.sdk.android:twitter:2.0.0 @aar" ) {
40
+ compile ' com.facebook.android:facebook-android-sdk:4.17.0 '
41
+ compile(" com.twitter.sdk.android:twitter:2.1.1 @aar" ) {
42
42
transitive = true ;
43
43
}
44
44
compile " com.android.support:design:${ project.ext.support_library_version} "
Original file line number Diff line number Diff line change 9
9
<meta-data
10
10
android : name =" com.google.android.gms.version"
11
11
android : value =" @integer/google_play_services_version" />
12
+ <meta-data
13
+ android : name =" io.fabric.ApiKey"
14
+ android : value =" @string/twitter_consumer_secret" />
12
15
13
16
<activity
14
17
android : name =" com.firebase.ui.auth.ui.email.ConfirmRecoverPasswordActivity"
Original file line number Diff line number Diff line change @@ -265,16 +265,6 @@ public class AuthUI {
265
265
TWITTER_PROVIDER
266
266
)));
267
267
268
- /**
269
- * The list of all supported authentication providers in Firebase Auth UI in their basic
270
- * {@link IdpConfig} form.
271
- */
272
- public static final List <IdpConfig > ALL_PROVIDERS =
273
- Arrays .asList (new AuthUI .IdpConfig .Builder (AuthUI .EMAIL_PROVIDER ).build (),
274
- new AuthUI .IdpConfig .Builder (AuthUI .GOOGLE_PROVIDER ).build (),
275
- new AuthUI .IdpConfig .Builder (AuthUI .FACEBOOK_PROVIDER ).build (),
276
- new AuthUI .IdpConfig .Builder (AuthUI .TWITTER_PROVIDER ).build ());
277
-
278
268
private static final IdentityHashMap <FirebaseApp , AuthUI > INSTANCES = new IdentityHashMap <>();
279
269
280
270
private final FirebaseApp mApp ;
Original file line number Diff line number Diff line change 19
19
import android .content .Intent ;
20
20
import android .os .Bundle ;
21
21
import android .util .Log ;
22
+
22
23
import com .facebook .CallbackManager ;
23
24
import com .facebook .FacebookCallback ;
24
25
import com .facebook .FacebookException ;
34
35
import com .firebase .ui .auth .R ;
35
36
import com .google .firebase .auth .AuthCredential ;
36
37
import com .google .firebase .auth .FacebookAuthProvider ;
37
- import java .util .ArrayList ;
38
- import java .util .List ;
38
+
39
39
import org .json .JSONException ;
40
40
import org .json .JSONObject ;
41
41
42
+ import java .util .ArrayList ;
43
+ import java .util .List ;
44
+
42
45
public class FacebookProvider implements IdpProvider , FacebookCallback <LoginResult > {
43
46
protected static final String ERROR = "err" ;
44
47
protected static final String ERROR_MSG = "err_msg" ;
Original file line number Diff line number Diff line change @@ -89,18 +89,18 @@ private void populateIdpList(List<IdpConfig> providers) {
89
89
mIdpProviders = new ArrayList <>();
90
90
for (IdpConfig idpConfig : providers ) {
91
91
switch (idpConfig .getProviderId ()) {
92
- case AuthUI .FACEBOOK_PROVIDER :
93
- mIdpProviders .add (new FacebookProvider (this , idpConfig ));
94
- break ;
95
92
case AuthUI .GOOGLE_PROVIDER :
96
93
mIdpProviders .add (new GoogleProvider (this , idpConfig ));
97
94
break ;
98
- case AuthUI .EMAIL_PROVIDER :
99
- findViewById ( R . id . email_provider ). setVisibility ( View . VISIBLE );
95
+ case AuthUI .FACEBOOK_PROVIDER :
96
+ mIdpProviders . add ( new FacebookProvider ( this , idpConfig ) );
100
97
break ;
101
98
case AuthUI .TWITTER_PROVIDER :
102
99
mIdpProviders .add (new TwitterProvider (this ));
103
100
break ;
101
+ case AuthUI .EMAIL_PROVIDER :
102
+ findViewById (R .id .email_provider ).setVisibility (View .VISIBLE );
103
+ break ;
104
104
default :
105
105
if (BuildConfig .DEBUG ) {
106
106
Log .d (TAG , "Encountered unknown IDPProvider parcel with type: "
Original file line number Diff line number Diff line change 14
14
15
15
package com .firebase .ui .auth .util ;
16
16
17
- import android .app .Fragment ;
18
17
import android .app .PendingIntent ;
19
18
import android .content .Context ;
20
19
import android .os .Bundle ;
@@ -61,7 +60,7 @@ public FirebaseAuthWrapperImpl(@NonNull FirebaseAuth firebaseAuth) {
61
60
if (firebaseAuth == null ) {
62
61
throw new IllegalArgumentException ("firebaseAuth must not be null" );
63
62
}
64
- this . mFirebaseAuth = firebaseAuth ;
63
+ mFirebaseAuth = firebaseAuth ;
65
64
}
66
65
67
66
@ Override
Original file line number Diff line number Diff line change 1
1
project. ext. firebase_version = ' 9.8.0'
2
- // use caution when updating support library version, v25.0.0 caused issues
3
- // with the Facebook SDK. (NoSuchMethodError startActivity)
4
- project. ext. support_library_version = ' 24.2.1'
2
+ project. ext. support_library_version = ' 25.0.0'
5
3
6
4
project. ext. submodules = [' database' , ' auth' , ' storage' ]
7
5
project. ext. group = ' com.firebaseui'
You can’t perform that action at this time.
0 commit comments