Skip to content

Commit 020582d

Browse files
Merge pull request #102 from antonholmberg/add-support-for-path-pattern
Add support for path pattern
2 parents ee396af + b82a7f7 commit 020582d

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Change Log
22
==========
33

4+
## Version 3.0.0
5+
- Add mandatory redirect path pattern.
6+
7+
You can now define the path pattern in your app's build.gradle file as follows:
8+
```gradle
9+
defaultConfig {
10+
manifestPlaceholders = [
11+
redirectSchemeName: "your-redirect-scheme",
12+
redirectHostName: "your-redirect-host",
13+
redirectPathPattern: "your/redirect/path/pattern" // New mandatory field
14+
]
15+
...
16+
}
17+
```
18+
19+
If you want to retain the previous behavior (accepting any path), use .* as the path pattern.
20+
For more details, see the [Google documentation](https://developer.android.com/guide/topics/manifest/data-element#path).
21+
422
## Version 2.2.0
523
- Requesting token now uses PKCE when:
624
- There is an installed Spotify app that supports PKCE.

auth-lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ apply plugin: 'com.android.library'
2323

2424
project.group = 'com.spotify.android'
2525
project.archivesBaseName = 'auth'
26-
project.version = '2.2.0'
26+
project.version = '3.0.0'
2727

2828
android {
2929
compileSdk 33

auth-lib/src/auth/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<category android:name="android.intent.category.BROWSABLE"/>
4242
<data
4343
android:host="${redirectHostName}"
44-
android:scheme="${redirectSchemeName}"/>
44+
android:scheme="${redirectSchemeName}"
45+
android:pathPattern="${redirectPathPattern}"/>
4546
</intent-filter>
4647
</activity>
4748

auth-sample/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ android {
4141
versionCode 1
4242
versionName "1.0"
4343

44-
manifestPlaceholders = [redirectSchemeName: "spotify-sdk", redirectHostName: "auth"]
44+
manifestPlaceholders = [
45+
redirectSchemeName: "spotify-sdk",
46+
redirectHostName: "auth",
47+
redirectPathPattern: ".*"
48+
]
4549

4650
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4751
}

0 commit comments

Comments
 (0)