From 0c9db1cbc61c8f8d2019991174235d3f95cb3f26 Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Sun, 26 Jan 2025 12:29:53 +0800 Subject: [PATCH] chore: add heading ids --- .../quick-starts/framework/flutter/README.mdx | 20 +++++++++---------- .../framework/flutter/_api-resources.mdx | 4 ++-- .../framework/flutter/_dependency.mdx | 10 +++++----- .../framework/flutter/_for-tutorial.mdx | 6 +++--- .../framework/flutter/_get-user-info.mdx | 6 +++--- .../framework/flutter/_integration.mdx | 8 ++++---- .../framework/flutter/_organization.mdx | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/quick-starts/framework/flutter/README.mdx b/docs/quick-starts/framework/flutter/README.mdx index c522a39731d..8610a3bbc11 100644 --- a/docs/quick-starts/framework/flutter/README.mdx +++ b/docs/quick-starts/framework/flutter/README.mdx @@ -25,35 +25,35 @@ This tutorial will show you how to integrate Logto into your Flutter application -## Prerequisites +## Prerequisites \{#prerequisites} - A [Logto Cloud](https://cloud.logto.io) account or a [self-hosted Logto](/introduction/set-up-logto-oss). - A Logto native application created. - A Flutter or Dart development environment. -## Installation +## Installation \{#installation} -## Set up +## Set up \{#set-up} -## Integration +## Integration \{#integration} -## Get user information +## Get user information \{#get-user-information} -## API resources and organizations +## API resources and organizations \{#api-resources-and-organizations} -## Migration guide +## Migration guide \{#migration-guide} If you are migration from a previous version of Logto Dart SDK, version < 3.0.0: @@ -77,9 +77,9 @@ If you are migration from a previous version of Logto Dart SDK, version < 3.0.0: await logtoClient.signOut(redirectUri); ``` -## Troubleshooting +## Troubleshooting \{#troubleshooting} -### Troubleshooting Android +### Troubleshooting Android \{#troubleshooting-android} - You will need to update your AndroidManifest.xml to include the `com.linusu.flutter_web_auth_2.CallbackActivity` activity, something like: @@ -118,6 +118,6 @@ If you are migration from a previous version of Logto Dart SDK, version < 3.0.0: /> ``` -## Further readings +## Further readings \{#further-readings} diff --git a/docs/quick-starts/framework/flutter/_api-resources.mdx b/docs/quick-starts/framework/flutter/_api-resources.mdx index 0f505fe1d41..96b2d5868c2 100644 --- a/docs/quick-starts/framework/flutter/_api-resources.mdx +++ b/docs/quick-starts/framework/flutter/_api-resources.mdx @@ -9,7 +9,7 @@ import ConfigResourcesWithSharedScopesCode from './code-snippets/_resource-with- -### Configure Logto client +### Configure Logto client \{#configure-logto-client} } @@ -17,7 +17,7 @@ import ConfigResourcesWithSharedScopesCode from './code-snippets/_resource-with- configResourcesWithSharedScopesCode={} /> -### Fetch access token for the API resource +### Fetch access token for the API resource \{#fetch-access-token-for-the-api-resource} = 2.0.0 < 3.0.0 | >= 3.0.0 | true | | >= 3.0.0 | >= 3.6.0 | true | -### flutter_secure_storage set up +### flutter_secure_storage set up \{#flutter_secure_storage-set-up} Under the hood, this SDK uses [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) to implement the cross-platform persistent secure token storage. - Keychain is used for iOS - AES encryption is used for Android. -#### Config Android version +#### Config Android version \{#config-android-version} Set the android:minSdkVersion to `>= 18` in your project's `android/app/build.gradle` file. @@ -29,7 +29,7 @@ Set the android:minSdkVersion to `>= 18` in your project's `android/app/build.gr } ``` -#### Disable auto backup on Android +#### Disable auto backup on Android \{#disable-auto-backup-on-android} By default Android backups data on Google Drive. It can cause exception `java.security.InvalidKeyException:Failed` to unwrap key. To avoid this, @@ -73,7 +73,7 @@ By default Android backups data on Google Drive. It can cause exception `java.se Please check [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage#configure-android-version) for more details. -### flutter_web_auth_2 set up +### flutter_web_auth_2 set up \{#flutter_web_auth_2-set-up} Behind the scenes, this SDK uses [flutter_web_auth_2](https://pub.dev/packages/flutter_web_auth_2) to authenticate users with Logto. This package provides a simple way to authenticate users with Logto using the system webview or browser. diff --git a/docs/quick-starts/framework/flutter/_for-tutorial.mdx b/docs/quick-starts/framework/flutter/_for-tutorial.mdx index 39e0a34678f..f0f44572ee8 100644 --- a/docs/quick-starts/framework/flutter/_for-tutorial.mdx +++ b/docs/quick-starts/framework/flutter/_for-tutorial.mdx @@ -5,14 +5,14 @@ import FlutterIntegrationTip from './_tip.md'; -## Installation +## Installation \{#installation} -## Dependency and configurations +## Dependency and configurations \{#dependency-and-configurations} -## Integration +## Integration \{#integration} diff --git a/docs/quick-starts/framework/flutter/_get-user-info.mdx b/docs/quick-starts/framework/flutter/_get-user-info.mdx index f518ab46b74..b0eabfaae87 100644 --- a/docs/quick-starts/framework/flutter/_get-user-info.mdx +++ b/docs/quick-starts/framework/flutter/_get-user-info.mdx @@ -7,13 +7,13 @@ import DisplayUserInfo from './code-snippets/_display-userinfo.md'; import FetchUserInfo from './code-snippets/_fetch-userinfo.md'; import ScopesAndClaimsCode from './code-snippets/_scopes-code.mdx'; -### Display user information +### Display user information \{#display-user-information} To display the user's information, you can use the `logtoClient.idTokenClaims` getter. For example, in a Flutter app: -### Request additional claims +### Request additional claims \{#request-additional-claims} @@ -29,6 +29,6 @@ To request additional scopes, you can pass the scopes to the `LogtoConfig` objec codeSnippet={} /> -### Scopes and claims +### Scopes and claims \{#scopes-and-claims} diff --git a/docs/quick-starts/framework/flutter/_integration.mdx b/docs/quick-starts/framework/flutter/_integration.mdx index 76d39a44a43..ce561d85653 100644 --- a/docs/quick-starts/framework/flutter/_integration.mdx +++ b/docs/quick-starts/framework/flutter/_integration.mdx @@ -5,7 +5,7 @@ import ConfigurePostSignOutRedirectUri from '../../fragments/_configure-post-sig import ConfigureRedirectUri from '../../fragments/_configure-redirect-uri.mdx'; import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx'; -### Init LogtoClient +### Init LogtoClient \{#init-logtoclient} Import the `logto_dart_sdk` package and initialize the `LogtoClient` instance at the root of your application. @@ -71,7 +71,7 @@ class _MyHomePageState extends State { } ``` -### Implement sign-in +### Implement sign-in \{#implement-sign-in} @@ -121,7 +121,7 @@ class _MyHomePageState extends State { } ``` -### Implement sign-out +### Implement sign-out \{#implement-sign-out} { } ``` -### Handle authentication status +### Handle authentication status \{#handle-authentication-status} Logto SDK provides an asynchronous method to check the authentication status. The method is `logtoClient.isAuthenticated`. The method returns a boolean value, `true` if the user is authenticated, otherwise `false`. diff --git a/docs/quick-starts/framework/flutter/_organization.mdx b/docs/quick-starts/framework/flutter/_organization.mdx index ebe24c3f811..3e8a87c5872 100644 --- a/docs/quick-starts/framework/flutter/_organization.mdx +++ b/docs/quick-starts/framework/flutter/_organization.mdx @@ -3,7 +3,7 @@ import FetchOrganizationTokenForUser from '../../fragments/_fetch-organization-t import GetOrganizationAccessTokenCode from './code-snippets/_get-organization-access-token.md'; import ConfigOrganizationCode from './code-snippets/_organization-config-code.md'; -### Fetch access token for organizations +### Fetch access token for organizations \{#fetch-access-token-for-organizations} Just like API resources, you may also request for a access token for organizations. This is useful when you need to access resources that are defined using the organization scope instead of the API resource scope.