Skip to content

Commit

Permalink
Version 6.2.0
Browse files Browse the repository at this point in the history
Version 6.2.0
  • Loading branch information
samtstern authored Dec 16, 2019
2 parents d78e72b + 86f01c6 commit 4b06d16
Show file tree
Hide file tree
Showing 29 changed files with 83 additions and 931 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ libraries.
```groovy
dependencies {
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:6.1.0'
implementation 'com.firebaseui:firebase-ui-database:6.2.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:6.1.0'
implementation 'com.firebaseui:firebase-ui-firestore:6.2.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:6.1.0'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:6.1.0'
implementation 'com.firebaseui:firebase-ui-storage:6.2.0'
}
```

Expand Down
2 changes: 0 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ dependencies {
implementation(Config.Libs.Androidx.multidex)

implementation(project(":auth"))
implementation(project(":auth-github"))
implementation(project(":firestore"))
implementation(project(":database"))
implementation(project(":storage"))
Expand All @@ -46,7 +45,6 @@ dependencies {
// Needed to override Facebook
implementation(Config.Libs.Androidx.cardView)
implementation(Config.Libs.Androidx.customTabs)
implementation(Config.Libs.Provider.twitter) { isTransitive = true }

implementation(Config.Libs.Misc.glide)
annotationProcessor(Config.Libs.Misc.glideCompiler)
Expand Down
23 changes: 11 additions & 12 deletions app/src/main/java/com/firebase/uidemo/auth/AuthUiActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class AuthUiActivity extends AppCompatActivity {
@BindView(R.id.apple_provider) CheckBox mUseAppleProvider;
@BindView(R.id.microsoft_provider) CheckBox mUseMicrosoftProvider;
@BindView(R.id.yahoo_provider) CheckBox mUseYahooProvider;
@BindView(R.id.github_provider) CheckBox mUseGitHubProvider;

@BindView(R.id.default_layout) RadioButton mDefaultLayout;
@BindView(R.id.custom_layout) RadioButton mCustomLayout;
Expand Down Expand Up @@ -149,12 +150,6 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
});
}

if (ConfigurationUtils.isTwitterMisconfigured(this)) {
mUseTwitterProvider.setChecked(false);
mUseTwitterProvider.setEnabled(false);
mUseTwitterProvider.setText(R.string.twitter_label_missing_config);
}

mUseEmailLinkProvider.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
Expand Down Expand Up @@ -188,13 +183,13 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
mUseMicrosoftProvider.setChecked(false);
mUseYahooProvider.setChecked(false);
mUseAppleProvider.setChecked(false);
mUseGitHubProvider.setChecked(false);
}
}
});

if (ConfigurationUtils.isGoogleMisconfigured(this)
|| ConfigurationUtils.isFacebookMisconfigured(this)
|| ConfigurationUtils.isTwitterMisconfigured(this)) {
|| ConfigurationUtils.isFacebookMisconfigured(this)) {
showSnackbar(R.string.configuration_required);
}

Expand Down Expand Up @@ -394,10 +389,6 @@ private List<IdpConfig> getSelectedProviders() {
.build());
}

if (mUseTwitterProvider.isChecked()) {
selectedProviders.add(new IdpConfig.TwitterBuilder().build());
}

if (mUseEmailProvider.isChecked()) {
selectedProviders.add(new IdpConfig.EmailBuilder()
.setRequireName(mRequireName.isChecked())
Expand Down Expand Up @@ -427,6 +418,10 @@ private List<IdpConfig> getSelectedProviders() {
selectedProviders.add(new IdpConfig.AnonymousBuilder().build());
}

if (mUseTwitterProvider.isChecked()) {
selectedProviders.add(new IdpConfig.TwitterBuilder().build());
}

if (mUseMicrosoftProvider.isChecked()) {
selectedProviders.add(new IdpConfig.MicrosoftBuilder().build());
}
Expand All @@ -439,6 +434,10 @@ private List<IdpConfig> getSelectedProviders() {
selectedProviders.add(new IdpConfig.AppleBuilder().build());
}

if (mUseGitHubProvider.isChecked()) {
selectedProviders.add(new IdpConfig.GitHubBuilder().build());
}

return selectedProviders;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ public static boolean isFacebookMisconfigured(@NonNull Context context) {
context.getString(R.string.facebook_application_id));
}

public static boolean isTwitterMisconfigured(@NonNull Context context) {
List<String> twitterConfigs = Arrays.asList(
context.getString(R.string.twitter_consumer_key),
context.getString(R.string.twitter_consumer_secret)
);

return twitterConfigs.contains(AuthUI.UNCONFIGURED_CONFIG_VALUE);
}

@NonNull
public static List<AuthUI.IdpConfig> getConfiguredProviders(@NonNull Context context) {
List<AuthUI.IdpConfig> providers = new ArrayList<>();
Expand All @@ -49,10 +40,6 @@ public static List<AuthUI.IdpConfig> getConfiguredProviders(@NonNull Context con
providers.add(new AuthUI.IdpConfig.FacebookBuilder().build());
}

if (!isTwitterMisconfigured(context)) {
providers.add(new AuthUI.IdpConfig.TwitterBuilder().build());
}

ActionCodeSettings actionCodeSettings = ActionCodeSettings.newBuilder()
.setAndroidPackageName("com.firebase.uidemo", true, null)
.setHandleCodeInApp(true)
Expand All @@ -65,7 +52,7 @@ public static List<AuthUI.IdpConfig> getConfiguredProviders(@NonNull Context con
.setActionCodeSettings(actionCodeSettings)
.build());


providers.add(new AuthUI.IdpConfig.TwitterBuilder().build());
providers.add(new AuthUI.IdpConfig.PhoneBuilder().build());
providers.add(new AuthUI.IdpConfig.MicrosoftBuilder().build());
providers.add(new AuthUI.IdpConfig.YahooBuilder().build());
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/auth_ui_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@
android:checked="true"
android:text="@string/providers_yahoo" />

<CheckBox
android:id="@+id/github_provider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/providers_github" />

<TextView
style="@style/Base.TextAppearance.AppCompat.Subhead"
android:layout_width="wrap_content"
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<string name="facebook_application_id" translatable="false">CHANGE-ME</string>
<string name="facebook_login_protocol_scheme" translatable="false">fbYOUR_APP_ID</string>

<string name="twitter_consumer_key" translatable="false">CHANGE-ME</string>
<string name="twitter_consumer_secret" translatable="false">CHANGE-ME</string>

<string name="github_client_id" translatable="false">CHANGE-ME</string>
<string name="github_client_secret" translatable="false">CHANGE-ME</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<string name="providers_apple">Apple</string>
<string name="providers_microsoft">Microsoft</string>
<string name="providers_yahoo">Yahoo</string>
<string name="providers_github">GitHub</string>

<string name="layout_header">Layout</string>
<string name="layout_default">Default</string>
Expand Down Expand Up @@ -71,7 +72,6 @@
<string name="configuration_required">Configuration required - see README.md</string>
<string name="google_label_missing_config">Google configuration missing</string>
<string name="facebook_label_missing_config">Facebook configuration missing</string>
<string name="twitter_label_missing_config">Twitter configuration missing</string>

<string name="sign_in_cancelled">Sign in cancelled</string>
<string name="no_internet_connection">No internet connection</string>
Expand Down
16 changes: 0 additions & 16 deletions auth-github/build.gradle.kts

This file was deleted.

35 changes: 0 additions & 35 deletions auth-github/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4b06d16

Please sign in to comment.