-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split GitHub provider out into its own module (#1421)
- Loading branch information
1 parent
0da111b
commit 68be249
Showing
24 changed files
with
162 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,14 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Example: project-id.firebaseapp.com. Used for OAuth redirects --> | ||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="UnusedResources"> | ||
<!-- See auth/src/main/res/values/config.xml for documentation --> | ||
|
||
<string name="firebase_web_host" translatable="false">CHANGE-ME</string> | ||
|
||
<!-- | ||
The Facebook Application ID associated with this Android application. To | ||
use Facebook accounts with the demo application, register an application | ||
and provide your value here. | ||
--> | ||
<string name="facebook_application_id" translatable="false">CHANGE-ME</string> | ||
<string name="facebook_login_protocol_scheme" translatable="false">fbYOUR_APP_ID</string> | ||
|
||
<!-- Facebook Application ID, prefixed by 'fb'. Enables Chrome Custom tabs. --> | ||
<string name="facebook_login_protocol_scheme" translatable="false" tools:ignore="UnusedResources">fbYOUR_APP_ID</string> | ||
|
||
|
||
<!-- | ||
Your Twitter Consumer Key. To use Twitter accounts with the demo application, register an | ||
application with Twitter and provide the following two values. | ||
--> | ||
<string name="twitter_consumer_key" translatable="false">CHANGE-ME</string> | ||
|
||
<!-- | ||
Your Twitter Consumer Secret. | ||
WARNING: By obtaining your Consumer Key and Consumer Secret other programs can perform API | ||
operations as your app. Embedding the Consumer Key and Consumer Secret in your app, no matter | ||
how obfuscated, makes it vulnerable to being stolen. | ||
--> | ||
<string name="twitter_consumer_secret" translatable="false">CHANGE-ME</string> | ||
|
||
|
||
<!-- | ||
Your GitHub Client ID. To use GitHub accounts with the demo application, register an | ||
application with GitHub and provide the following two values. | ||
--> | ||
<string name="github_client_id" translatable="false">CHANGE-ME</string> | ||
|
||
<!-- | ||
Your GitHub Client Secret. | ||
WARNING: By obtaining your Client ID and Client Secret other programs can perform API | ||
operations as your app. Embedding the Client ID and Client Secret in your app, no matter | ||
how obfuscated, makes it vulnerable to being stolen. | ||
--> | ||
<string name="github_client_secret" translatable="false">CHANGE-ME</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dependencies { | ||
compileOnly(project(":auth")) { isTransitive = false } | ||
compileOnly(Config.Libs.Firebase.auth) { isTransitive = false } | ||
|
||
implementation(Config.Libs.Support.appCompat) | ||
implementation(Config.Libs.Support.customTabs) | ||
|
||
implementation(Config.Libs.Misc.retrofit) | ||
implementation(Config.Libs.Misc.retrofitGson) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.firebase.ui.auth.ui.github"> | ||
|
||
<application> | ||
|
||
<activity | ||
android:name=".GitHubLoginActivity" | ||
android:label="" | ||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" | ||
android:launchMode="singleTop" | ||
android:theme="@style/FirebaseUI.Transparent"> | ||
|
||
<intent-filter | ||
android:autoVerify="true" | ||
tools:ignore="UnusedAttribute"> | ||
<action android:name="android.intent.action.VIEW" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
|
||
<data | ||
android:host="@string/firebase_web_host" | ||
android:path="/__/auth/handler" | ||
android:scheme="https" | ||
tools:ignore="AppLinksAutoVerifyWarning" /> | ||
</intent-filter> | ||
|
||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Expect auth resources --> | ||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName"> | ||
<item name="colorPrimary" type="color" /> | ||
<item name="FirebaseUI.Transparent" type="style" /> | ||
|
||
<item name="firebase_web_host" type="string" /> | ||
<item name="github_client_id" type="string" /> | ||
<item name="github_client_secret" type="string" /> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
auth/src/main/java/com/firebase/ui/auth/data/remote/GitHubSignInHandlerBridge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.firebase.ui.auth.data.remote; | ||
|
||
import android.support.annotation.RestrictTo; | ||
|
||
import com.firebase.ui.auth.AuthUI; | ||
import com.firebase.ui.auth.viewmodel.ProviderSignInBase; | ||
|
||
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) | ||
public final class GitHubSignInHandlerBridge { | ||
public static final Class<ProviderSignInBase<AuthUI.IdpConfig>> HANDLER_CLASS; | ||
|
||
static { | ||
try { | ||
//noinspection unchecked | ||
HANDLER_CLASS = (Class<ProviderSignInBase<AuthUI.IdpConfig>>) | ||
Class.forName("com.firebase.ui.auth.data.remote.GitHubSignInHandler"); | ||
} catch (ClassNotFoundException e) { | ||
throw new IllegalStateException( | ||
"Check for availability with ProviderAvailability first.", e); | ||
} | ||
} | ||
|
||
private GitHubSignInHandlerBridge() { | ||
throw new AssertionError("No instance for you!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.