Skip to content

Commit

Permalink
[#129] Use app links URL, change callback URL to https://
Browse files Browse the repository at this point in the history
  • Loading branch information
dzolnai committed Oct 30, 2019
1 parent 2a8ab4b commit 10481ee
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ android {

// API
buildConfigField "String", "OAUTH_CLIENT_ID", "\"org.eduvpn.app.android\""
buildConfigField "String", "OAUTH_REDIRECT_URI", "\"org.eduvpn.app:/api/callback\""
buildConfigField "String", "OAUTH_REDIRECT_URI", "\"https://android.app.eduvpn.org/api/callback\""
buildConfigField "String", "OAUTH_SCOPE", "\"config\""
buildConfigField "String", "CERTIFICATE_DISPLAY_NAME", "\"eduVPN for Android\""

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
'appAuthRedirectScheme': 'org.eduvpn.app'
'appAuthRedirectHost': 'android.app.eduvpn.org',
]
missingDimensionStrategy 'implementation', 'ui' // Skeleton is no option for us because we need the log activity
}
Expand Down Expand Up @@ -62,11 +62,10 @@ android {
// API discovery is disabled, and only custom URLs can be entered.
buildConfigField "boolean", "API_DISCOVERY_ENABLED", "false"
buildConfigField "String", "OAUTH_CLIENT_ID", "\"org.letsconnect-vpn.app.android\""
buildConfigField "String", "OAUTH_REDIRECT_URI", "\"org.letsconnect-vpn.app:/api/callback\""
buildConfigField "String", "OAUTH_REDIRECT_URI", "\"https://android.app.letsconnect-vpn.org/api/callback\""
buildConfigField "String", "CERTIFICATE_DISPLAY_NAME", "\"Let's Connect! for Android\""

manifestPlaceholders = [
'appAuthRedirectScheme': 'org.letsconnect-vpn.app'
'appAuthRedirectHost': 'android.app.letsconnect-vpn.org',
]
}
}
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@

</activity>

<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
tools:node="replace">
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="${appAuthRedirectHost}"
android:path="/api/callback"
android:scheme="https" />
</intent-filter>
</activity>

<meta-data
android:name="android.content.APP_RESTRICTIONS"
android:resource="@xml/app_restrictions" />
Expand Down

0 comments on commit 10481ee

Please sign in to comment.