Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Managing Accounts

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/account-management.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Managing Accounts' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Managing Accounts' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/account-management.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/account-management.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Handling Push Notifications

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/handle-push-notifications.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Handling Push Notifications' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Handling Push Notifications' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/handle-push-notifications.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/handle-push-notifications.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Registering the Device

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/register-device.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Registering the Device' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Registering the Device' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/register-device.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/register-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Sending the Auth Response

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/send-auth-response.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Sending the Auth Response' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Sending the Auth Response' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/send-auth-response.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/send-auth-response.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Unregistering the Device

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/unregister-device.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Unregistering'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Unregistering'?", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/unregister-device.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "WARNING"}

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/unregister-device.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Unregistering the Device' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Unregistering the Device' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/unregister-device.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/unregister-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Updating the Device

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/apis/update-device.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Updating the Device' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Updating the Device' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/apis/update-device.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/apis/update-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Configuring Notification Handlers

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/guides/configure-notification-handlers.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Configuring Notification Handlers' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Configuring Notification Handlers' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/guides/configure-notification-handlers.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/guides/configure-notification-handlers.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Setting Up Push Providers

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/guides/set-up-push-providers.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Setting Up Push Providers' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Setting Up Push Providers' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/guides/set-up-push-providers.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/guides/set-up-push-providers.md" %}
5 changes: 5 additions & 0 deletions en/asgardeo/docs/sdks/flutter/push-authentication/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Overview
---
{% include "../../../../../includes/sdks/flutter/push-authentication/overview.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Builder Options

Check warning on line 3 in en/asgardeo/docs/sdks/flutter/push-authentication/references/builder-options.md

View workflow job for this annotation

GitHub Actions / Vale style check

[vale] reported by reviewdog 🐶 [WSO2-IAM.SentenceStyleTitles] 'Builder Options' should use sentence-style capitalization. Raw Output: {"message": "[WSO2-IAM.SentenceStyleTitles] 'Builder Options' should use sentence-style capitalization.", "location": {"path": "en/asgardeo/docs/sdks/flutter/push-authentication/references/builder-options.md", "range": {"start": {"line": 3, "column": 10}}}, "severity": "INFO"}
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/references/builder-options.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Custom Managers
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/references/custom-managers.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Error Handling
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/references/error-handling.md" %}
16 changes: 16 additions & 0 deletions en/asgardeo/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,22 @@ nav:
- Guides:
- Accessing Protected APIs: sdks/nextjs/guides/accessing-protected-apis.md
- Protecting Routes: sdks/nextjs/guides/protecting-routes.md
- Flutter Push Authentication Package:
- Overview: sdks/flutter/push-authentication/overview.md
- APIs:
- Registering the Device: sdks/flutter/push-authentication/apis/register-device.md
- Handling Push Notifications: sdks/flutter/push-authentication/apis/handle-push-notifications.md
- Sending the Auth Response: sdks/flutter/push-authentication/apis/send-auth-response.md
- Updating the Device: sdks/flutter/push-authentication/apis/update-device.md
- Unregistering the Device: sdks/flutter/push-authentication/apis/unregister-device.md
- Managing Accounts: sdks/flutter/push-authentication/apis/account-management.md
- References:
- Builder Options: sdks/flutter/push-authentication/references/builder-options.md
- Custom Managers: sdks/flutter/push-authentication/references/custom-managers.md
- Error Handling: sdks/flutter/push-authentication/references/error-handling.md
- Guides:
- Setting Up Push Providers: sdks/flutter/push-authentication/guides/set-up-push-providers.md
- Configuring Notification Handlers: sdks/flutter/push-authentication/guides/configure-notification-handlers.md
- Asgardeo MCP Server: sdks/asgardeo-mcp-server.md
- APIs:
- APIs - Overview: apis/index.md
Expand Down
6 changes: 6 additions & 0 deletions en/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ extra:
documentation_link: get-started/try-your-own-app/java-ee-saml/
download_link: https://github.com/asgardeo/asgardeo-tomcat-saml-agent/releases/latest/download/sample-app.war
source_link: https://github.com/asgardeo/asgardeo-tomcat-saml-agent
- name: Flutter Push Authentication Package
artifact_id: asgardeo_push_auth
icon: assets/img/logo/flutter-logo.svg
description: Flutter package for implementing push authentication with {{ product_name }}.
documentation_link: sdks/flutter/push-authentication/overview
source_link: https://github.com/asgardeo/flutter/tree/main/packages/push-authentication
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
- name: Android Mobile UI SDK
artifact_id: io.asgardeo:asgardeo-android
icon: assets/img/logo/android-logo.svg
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Managing Accounts
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/account-management.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Handling Push Notifications
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/handle-push-notifications.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Registering the Device
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/register-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Sending the Auth Response
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/send-auth-response.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Unregistering the Device
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/unregister-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Updating the Device
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/apis/update-device.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Configuring Notification Handlers
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/guides/configure-notification-handlers.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Setting Up Push Providers
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/guides/set-up-push-providers.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Overview
---
{% include "../../../../../../includes/sdks/flutter/push-authentication/overview.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Builder Options
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/references/builder-options.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Custom Managers
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/references/custom-managers.md" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
template: templates/sdk.html
heading: Error Handling
---
{% include "../../../../../../../includes/sdks/flutter/push-authentication/references/error-handling.md" %}
16 changes: 16 additions & 0 deletions en/identity-server/next/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,22 @@ nav:
- Guides:
- Accessing Protected APIs: sdks/nextjs/guides/accessing-protected-apis.md
- Protecting Routes: sdks/nextjs/guides/protecting-routes.md
- Flutter Push Authentication Package:
- Overview: sdks/flutter/push-authentication/overview.md
- APIs:
- Registering the Device: sdks/flutter/push-authentication/apis/register-device.md
- Handling Push Notifications: sdks/flutter/push-authentication/apis/handle-push-notifications.md
- Sending the Auth Response: sdks/flutter/push-authentication/apis/send-auth-response.md
- Updating the Device: sdks/flutter/push-authentication/apis/update-device.md
- Unregistering the Device: sdks/flutter/push-authentication/apis/unregister-device.md
- Managing Accounts: sdks/flutter/push-authentication/apis/account-management.md
- References:
- Builder Options: sdks/flutter/push-authentication/references/builder-options.md
- Custom Managers: sdks/flutter/push-authentication/references/custom-managers.md
- Error Handling: sdks/flutter/push-authentication/references/error-handling.md
- Guides:
- Setting Up Push Providers: sdks/flutter/push-authentication/guides/set-up-push-providers.md
- Configuring Notification Handlers: sdks/flutter/push-authentication/guides/configure-notification-handlers.md
- Connectors:
- Connectors: connectors/index.md
- Sift:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
After registration, the SDK keeps a local record of every enrolled account. The account-management APIs let you list and look up these accounts and read each account's push authentication history.

All operations are accessed through the `AsgardeoPushAuth.instance` singleton.

## getAccounts()

Returns all locally registered accounts.

```dart
Future<List<PushAuthAccount>> getAccounts()
```

```dart title="List all registered accounts"
final accounts = await AsgardeoPushAuth.instance.getAccounts();
for (final account in accounts) {
print('${account.username} @ ${account.organizationName ?? account.tenantDomain}');
}
```

## getAccount()

Returns a single account by its local identifier, or `null` if not found.

```dart
Future<PushAuthAccount?> getAccount(String accountId)
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `accountId` | `String` | ✅ | Local identifier of the account to look up |

```dart title="Look up an account by local ID"
final account = await AsgardeoPushAuth.instance.getAccount(accountId);
```

## getAccountByDeviceId()

Returns a single account by the server-assigned device identifier, or `null` if not found.

```dart
Future<PushAuthAccount?> getAccountByDeviceId(String deviceId)
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `deviceId` | `String` | ✅ | Device identifier assigned by {{product_name}} during registration |

```dart title="Look up an account by device ID"
final account = await AsgardeoPushAuth.instance.getAccountByDeviceId(deviceId);
```

## getAuthHistory()

Returns the push authentication history for a given account.

```dart
Future<List<PushAuthRecord>> getAuthHistory(String accountId)
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `accountId` | `String` | ✅ | Local identifier of the account whose history to retrieve |

```dart title="Read push authentication history"
final records = await AsgardeoPushAuth.instance.getAuthHistory(accountId);
for (final record in records) {
print('${record.applicationName} — ${record.status}');
}
```

## PushAuthAccount fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | `String` | Local account identifier |
| `username` | `String` | Username associated with the account |
| `displayName` | `String` | Display name for the account |
| `deviceId` | `String` | Device identifier assigned by the server |
| `host` | `String` | {{product_name}} server host URL |
| `tenantDomain` | `String?` | Tenant domain of the root organization user |
| `organizationId` | `String?` | Sub-organization identifier, if applicable |
| `organizationName` | `String?` | Sub-organization name, if applicable |
| `userStoreDomain` | `String?` | User store domain |

## PushAuthRecord fields

| Field | Type | Description |
|-------|------|-------------|
| `pushAuthId` | `String` | Unique identifier of the push authentication request |
| `applicationName` | `String` | Application that requested authentication |
| `status` | `String` | `APPROVED` or `DENIED` |
| `respondedTime` | `int` | Epoch-millisecond timestamp when the response was sent |
| `ipAddress` | `String` | IP address from which the login attempt originated |
| `deviceOS` | `String` | OS of the requesting device |
| `browser` | `String` | Browser or client that initiated the login |
| `accountId` | `String` | Local ID of the account that handled the request |
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
When {{product_name}} sends a push authentication request, your app receives a raw notification payload through FCM or APNs. The SDK provides a single helper to convert that payload into a typed request your code can act on.

For details on wiring up FCM and APNs handlers in your app, see the [Configure Notification Handlers]({{base_path}}/sdks/flutter/push-authentication/guides/configure-notification-handlers/) guide.

## parsePushNotification()

Converts a raw push notification payload into a typed `PushAuthRequest`. Returns `null` for notifications that did not originate from {{product_name}}, making it safe to call inside any shared notification handler.

```dart
PushAuthRequest? parsePushNotification(
Map<String, dynamic> data, {
int? sentTime,
})
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | `Map<String, dynamic>` | ✅ | Raw notification payload (`message.data` from FCM, or the APNs userInfo map) |
| `sentTime` | `int?` | ❌ | Epoch-millisecond timestamp when the notification was sent |

```dart title="Parse a push notification"
final request = AsgardeoPushAuth.instance.parsePushNotification(
message.data,
sentTime: message.sentTime?.millisecondsSinceEpoch,
);

if (request != null) {
// Present the auth request to the user.
}
```

## PushAuthRequest fields

| Field | Type | Description |
|-------|------|-------------|
| `pushId` | `String` | Unique identifier for this push authentication request |
| `challenge` | `String` | Server-issued challenge string |
| `numberChallenge` | `String?` | Optional number for number-matching flows |
| `relativePath` | `String?` | Resolved relative path for the authentication endpoint |
| `deviceId` | `String` | Device identifier this notification targets |
| `username` | `String` | Username of the authenticating user |
| `tenantDomain` | `String` | Tenant domain of the user's organization |
| `organizationId` | `String?` | Sub-organization identifier, if applicable |
| `organizationName` | `String?` | Sub-organization name, if applicable |
| `userStoreDomain` | `String` | User store domain |
| `applicationName` | `String` | Name of the application requesting authentication |
| `notificationScenario` | `String` | Scenario type (e.g., `AUTHENTICATION`) |
| `ipAddress` | `String` | IP address from which the login attempt originated |
| `deviceOS` | `String` | OS of the requesting device |
| `browser` | `String` | Browser or client that initiated the login |
| `sentTime` | `int` | Epoch-millisecond timestamp when the notification was sent |
Loading
Loading