Skip to content

Commit f07ebb2

Browse files
seftenaantspriggsomerazmon-idmeharrisjb
authored
Update README with Maven installation instructions and auth mode guidance (#8)
Co-authored-by: Anthony Spriggs <perspectiveva@gmail.com> Co-authored-by: Omer Azmon <omer.azmon@id.me> Co-authored-by: Josh Harris <harrisjb@users.noreply.github.com>
1 parent 5df425d commit f07ebb2

1 file changed

Lines changed: 39 additions & 8 deletions

File tree

README.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,53 @@ Android SDK for integrating ID.me community verification into your app via Chrom
1010

1111
## Installation
1212

13-
### Gradle
13+
### Maven (GitHub Packages)
1414

15-
Add the SDK module as a dependency in your app's `build.gradle.kts`:
15+
The SDK is published to GitHub Packages at:
16+
17+
```
18+
https://maven.pkg.github.com/IDme/android-auth-sample-code
19+
```
20+
21+
**Step 1:** Generate a GitHub personal access token with `read:packages` scope at https://github.com/settings/tokens.
22+
23+
**Step 2:** Add your GitHub credentials to `local.properties` in your project root (do not commit this file):
24+
25+
```
26+
gpr.user=YOUR_GITHUB_USERNAME
27+
gpr.key=YOUR_GITHUB_PAT
28+
```
29+
30+
**Step 3:** Add the GitHub Packages repository to your project's `settings.gradle.kts`:
1631

1732
```kotlin
18-
dependencies {
19-
implementation(project(":sdk"))
33+
dependencyResolutionManagement {
34+
repositories {
35+
google()
36+
mavenCentral()
37+
maven {
38+
url = uri("https://maven.pkg.github.com/IDme/android-auth-sample-code")
39+
credentials {
40+
val localProps = java.util.Properties()
41+
localProps.load(java.io.FileInputStream(rootProject.projectDir.resolve("local.properties")))
42+
username = localProps["gpr.user"] as String?
43+
password = localProps["gpr.key"] as String?
44+
}
45+
}
46+
}
2047
}
2148
```
2249

23-
Or if published to a Maven repository:
50+
**Step 4:** Add the dependency to your app's `build.gradle.kts`:
2451

2552
```kotlin
2653
dependencies {
2754
implementation("com.idmelabs.auth:android-auth-sample-code:1.0.8")
2855
}
2956
```
3057

58+
> **Note:** The package URL `https://maven.pkg.github.com/IDme/android-auth-sample-code` returns a 404 when accessed in a browser without authentication. This is expected — GitHub uses 404 (rather than 401) to protect package visibility. The URL works correctly when Gradle makes authenticated requests using your token.
59+
3160
## Quick Start
3261

3362
### 1. Configure the SDK
@@ -161,11 +190,13 @@ idme.logout()
161190

162191
### Auth Modes
163192

193+
For mobile app integrations, use `OAUTH_PKCE`. This is the only mode that returns the full attributes payload including `status` and subgroup data (e.g. military verification status). Do not use `OIDC` mode — it routes through the OpenID Connect userinfo endpoint which returns only standard claims (`email`, `fname`, `lname`, `uuid`, etc.) and does not include `status` or subgroup data.
194+
164195
| Mode | Description |
165196
|---|---|
166-
| `OAUTH_PKCE` | **Recommended.** OAuth 2.0 Authorization Code with PKCE. No client secret sent to authorize endpoint. |
167-
| `OAUTH` | Standard OAuth 2.0 Authorization Code. Requires `clientSecret`. |
168-
| `OIDC` | OpenID Connect. Returns an ID token with JWT signature validation against ID.me's JWKS. |
197+
| `OAUTH_PKCE` | **Required for mobile apps.** OAuth 2.0 Authorization Code with PKCE. No client secret needed. Returns full attributes and `status` payload. |
198+
| `OAUTH` | Standard OAuth 2.0 Authorization Code. Requires `clientSecret`. Server-side flows only. Not for mobile apps. |
199+
| `OIDC` | OpenID Connect. Does **not** return `status` or subgroup data. Not recommended for this integration. |
169200

170201
### Verification Types
171202

0 commit comments

Comments
 (0)