Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore setGithubButtonId #1810

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Fixes issue with custom parameters for OAuth providers (#1805)
- Restore `setGithubButtonId` when using custom layouts (#1783)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.google.firebase.auth.EmailAuthProvider;
import com.google.firebase.auth.FacebookAuthProvider;
import com.google.firebase.auth.GithubAuthProvider;
import com.google.firebase.auth.GoogleAuthProvider;
import com.google.firebase.auth.PhoneAuthProvider;
import com.google.firebase.auth.TwitterAuthProvider;
Expand Down Expand Up @@ -158,6 +159,12 @@ public AuthMethodPickerLayout.Builder setAnonymousButtonId(@IdRes int anonymousB
return this;
}

public AuthMethodPickerLayout.Builder setGithubButtonId(
@IdRes int githubButtonId) {
providersMapping.put(GithubAuthProvider.PROVIDER_ID, githubButtonId);
return this;
}

public AuthMethodPickerLayout.Builder setMicrosoftButtonId(
@IdRes int microsoftButtonId) {
providersMapping.put(AuthUI.MICROSOFT_PROVIDER, microsoftButtonId);
Expand Down
3 changes: 1 addition & 2 deletions auth/src/main/java/com/firebase/ui/auth/AuthUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ public final class AuthUI {
public static final Set<String> SOCIAL_PROVIDERS =
Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
GoogleAuthProvider.PROVIDER_ID,
FacebookAuthProvider.PROVIDER_ID,
GithubAuthProvider.PROVIDER_ID)));
FacebookAuthProvider.PROVIDER_ID)));

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public static final String UNCONFIGURED_CONFIG_VALUE = "CHANGE-ME";
Expand Down