Skip to content

Commit 1d3369d

Browse files
authored
Merge branch 'main' into dependabot/github_actions/codecov/codecov-action-5.1.2
2 parents 106d58d + ceb2dd4 commit 1d3369d

35 files changed

+1622
-109
lines changed

.github/actions/maven-publish/action.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ runs:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
2222

23-
- name: Setup Java
24-
shell: bash
25-
run: |
26-
curl -s "https://get.sdkman.io" | bash
27-
source "/home/runner/.sdkman/bin/sdkman-init.sh"
28-
sdk list java
29-
sdk install java ${{ inputs.java-version }} && sdk default java ${{ inputs.java-version }}
23+
- name: Set up Java
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: '11'
3028

3129
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # [email protected]
3230

.github/actions/setup/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ runs:
1919
using: composite
2020

2121
steps:
22+
- name: Set up Java
23+
uses: actions/setup-java@v4
24+
with:
25+
distribution: 'temurin'
26+
java-version: '11'
27+
2228
- run: |
2329
curl -s "https://get.sdkman.io" | bash
2430
source "/home/runner/.sdkman/bin/sdkman-init.sh"
25-
sdk list java
26-
sdk install java ${{ inputs.java }} && sdk default java ${{ inputs.java }}
2731
sdk install gradle ${{ inputs.gradle }} && sdk default gradle ${{ inputs.gradle }}
2832
sdk install kotlin ${{ inputs.kotlin }} && sdk default kotlin ${{ inputs.kotlin }}
2933
shell: bash

.github/workflows/codeql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
3636
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
3737

38+
- name: Set up Java
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: 'temurin'
42+
java-version: '11'
43+
3844
- name: Checkout
3945
uses: actions/checkout@v4
4046

.github/workflows/snyk.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.snyk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ ignore:
55
SNYK-JAVA-COMFASTERXMLWOODSTOX-3091135:
66
- '*':
77
reason: Latest version of dokka has this vulnerability
8-
expires: 2024-12-31T12:54:23.000Z
8+
expires: 2025-02-21T12:54:23.000Z
99
created: 2024-08-01T12:08:37.770Z
1010
SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744:
1111
- '*':
1212
reason: Latest version of dokka has this vulnerability
13-
expires: 2024-12-31T12:54:23.000Z
13+
expires: 2025-02-21T12:54:23.000Z
1414
created: 2024-08-01T12:08:55.927Z
1515
SNYK-JAVA-COMFASTERXMLJACKSONCORE-7569538:
1616
- '*':
1717
reason: Latest version of dokka has this vulnerability
18-
expires: 2024-12-31T1:54:23.000Z
18+
expires: 2025-02-21T1:54:23.000Z
1919
created: 2024-08-01T12:08:02.973Z
2020
patch: {}

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.1
1+
3.5.0

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Change Log
22

3+
## [3.5.0](https://github.com/auth0/Auth0.Android/tree/3.5.0) (2025-03-17)
4+
[Full Changelog](https://github.com/auth0/Auth0.Android/compare/3.4.0...3.5.0)
5+
6+
**Added**
7+
- Updated documentation to pass an activity context for login and logout [\#808](https://github.com/auth0/Auth0.Android/pull/808) ([pmathew92](https://github.com/pmathew92))
8+
- Add to CustomTabsOptions ability to disable opening auth in custom tab [\#806](https://github.com/auth0/Auth0.Android/pull/806) ([bennycao](https://github.com/bennycao))
9+
10+
**Changed**
11+
- Fixed the java samples in the Example.md file [\#807](https://github.com/auth0/Auth0.Android/pull/807) ([pmathew92](https://github.com/pmathew92))
12+
13+
## [3.4.0](https://github.com/auth0/Auth0.Android/tree/3.4.0) (2025-02-13)
14+
[Full Changelog](https://github.com/auth0/Auth0.Android/compare/3.3.0...3.4.0)
15+
16+
**Added**
17+
- Support Process Death in WebAuthProvider [\#784](https://github.com/auth0/Auth0.Android/pull/784) ([ahibrahimleague](https://github.com/ahibrahimleague))
18+
19+
**Changed**
20+
- Updated compile and target sdk version to 35 [\#799](https://github.com/auth0/Auth0.Android/pull/799) ([pmathew92](https://github.com/pmathew92))
21+
22+
## [3.3.0](https://github.com/auth0/Auth0.Android/tree/3.3.0) (2025-02-03)
23+
[Full Changelog](https://github.com/auth0/Auth0.Android/compare/3.2.1...3.3.0)
24+
25+
**Added**
26+
- Add support for custom token exchange [\#789](https://github.com/auth0/Auth0.Android/pull/789) ([pmathew92](https://github.com/pmathew92))
27+
328
## [3.2.1](https://github.com/auth0/Auth0.Android/tree/3.2.1) (2024-12-06)
429
[Full Changelog](https://github.com/auth0/Auth0.Android/compare/3.2.0...3.2.1)
530

EXAMPLES.md

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [Step 2: Input the code](#step-2-input-the-code)
1818
- [Sign Up with a database connection](#sign-up-with-a-database-connection)
1919
- [Get user information](#get-user-information)
20+
- [Custom Token Exchange](#custom-token-exchange)
2021
- [Credentials Manager](#credentials-manager)
2122
- [Secure Credentials Manager](#secure-credentials-manager)
2223
- [Usage](#usage)
@@ -487,6 +488,57 @@ authentication
487488
```
488489
</details>
489490

491+
### Custom Token Exchange
492+
493+
```kotlin
494+
authentication
495+
.customTokenExchange("subject_token_type", "subject_token")
496+
.start(object : Callback<Credentials, AuthenticationException> {
497+
override fun onSuccess(result: Credentials) {
498+
// Handle success
499+
}
500+
501+
override fun onFailure(exception: AuthenticationException) {
502+
// Handle error
503+
}
504+
505+
})
506+
```
507+
<details>
508+
<summary>Using coroutines</summary>
509+
510+
``` kotlin
511+
try {
512+
val credentials = authentication
513+
.tokenExchange("subject_token_type", "subject_token")
514+
.await()
515+
} catch (e: AuthenticationException) {
516+
e.printStacktrace()
517+
}
518+
```
519+
</details>
520+
521+
<details>
522+
<summary>Using Java</summary>
523+
524+
```java
525+
authentication
526+
.customTokenExchange("subject_token_type", "subject_token")
527+
.start(new Callback<Credentials, AuthenticationException>() {
528+
@Override
529+
public void onSuccess(@Nullable Credentials payload) {
530+
// Handle success
531+
}
532+
@Override
533+
public void onFailure(@NonNull AuthenticationException error) {
534+
// Handle error
535+
}
536+
});
537+
```
538+
539+
540+
</details>
541+
490542

491543
## Credentials Manager
492544

@@ -1236,12 +1288,9 @@ account.networkingClient = netClient
12361288
<summary>Using Java</summary>
12371289

12381290
```java
1239-
DefaultClient netClient = new DefaultClient(
1240-
connectTimeout = 30,
1241-
readTimeout = 30
1242-
);
1291+
DefaultClient netClient = new DefaultClient(30, 30);
12431292
Auth0 account = Auth0.getInstance("client id", "domain");
1244-
account.networkingClient = netClient;
1293+
account.setNetworkingClient(netClient);
12451294
```
12461295
</details>
12471296

@@ -1260,11 +1309,13 @@ account.networkingClient = netClient
12601309
<summary>Using Java</summary>
12611310

12621311
```java
1312+
import java.util.HashMap;
1313+
12631314
DefaultClient netClient = new DefaultClient(
1264-
enableLogging = true
1315+
10, 10, new HashMap<>() ,true
12651316
);
12661317
Auth0 account = Auth0.getInstance("client id", "domain");
1267-
account.networkingClient = netClient;
1318+
account.setNetworkingClient(netClient);
12681319
```
12691320
</details>
12701321

@@ -1287,10 +1338,10 @@ Map<String, String> defaultHeaders = new HashMap<>();
12871338
defaultHeaders.put("{HEADER-NAME}", "{HEADER-VALUE}");
12881339

12891340
DefaultClient netClient = new DefaultClient(
1290-
defaultHeaders = defaultHeaders
1341+
10,10 , defaultHeaders
12911342
);
12921343
Auth0 account = Auth0.getInstance("client id", "domain");
1293-
account.networkingClient = netClient;
1344+
account.setNetworkingClient(netClient);
12941345
```
12951346
</details>
12961347

@@ -1324,7 +1375,7 @@ class CustomNetClient extends NetworkingClient {
13241375
ServerResponse response = // ...
13251376

13261377
// Return a ServerResponse from the received response data
1327-
return ServerResponse(responseCode, responseBody, responseHeaders)
1378+
return new ServerResponse(responseCode, responseBody, responseHeaders);
13281379
}
13291380
};
13301381

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To install Auth0.Android with [Gradle](https://gradle.org/), simply add the foll
5151

5252
```gradle
5353
dependencies {
54-
implementation 'com.auth0.android:auth0:3.2.1'
54+
implementation 'com.auth0.android:auth0:3.5.0'
5555
}
5656
```
5757

@@ -197,6 +197,8 @@ The callback will get invoked when the user returns to your application. There a
197197
198198
##### A note about App Deep Linking:
199199

200+
> Whenever possible, Auth0 recommends using [Android App Links](https://auth0.com/docs/applications/enable-android-app-links) as a secure way to link directly to content within your app. Custom URL schemes can be subject to [client impersonation attacks](https://datatracker.ietf.org/doc/html/rfc8252#section-8.6).
201+
200202
If you followed the configuration steps documented here, you may have noticed the default scheme used for the Callback URI is `https`. This works best for Android API 23 or newer if you're using [Android App Links](https://auth0.com/docs/applications/enable-android-app-links), but in previous Android versions this _may_ show the intent chooser dialog prompting the user to choose either your application or the browser. You can change this behaviour by using a custom unique scheme so that the OS opens directly the link with your app.
201203

202204
1. Update the `auth0Scheme` Manifest Placeholder on the `app/build.gradle` file or update the intent-filter declaration in the `AndroidManifest.xml` to use the new scheme.

auth0/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@ version = getVersionFromFile()
3434
logger.lifecycle("Using version ${version} for ${name}")
3535

3636
android {
37-
compileSdkVersion 34
37+
compileSdk 35
3838

3939
defaultConfig {
4040
minSdkVersion 21
41-
targetSdkVersion 34
41+
targetSdk 35
4242
versionCode 1
4343
versionName project.version
4444

4545
buildConfigField "String", "LIBRARY_NAME", "\"$project.rootProject.name\""
4646
buildConfigField "String", "VERSION_NAME", "\"${project.version}\""
4747

48+
manifestPlaceholders = [auth0Domain: '${auth0Domain}', auth0Scheme: '${auth0Scheme}']
49+
4850
consumerProguardFiles '../proguard/proguard-gson.pro', '../proguard/proguard-okio.pro', '../proguard/proguard-jetpack.pro'
4951
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
5052
}
@@ -61,11 +63,11 @@ android {
6163
}
6264
}
6365
compileOptions {
64-
sourceCompatibility JavaVersion.VERSION_1_8
65-
targetCompatibility JavaVersion.VERSION_1_8
66+
sourceCompatibility JavaVersion.VERSION_11
67+
targetCompatibility JavaVersion.VERSION_11
6668
}
6769
kotlinOptions {
68-
jvmTarget = '1.8'
70+
jvmTarget = JavaVersion.VERSION_11.toString()
6971
freeCompilerArgs += [
7072
'-Xexplicit-api=strict', // or '-Xexplicit-api=warning'
7173
]

0 commit comments

Comments
 (0)