Skip to content

Commit 19aff17

Browse files
committed
Add list of all providers in their basic form for convenience
1 parent 756aa8f commit 19aff17

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

auth/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ startActivityForResult(
156156
RC_SIGN_IN);
157157
```
158158

159+
To enable all supported providers in their basic configuration,
160+
use `setProviders(AuthUI.ALL_PROVIDERS)`
161+
159162
If a terms of service URL and a custom theme are required:
160163

161164
```java

auth/src/main/java/com/firebase/ui/auth/AuthUI.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,16 @@ public class AuthUI {
265265
TWITTER_PROVIDER
266266
)));
267267

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+
268278
private static final IdentityHashMap<FirebaseApp, AuthUI> INSTANCES = new IdentityHashMap<>();
269279

270280
private final FirebaseApp mApp;

0 commit comments

Comments
 (0)