Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/cmd/server/bootstrap/01-default-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: 01900000-0000-7000-8000-000000000001
handle: default
name: Default
description: Default organization unit
logoUrl: "avatar:shape=rounded,variant=anonymous_entity,content=pavilion,colors=0,bg=#2c4ed4"
logoUrl: "avatar:shape=rounded,variant=anonymous_entity,content=pavilion,colors=0"
---
resource_type: user_type
id: 01900000-0000-7000-8000-000000000010
Expand Down Expand Up @@ -4900,7 +4900,7 @@ description: Management application for ThunderID
type: browser
ouId: 01900000-0000-7000-8000-000000000001
url: "{{ .PUBLIC_URL }}/console"
logoUrl: "avatar:shape=rounded,variant=anonymous_entity,content=cube,colors=0,bg=#64be90"
logoUrl: "avatar:shape=rounded,variant=anonymous_entity,content=cube,colors=0"
authFlowId: 01900000-0000-7000-8000-000000000068
registrationFlowId: 01900000-0000-7000-8000-000000000069
isRegistrationFlowEnabled: false
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static/api/next/combined.yaml
static/api/next/postman/
static/data/releases.json
static/data/sdk-releases.json
static/docs/

# Misc
.DS_Store
Expand Down
58 changes: 7 additions & 51 deletions docs/content/getting-started/connect-your-application/android.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ Once it's running, the console is available at [https://localhost:8090/console](

3. Under **Application Type**, select **Mobile App**.
4. Enter a name (e.g. `My Android App`) and create an application. The rest of the settings can stay at their defaults.
5. Copy the **Client ID** from the **General** tab. You'll add the redirect URI in the next step after configuring your URL scheme.
5. Copy the **Application ID** from the **General** tab, under **Quick Copy**.

:::info App-Native Authentication
This quickstart uses app-native authentication through the Flow Execution API. The Android SDK renders the sign-in and sign-up forms natively in your app, so you only need the **Application ID**, no OAuth 2.0 Client ID and no redirect URI.
:::

## Create an Android App

Expand Down Expand Up @@ -102,48 +106,6 @@ implementation 'dev.thunderid:compose:0.1.0'
```
:::

## Configure a Callback URL Scheme

<ProductName /> redirects back to your app after sign-in and sign-out using a custom URL scheme. You need to register this scheme in two places.

**1. Register the scheme in your app**

Open `AndroidManifest.xml` and add an intent filter with your scheme to your launcher activity. Use `singleTask` launch mode so the redirect reuses the existing activity instance instead of creating a new one.

```xml title="AndroidManifest.xml" showLineNumbers
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="dev.thunderid.quickstart" />
</intent-filter>
</activity>
```

**2. Register the redirect URI in the <ProductName /> console**

In the console, open your registered application and add the following as an **Allowed Redirect URI**:

```text
dev.thunderid.quickstart://callback
```

Add the same value as an **Allowed Post-Logout Redirect URI**:

```text
dev.thunderid.quickstart://logout
```

## Initialize the SDK

Open your `MainActivity` and wrap the content you pass to `setContent` with the `ThunderIDProvider` composable. This provides `ThunderIDState` to all child composables through `LocalThunderID`.
Expand All @@ -167,10 +129,7 @@ class MainActivity : ComponentActivity() {
ThunderIDProvider(
config = ThunderIDConfig(
baseUrl = "https://localhost:8090",
clientId = "<your-client-id>",
scopes = listOf("openid", "profile", "email"),
afterSignInUrl = "dev.thunderid.quickstart://callback",
afterSignOutUrl = "dev.thunderid.quickstart://logout",
applicationId = "<your-application-id>"
)
) {
Expand All @@ -183,19 +142,16 @@ class MainActivity : ComponentActivity() {
```

:::warning Configuration
Replace `<your-client-id>` with the **Client ID** and `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
Replace `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
:::

### Configuration Parameters

| Parameter | Description |
|-----------|-------------|
| `baseUrl` | Your <ProductName /> instance URL. Must use HTTPS. |
| `clientId` | The Client ID from your <ProductName /> application |
| `scopes` | OAuth 2.0 scopes to request. Include `"openid"` at minimum. |
| `afterSignInUrl` | The redirect URI to return to after sign-in |
| `afterSignOutUrl` | The redirect URI to return to after sign-out |
| `applicationId` | The Application ID used for embedded (app-native) sign-in flows |
| `applicationId` | The Application ID used for the app-native sign-in and sign-up flows |

## Add Sign-In and Sign-Out

Expand Down
65 changes: 7 additions & 58 deletions docs/content/getting-started/connect-your-application/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ Once it's running, the console is available at [https://localhost:8090/console](

3. Under **Application Type**, select **Mobile App**.
4. Enter a name (e.g. `My Flutter App`) and create an application. The rest of the settings can stay at their defaults.
5. Copy the **Client ID** from the **General** tab. You'll add the redirect URI in the next step after configuring your URL scheme.
5. Copy the **Application ID** from the **General** tab, under **Quick Copy**.

:::info App-Native Authentication
This quickstart uses app-native authentication through the Flow Execution API. The Flutter SDK renders the sign-in and sign-up forms natively in your app, so you only need the **Application ID**, no OAuth 2.0 Client ID and no redirect URI.
:::

## Create a Flutter App

Expand Down Expand Up @@ -95,55 +99,6 @@ Then install it:
flutter pub get
```

## Configure a Callback URL Scheme

<ProductName /> redirects back to your app after sign-in and sign-out using a custom URL scheme. You need to register this scheme on both platforms.

### iOS

Open `ios/Runner/Info.plist` and add a URL scheme under **URL Types**:

```xml title="ios/Runner/Info.plist"
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>dev.thunderid.app</string>
</array>
</dict>
</array>
```

### Android

Open `android/app/src/main/AndroidManifest.xml` and add an intent filter inside your `<activity>` tag:

```xml title="android/app/src/main/AndroidManifest.xml"
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="dev.thunderid.app"
android:host="callback" />
</intent-filter>
```

### Register the URIs in the console

In the <ProductName /> console, open your registered application and add the following as an **Allowed Redirect URI**:

```text
dev.thunderid.app://callback
```

Add the same value as an **Allowed Post-Logout Redirect URI**:

```text
dev.thunderid.app://logout
```

## Initialize the SDK

Wrap your root widget with `ThunderIDProvider` in `lib/main.dart`:
Expand All @@ -157,10 +112,7 @@ void main() {
ThunderIDProvider(
config: ThunderIDConfig(
baseUrl: 'https://localhost:8090',
clientId: '<your-client-id>',
scopes: const ['openid', 'profile', 'email'],
afterSignInUrl: 'dev.thunderid.app://callback',
afterSignOutUrl: 'dev.thunderid.app://logout',
applicationId: '<your-application-id>',
),
child: const MyApp(),
Expand All @@ -181,19 +133,16 @@ class MyApp extends StatelessWidget {
```

:::warning Configuration
Replace `<your-client-id>` with the **Client ID** and `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
Replace `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
:::

### Configuration Parameters

| Parameter | Description |
|-----------|-------------|
| `baseUrl` | Your <ProductName /> instance URL. Must use HTTPS. |
| `clientId` | The Client ID from your <ProductName /> application |
| `scopes` | OAuth 2.0 scopes to request. Include `'openid'` at minimum. |
| `afterSignInUrl` | The redirect URI to return to after sign-in |
| `afterSignOutUrl` | The redirect URI to return to after sign-out |
| `applicationId` | The Application ID used for embedded (app-native) sign-in flows |
| `applicationId` | The Application ID used for the app-native sign-in and sign-up flows |

## Add Sign-In and Sign-Out

Expand Down
50 changes: 7 additions & 43 deletions docs/content/getting-started/connect-your-application/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ Once it's running, the console is available at [https://localhost:8090/console](

3. Under **Application Type**, select **Mobile App**.
4. Enter a name (e.g. `My iOS App`) and create an application. The rest of the settings can stay at their defaults.
5. Copy the **Client ID** from the **General** tab. You'll add the redirect URI in the next step after configuring your URL scheme.
5. Copy the **Application ID** from the **General** tab, under **Quick Copy**.

:::info App-Native Authentication
This quickstart uses app-native authentication through the Flow Execution API. The iOS SDK renders the sign-in and sign-up forms natively in your app, so you only need the **Application ID**, no OAuth 2.0 Client ID and no redirect URI.
:::

## Create an iOS App

Expand Down Expand Up @@ -93,40 +97,6 @@ pod 'ThunderIDSwiftUI'
```
:::

## Configure a Callback URL Scheme

<ProductName /> redirects back to your app after sign-in and sign-out using a custom URL scheme. You need to register this scheme in two places.

**1. Register the scheme in your app**

Open your app's `Info.plist` and add a URL scheme under **URL Types**. For example:

```xml
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>io.thunderid.b2c</string>
</array>
</dict>
</array>
```

**2. Register the redirect URI in the <ProductName /> console**

In the console, open your registered application and add the following as an **Allowed Redirect URI**:

```text
io.thunderid.b2c://callback
```

Add the same value as an **Allowed Post-Logout Redirect URI**:

```text
io.thunderid.b2c://logout
```

## Initialize the SDK

Open your app's entry point (the file that conforms to `App`) and apply the `.thunderIDProvider(config:)` modifier to your root view. This injects a `ThunderIDState` environment object into all child views.
Expand All @@ -142,10 +112,7 @@ struct MyApp: App {
ContentView()
.thunderIDProvider(config: ThunderIDConfig(
baseUrl: "https://localhost:8090",
clientId: "<your-client-id>",
scopes: ["openid", "profile", "email"],
afterSignInUrl: "io.thunderid.b2c://callback",
afterSignOutUrl: "io.thunderid.b2c://logout",
applicationId: "<your-application-id>"
))
}
Expand All @@ -154,19 +121,16 @@ struct MyApp: App {
```

:::warning Configuration
Replace `<your-client-id>` with the **Client ID** and `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
Replace `<your-application-id>` with the **Application ID** from your <ProductName /> application settings.
:::

### Configuration Parameters

| Parameter | Description |
|-----------|-------------|
| `baseUrl` | Your <ProductName /> instance URL. Must use HTTPS. |
| `clientId` | The Client ID from your <ProductName /> application |
| `scopes` | OAuth 2.0 scopes to request. Include `"openid"` at minimum. |
| `afterSignInUrl` | The redirect URI to return to after sign-in |
| `afterSignOutUrl` | The redirect URI to return to after sign-out |
| `applicationId` | The Application ID used for embedded (app-native) sign-in flows |
| `applicationId` | The Application ID used for the app-native sign-in and sign-up flows |

## Add Sign-In and Sign-Out

Expand Down
Loading
Loading