From 7615723d4fbc60a822d38a74460617a6b39a0cb1 Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:07:22 +0200 Subject: [PATCH 1/3] refactor(auth): use REDIRECT_URI --- .../joinmastodon/android/api/session/AccountSessionManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java b/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java index b52b5f216..1a9481d0e 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/session/AccountSessionManager.java @@ -215,7 +215,7 @@ public class AccountSessionManager{ .path("/oauth/authorize") .appendQueryParameter("response_type", "code") .appendQueryParameter("client_id", result.clientId) - .appendQueryParameter("redirect_uri", "moshidon-android-auth://callback") + .appendQueryParameter("redirect_uri", REDIRECT_URI) .appendQueryParameter("scope", SCOPE) .build(); From a59587eb62ef921c43cac5cf56c8b4fe661f637a Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Sun, 9 Apr 2023 15:46:30 +0200 Subject: [PATCH 2/3] fix(auth): use BuildType depended redirect uri --- mastodon/build.gradle | 3 +++ mastodon/src/main/AndroidManifest.xml | 2 +- .../android/api/session/AccountSessionManager.java | 13 ++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mastodon/build.gradle b/mastodon/build.gradle index 76754943f..32fb5ef62 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -5,6 +5,7 @@ plugins { android { compileSdk 33 defaultConfig { + manifestPlaceholders = [oAuthScheme:"moshidon-android-auth"] archivesBaseName = "moshidon" applicationId "org.joinmastodon.android.moshinda" minSdk 23 @@ -34,6 +35,7 @@ android { debuggable true versionNameSuffix '-debug' applicationIdSuffix '.debug' + manifestPlaceholders = [oAuthScheme:"moshidon-android-debug-auth"] } githubRelease{ initWith release @@ -43,6 +45,7 @@ android { versionNameSuffix '-nightly' applicationIdSuffix '.nightly' signingConfig signingConfigs.nightly + manifestPlaceholders = [oAuthScheme:"moshidon-android-nightly-auth"] } playRelease{ initWith release diff --git a/mastodon/src/main/AndroidManifest.xml b/mastodon/src/main/AndroidManifest.xml index f225dff03..aa9161bbf 100644 --- a/mastodon/src/main/AndroidManifest.xml +++ b/mastodon/src/main/AndroidManifest.xml @@ -41,7 +41,7 @@ - + Date: Mon, 10 Apr 2023 07:57:59 -0300 Subject: [PATCH 3/3] chore: refactor deprecated action --- .github/workflows/nightly-builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-builds.yml b/.github/workflows/nightly-builds.yml index 98b1c3dd2..e5dc85a30 100644 --- a/.github/workflows/nightly-builds.yml +++ b/.github/workflows/nightly-builds.yml @@ -17,10 +17,10 @@ jobs: java-version: '17' distribution: 'temurin' cache: gradle - + - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - name: Grant execute permission for gradlew run: chmod +x gradlew