diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 1daac70fe31..d12da9c5917 100644
--- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -5,7 +5,7 @@ sidebar_custom_props:
description: Android-Integrationsanleitung.
language: kotlin/java
official_link: https://developer.android.com
-app_type: Native app
+app_type: Native App
framework: Android
---
@@ -31,7 +31,7 @@ import ConfigApiResources from './api-resources/_config-api-resources.mdx';
import FetchAccessTokenForApiResources from './api-resources/_fetch-access-token-for-api-resources.mdx';
import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-token-for-user.mdx';
-# Authentifizierung zu deiner Android (Kotlin/Java)-Anwendung hinzufügen
+# Authentifizierung zu deiner Android (Kotlin/Java)-Anwendung hinzufügen (Add authentication to your Android (Kotlin/Java) application)
Diese Anleitung zeigt dir, wie du Logto in deine Android-Anwendung integrierst.
@@ -39,9 +39,9 @@ Diese Anleitung zeigt dir, wie du Logto in deine Android-Anwendung integrierst.
## Voraussetzungen \{#prerequisites}
-- Ein [Logto Cloud](https://cloud.logto.io)-Konto oder ein [selbst gehostetes Logto](/introduction/set-up-logto-oss).
-- Eine Logto-native Anwendung erstellt.
-- Ein Kotlin-Android-Anwendungsprojekt.
+- Ein [Logto Cloud](https://cloud.logto.io)-Konto oder eine [selbst gehostete Logto](/introduction/set-up-logto-oss).
+- Eine erstellte Logto Native-Anwendung.
+- Ein Kotlin Android-Anwendungsprojekt.
## Installation \{#installation}
@@ -64,16 +64,16 @@ Diese Anleitung zeigt dir, wie du Logto in deine Android-Anwendung integrierst.
In Android folgt die Redirect-URI dem Muster: `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
-- Das `LOGTO_REDIRECT_SCHEME` sollte ein benutzerdefiniertes Schema im umgekehrten Domain-Format sein.
+- Das `LOGTO_REDIRECT_SCHEME` sollte ein benutzerdefiniertes Schema im Reverse-Domain-Format sein.
- Das `YOUR_APP_PACKAGE` ist der Paketname deiner App.
-Angenommen, du behandelst `io.logto.android` als das benutzerdefinierte `LOGTO_REDIRECT_SCHEME` und `io.logto.sample` ist dein App-Paketname, sollte die Redirect-URI `io.logto.android://io.logto.sample/callback` sein.
+Angenommen, du verwendest `io.logto.android` als benutzerdefiniertes `LOGTO_REDIRECT_SCHEME` und `io.logto.sample` ist dein App-Paketname, dann sollte die Redirect-URI `io.logto.android://io.logto.sample/callback` lauten.
-
+
-In v3 öffnet sich die Anmeldeerfahrung in einem [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (dem Systembrowser), und die Weiterleitung wird über einen Intent-Filter auf Betriebssystemebene zurück zu deiner App geleitet. Du musst das Schema deiner Redirect-URI mit dem Manifest-Platzhalter `logtoRedirectScheme` in der Build-Datei deiner App deklarieren:
+In v3 öffnet sich die Anmeldeerfahrung in einem [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (dem Systembrowser), und die Weiterleitung wird über einen OS-Level Intent-Filter zurück zu deiner App geleitet. Du musst das Schema deiner Redirect-URI mit dem Manifest-Platzhalter `logtoRedirectScheme` in der Build-Datei deiner App deklarieren:
@@ -103,13 +103,13 @@ android {
-Zusätzlich erzwingt v3 das Redirect-URI-Muster durch Android's Intent-Filter-Matching, sodass eine Redirect-URI, die vom Muster abweicht, niemals an deine App zugestellt wird:
+Zusätzlich erzwingt v3 das Redirect-URI-Muster durch das Intent-Filter-Matching von Android, sodass eine Redirect-URI, die vom Muster abweicht, niemals an deine App übergeben wird:
- Das Schema muss dem Manifest-Platzhalter `logtoRedirectScheme` entsprechen.
- Der Host muss deine `applicationId` sein.
- Der Pfad muss `/callback` sein.
-Halte das Schema und den Host in Kleinbuchstaben, da Intent-Filter-Matching zwischen Groß- und Kleinschreibung unterscheidet und Browser das Schema in Kleinbuchstaben umwandeln.
+Halte das Schema und den Host kleingeschrieben, da das Intent-Filter-Matching zwischen Groß- und Kleinschreibung unterscheidet und Browser das Schema kleinschreiben.
@@ -119,18 +119,18 @@ Halte das Schema und den Host in Kleinbuchstaben, da Intent-Filter-Matching zwis
-Um [Android App Links](https://developer.android.com/training/app-links) (eine `https`-Redirect-URI auf einer Domain, die du besitzt) statt des benutzerdefinierten Schemas zu verwenden:
+Um [Android App Links](https://developer.android.com/training/app-links) (eine `https`-Redirect-URI auf einer eigenen Domain) statt des benutzerdefinierten Schemas zu verwenden:
-1. Hoste die [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started)-Datei unter `https://your.domain/.well-known/assetlinks.json`, indem du deine Anwendungs-ID und die SHA-256-Fingerprints deiner Signaturzertifikate angibst. Wenn du mit Play App Signing veröffentlichst, findest du den Release-Fingerprint in der Play Console unter **Setup** > **App signing**. Die Datei muss als `Content-Type: application/json` mit HTTP 200 und ohne Weiterleitungen bereitgestellt werden.
+1. Hoste die [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started)-Datei unter `https://your.domain/.well-known/assetlinks.json`, in der deine Application ID und die SHA-256-Fingerabdrücke deiner Signaturzertifikate deklariert werden. Beim Veröffentlichen mit Play App Signing findest du den Release-Fingerabdruck in der Play Console unter **Setup** > **App signing**. Die Datei muss als `Content-Type: application/json` mit HTTP 200 und ohne Weiterleitungen bereitgestellt werden.
-2. Deklariere den App Links Intent-Filter auf der Redirect-Receiver-Aktivität des SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` in deiner `AndroidManifest.xml`-Datei. Wenn du das benutzerdefinierte Schema überhaupt nicht verwendest, entferne den eingebauten Filter des SDK mit `tools:node="removeAll"`, und der Manifest-Platzhalter `logtoRedirectScheme` ist dann nicht mehr erforderlich:
+2. Deklariere den App Links Intent-Filter auf der Redirect-Receiver-Activity des SDKs `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` in deiner `AndroidManifest.xml`-Datei. Wenn du das benutzerdefinierte Schema gar nicht verwendest, entferne den eingebauten Filter des SDKs mit `tools:node="removeAll"`, und der Manifest-Platzhalter `logtoRedirectScheme` ist dann nicht mehr erforderlich:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ Um [Android App Links](https://developer.android.com/training/app-links) (eine `
```
-3. Füge `https://your.domain/callback` als Redirect-URI (und, falls sie für die Abmeldung verwendet wird, als Post-Abmelde-Redirect-URI) auf der Anwendungsdetailseite der Logto Console hinzu und übergebe sie an `signIn` / `signOut`.
+3. Füge `https://your.domain/callback` als Redirect-URI (und, falls für Sign-out verwendet, als Post-Sign-out-Redirect-URI) auf der Anwendungsdetailseite der Logto Console hinzu und übergebe sie an `signIn` / `signOut`.
-Beachte, dass der Callback jetzt eine echte URL auf deiner Domain ist, also stelle dort eine Fallback-Seite bereit (z. B. einen „Zurück zur App"-Button) für Browser, die App Links bei einer Server-Weiterleitung nicht starten. Der Button muss nur auf die aktuelle URL verlinken (z. B. `href` auf `window.location.href` setzen): Die Autorisierungsparameter befinden sich im Query-String, und ein benutzerinitierter Klick gibt der gleichen URL eine weitere Chance, zu deiner App weitergeleitet zu werden. Auf Android 12+ öffnet eine nicht verifizierte Domain niemals die App, sodass eine fehlerhafte `assetlinks.json` stillschweigend fehlschlägt. Du kannst den Verifikationsstatus mit `adb shell pm get-app-links ` überprüfen.
+Beachte, dass der Callback jetzt eine echte URL auf deiner Domain ist, daher solltest du dort eine Fallback-Seite bereitstellen (z. B. einen "Zurück zur App"-Button) für Browser, die App Links bei einer Server-Weiterleitung nicht öffnen. Der Button muss nur auf die aktuelle URL verlinken (z. B. `href` auf `window.location.href` setzen): Die Autorisierungsparameter befinden sich in der Query-String, und ein vom Benutzer ausgelöster Klick gibt derselben URL eine weitere Chance, zu deiner App weitergeleitet zu werden. Ab Android 12+ öffnet eine nicht verifizierte Domain die App nie, daher schlägt ein fehlerhaftes `assetlinks.json` stillschweigend fehl. Du kannst den Verifizierungsstatus mit `adb shell pm get-app-links ` prüfen.
@@ -153,13 +153,13 @@ Beachte, dass der Callback jetzt eine echte URL auf deiner Domain ist, also stel
-Es ist keine zusätzliche Konfiguration erforderlich. Die Anmeldeerfahrung öffnet sich in einer eingebetteten WebView, und das SDK fängt die Weiterleitung innerhalb der WebView ab.
+Keine zusätzliche Einrichtung erforderlich. Die Anmeldeerfahrung öffnet sich in einer eingebetteten WebView, und das SDK fängt die Weiterleitung innerhalb der WebView ab.
-### Anmeldung und Abmeldung implementieren \{#implement-sign-in-and-sign-out}
+### Sign-in und Sign-out implementieren \{#implement-sign-in-and-sign-out}
@@ -169,13 +169,13 @@ Es ist keine zusätzliche Konfiguration erforderlich. Die Anmeldeerfahrung öffn
### Benutzerinformationen anzeigen \{#display-user-information}
-Um die Informationen des Benutzers anzuzeigen, kannst du die Methode `logtoClient.getIdTokenClaims()` verwenden. Zum Beispiel kannst du Benutzerinformationen in einem ViewModel abrufen und dann in deiner Aktivität anzeigen:
+Um die Informationen des Benutzers anzuzeigen, kannst du die Methode `logtoClient.getIdTokenClaims()` verwenden. Zum Beispiel kannst du Benutzerinformationen in einem ViewModel abrufen und dann in deiner Activity anzeigen:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...andere Codes
- // Füge ein Live-Daten-Objekt hinzu, um die ID-Token-Ansprüche zu beobachten
+ // Füge ein LiveData hinzu, um die ID-Token-Ansprüche zu beobachten
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -194,7 +194,7 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...andere Codes
- // Angenommen, du hast eine Textansicht mit der ID `user_info_text_view` in deinem Layout
+ // Angenommen, du hast eine TextView mit der ID `user_info_text_view` in deinem Layout
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -231,7 +231,7 @@ Dann kannst du auf die zusätzlichen Ansprüche im Rückgabewert von `logtoClien
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// Jetzt kannst du auf zusätzliche Ansprüche `claims.email`, `claims.phone`, etc. zugreifen.
+// Jetzt kannst du auf zusätzliche Ansprüche wie `claims.email`, `claims.phone` usw. zugreifen.
```
>{`logtoClient.fetchUserInfo {_, userInfoResponse ->
println("UserInfoResponse:$userInfoResponse")
}
-// Jetzt kannst du auf den Anspruch \`userInfo.custom_data\` zugreifen`}
+// Jetzt kannst du auf den Anspruch \`userInfo.custom_data\` zugreifen.`}
}
/>
@@ -264,10 +264,10 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### Organisationstokens abrufen \{#fetch-organization-tokens}
+### Organisationstoken abrufen \{#fetch-organization-tokens}
-## Weiterführende Lektüre \{#further-readings}
+## Weiterführende Literatur \{#further-readings}
diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index 66938a0ce81..df214310592 100644
--- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -9,18 +9,18 @@ Du kannst `logtoClient.signIn` verwenden, um den Benutzer anzumelden, und `logto
-
+
-In v3 führt `logtoClient.signOut` eine vollständige Abmeldung durch: Es löscht die lokalen Anmeldeinformationen, widerruft den Refresh-Token und beendet die Logto-Sitzung, indem es den End-Session-Endpunkt im Browser öffnet. Der Browser navigiert dann über die Post-Abmelde-Redirect-URI zurück zu deiner App. Bevor du es verwendest, wechsle zur Anwendungsdetailseite der Logto Console, füge die Post-Abmelde-Redirect-URI `io.logto.android://io.logto.sample/callback` hinzu und klicke auf „Änderungen speichern". Die Post-Abmelde-Redirect-URI folgt dem gleichen Muster wie die Redirect-URI, und ihr Schema muss ebenfalls dem Manifest-Platzhalter `logtoRedirectScheme` entsprechen.
+In v3 führt `logtoClient.signOut` eine vollständige Abmeldung durch: Es werden die lokalen Anmeldedaten gelöscht, das Auffrischungstoken widerrufen und die Logto-Sitzung beendet, indem der End-Session-Endpunkt im Browser geöffnet wird. Der Browser navigiert dann über die Post-Sign-Out-Redirect-URI zurück zu deiner App. Bevor du dies verwendest, wechsle zur Anwendungsdetailseite der Logto Console, füge die Post-Sign-Out-Redirect-URI `io.logto.android://io.logto.sample/callback` hinzu und klicke auf „Änderungen speichern“. Die Post-Sign-Out-Redirect-URI folgt demselben Muster wie die Redirect-URI, und ihr Schema muss ebenfalls mit dem Manifest-Platzhalter `logtoRedirectScheme` übereinstimmen.
Zum Beispiel in einer Android-App:
```kotlin title="LogtoModelView.kt"
-//...mit anderen Imports
+//...mit weiteren Imports
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
- // ...andere Codes
+ // ...weitere Codes
- // Füge ein Live-Datenobjekt hinzu, um den Authentifizierungsstatus zu beobachten
+ // Füge ein LiveData hinzu, um den Authentifizierungsstatus zu beobachten
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -28,7 +28,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Aktualisiere die Live-Daten
+ // Aktualisiere das LiveData
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -36,19 +36,19 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut(context: Activity) {
logtoClient.signOut(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Aktualisiere die Live-Daten
+ // Aktualisiere das LiveData
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-Rufe dann die Methoden `signIn` und `signOut` in deiner Aktivität auf:
+Rufe dann die Methoden `signIn` und `signOut` in deiner Activity auf:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
- //...andere Codes
+ //...weitere Codes
// Angenommen, du hast einen Button mit der ID "sign_in_button" in deinem Layout
val signInButton = findViewById(R.id.sign_in_button)
@@ -59,12 +59,12 @@ class MainActivity : AppCompatActivity() {
// Angenommen, du hast einen Button mit der ID "sign_out_button" in deinem Layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // Überprüfe, ob der Benutzer authentifiziert ist
+ if (logtoViewModel.authenticated) { // Prüfe, ob der Benutzer authentifiziert ist
logtoViewModel.signOut(this)
}
}
- // Beobachte den Authentifizierungsstatus, um die Benutzeroberfläche zu aktualisieren
+ // Beobachte den Authentifizierungsstatus, um die UI zu aktualisieren
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// Der Benutzer ist authentifiziert
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- Du kannst `logtoClient.signOut(context)` auch ohne eine Post-Abmelde-Redirect-URI aufrufen. In diesem Fall ist keine Console-Konfiguration erforderlich: Der Browser zeigt die Logto-Abmeldeseite an, und der Benutzer kehrt zur App zurück, indem er sie manuell schließt.
-- Wenn kein UI-Kontext verfügbar ist, kannst du `logtoClient.clearCredentials` aufrufen, um die lokalen Anmeldeinformationen zu löschen und den Refresh-Token zu widerrufen. Beachte, dass die Logto-Sitzung im Browser dadurch erhalten bleibt, sodass das nächste `signIn` den Benutzer möglicherweise stillschweigend über diese Sitzung erneut anmeldet.
+- Du kannst auch `logtoClient.signOut(context)` ohne eine Post-Sign-Out-Redirect-URI aufrufen. In diesem Fall ist keine Console-Konfiguration erforderlich: Der Browser zeigt die Logto-Abmeldeseite an, und der Benutzer kehrt durch manuelles Schließen zur App zurück.
+- Wenn kein UI-Kontext verfügbar ist, kannst du `logtoClient.clearCredentials` aufrufen, um die lokalen Anmeldedaten zu löschen und das Auffrischungstoken zu widerrufen. Beachte, dass dadurch die Logto-Sitzung im Browser bestehen bleibt, sodass der nächste `signIn` den Benutzer möglicherweise stillschweigend über diese Sitzung erneut anmeldet.
:::
@@ -95,11 +95,11 @@ class MainActivity : AppCompatActivity() {
Zum Beispiel in einer Android-App:
```kotlin title="LogtoModelView.kt"
-//...mit anderen Imports
+//...mit weiteren Imports
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
- // ...andere Codes
+ // ...weitere Codes
- // Füge ein Live-Datenobjekt hinzu, um den Authentifizierungsstatus zu beobachten
+ // Füge ein LiveData hinzu, um den Authentifizierungsstatus zu beobachten
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -107,7 +107,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Aktualisiere die Live-Daten
+ // Aktualisiere das LiveData
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -115,19 +115,19 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut() {
logtoClient.signOut { logtoException ->
logtoException?.let { println(it) }
- // Aktualisiere die Live-Daten
+ // Aktualisiere das LiveData
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-Rufe dann die Methoden `signIn` und `signOut` in deiner Aktivität auf:
+Rufe dann die Methoden `signIn` und `signOut` in deiner Activity auf:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
- //...andere Codes
+ //...weitere Codes
// Angenommen, du hast einen Button mit der ID "sign_in_button" in deinem Layout
val signInButton = findViewById(R.id.sign_in_button)
@@ -138,12 +138,12 @@ class MainActivity : AppCompatActivity() {
// Angenommen, du hast einen Button mit der ID "sign_out_button" in deinem Layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // Überprüfe, ob der Benutzer authentifiziert ist
+ if (logtoViewModel.authenticated) { // Prüfe, ob der Benutzer authentifiziert ist
logtoViewModel.signOut()
}
}
- // Beobachte den Authentifizierungsstatus, um die Benutzeroberfläche zu aktualisieren
+ // Beobachte den Authentifizierungsstatus, um die UI zu aktualisieren
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// Der Benutzer ist authentifiziert
diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index eb73bb7c5fa..6046a5c33f3 100644
--- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,15 +2,15 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Die minimal unterstützte Android API-Ebene des Logto Android SDK ist Ebene 24.
+Die minimal unterstützte Android API-Stufe des Logto Android SDK ist Stufe 24.
:::
Das Logto Android SDK ist in zwei Hauptversionen erhältlich:
-- **v3 (beta)**: Öffnet die Anmeldeerfahrung in [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (dem Systembrowser), was die Passkey-Anmeldung ermöglicht und die Browsersitzung teilt. Beachte, dass v3 die Unterstützung für die WeChat (Native) - und Alipay (Native) -Connectoren entfernt; du kannst stattdessen WeChat (Web) und Alipay (Web) verwenden, die über den Browser funktionieren. Wenn du von den nativen Connectoren abhängig bist, bleibe bei v2.
-- **v2**: Öffnet die Anmeldeerfahrung in einer eingebetteten WebView, die für die nativen Social-Connectoren erforderlich ist, unterstützt jedoch keine Passkey-Anmeldung (WebView unterstützt kein WebAuthn, den zugrundeliegenden Standard von Passkeys).
+- **v3**: Öffnet die Anmeldeerfahrung in [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (dem Systembrowser), was Passkey-Anmeldung ermöglicht und die Browsersitzung teilt. Beachte, dass v3 die Unterstützung für die WeChat (Native) und Alipay (Native) Connectors entfernt; du kannst stattdessen WeChat (Web) und Alipay (Web) verwenden, die über den Browser funktionieren. Wenn du auf die nativen Connectors angewiesen bist, bleibe bei v2.
+- **v2**: Öffnet die Anmeldeerfahrung in einer eingebetteten WebView, was für die nativen Social Connectors erforderlich ist, aber keine Passkey-Anmeldung unterstützt (WebView unterstützt WebAuthn, den zugrunde liegenden Standard von Passkeys, nicht).
-Diese Anleitung deckt beide Versionen ab. Wähle deine Version in den Tabs unten, und die Auswahl bleibt in dieser Anleitung synchronisiert.
+Diese Anleitung behandelt beide Versionen. Wähle deine Version in den untenstehenden Tabs aus; die Auswahl bleibt während dieser Anleitung synchronisiert.
Bevor du das Logto Android SDK installierst, stelle sicher, dass `mavenCentral()` zu deiner Repository-Konfiguration in der Gradle-Projekt-Build-Datei hinzugefügt wurde:
@@ -26,9 +26,9 @@ Füge das Logto Android SDK zu deinen Abhängigkeiten hinzu:
-
+
-v3 wird als `3.0.0-beta`-Vorabversionen bis zum GA-Release veröffentlicht. Verwende die neueste Vorabversion als Version:
+Verwende die neueste v3-Version als Version:
@@ -36,7 +36,7 @@ v3 wird als `3.0.0-beta`-Vorabversionen bis zum GA-Release veröffentlicht. Verw
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -93,9 +93,9 @@ Da das SDK Internetzugang benötigt, musst du die folgende Berechtigung zu deine
-
+
-
+
```
diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..a919de71352 100644
--- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,47 +2,49 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+Die minimal unterstützte iOS-Version des Logto Swift SDK ist iOS 13.
:::
-Logto Swift SDK comes in two major versions:
+Das Logto Swift SDK ist in zwei Hauptversionen erhältlich:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**: Öffnet die Anmeldeerfahrung in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (dem Systembrowser), was Passkey-Anmeldung ermöglicht und die Browsersitzung teilt. Beachte, dass v2 die nativen Social-Plugin-Ziele entfernt; Social Connectors funktionieren weiterhin über den Browser. Wenn du auf die native WeChat- oder Alipay-SDK-Übergabe angewiesen bist, bleibe bei v1.
+- **v1**: Öffnet die Anmeldeerfahrung in einer eingebetteten WebView, was für die nativen Social-Plugin-Ziele erforderlich ist, aber Passkey-Anmeldung nicht unterstützt (WebView unterstützt WebAuthn, den zugrunde liegenden Standard von Passkeys, nicht).
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+Diese Anleitung behandelt beide Versionen. Wähle deine Version in den untenstehenden Tabs aus; die Auswahl bleibt während dieser Anleitung synchronisiert.
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+Verwende die folgende URL, um das Logto SDK als Abhängigkeit im Swift Package Manager hinzuzufügen.
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Seit Xcode 11 kannst du [ein Swift-Paket direkt importieren](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app), ohne zusätzliche Tools.
-When Xcode asks for the package version, choose the version you want to integrate:
+Wenn Xcode nach der Paketversion fragt, wähle die Version, die du integrieren möchtest:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+Verwende die neueste v2-Version als Version. Die neueste v2-Version ist `2.0.0`.
-If you use `Package.swift` directly:
+Wenn du `Package.swift` direkt verwendest:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+// Füge das Logto SDK als Abhängigkeit hinzu
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+Verwende die neueste v1-Version, wenn du die nativen Social-Plugin-Ziele benötigst. Die neueste v1-Version ist `1.2.0`.
-If you use `Package.swift` directly:
+Wenn du `Package.swift` direkt verwendest:
```swift title="Package.swift"
+// Füge das Logto SDK als Abhängigkeit hinzu
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
```
@@ -50,7 +52,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+Wir unterstützen derzeit **Carthage** und **CocoaPods** nicht, aufgrund einiger technischer Probleme.
@@ -60,7 +62,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [benötigt eine `xcodeproj`-Datei zum Bauen](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). Wir werden später versuchen, eine Lösung zu finden.
@@ -72,6 +74,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [unterstützt keine lokale Abhängigkeit](https://github.com/CocoaPods/CocoaPods/issues/3276) und kein Monorepo, daher ist es schwierig, ein `.podspec` für dieses Repository zu erstellen.
diff --git a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..c8828208295 100644
--- a/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### Redirect-URI konfigurieren \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+In v2 öffnet sich die Anmeldeerfahrung in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (dem Systembrowser), und die Weiterleitung wird über ein OS-Level Callback-Matching zurück zu deiner App geleitet. Für eine Redirect-URI mit benutzerdefiniertem Schema wie `io.logto.app://callback` registriere nur den Schema-Teil (`io.logto.app`) in der `Info.plist` deiner App und füge dann die vollständige Redirect-URI zu den Redirect-URIs deiner Logto-Anwendung hinzu.
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+Öffne in Xcode dein App-Target, wähle **Info**, erweitere **URL Types** und füge einen Eintrag mit `io.logto.app` in **URL Schemes** hinzu. Wenn du die `Info.plist` direkt bearbeitest, füge Folgendes hinzu:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+Für den Browser-Flow in v2 musst du `LogtoClient.handle(url:)` nicht aufrufen; diese Plugin-Handoff-API wurde mit dem eingebetteten WebView-Flow entfernt.
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### Universal Links statt eines benutzerdefinierten Schemas verwenden? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+Du kannst auch eine HTTPS-Redirect-URI wie `https://example.com/callback` verwenden:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. Füge deiner App die Associated Domains-Funktion hinzu.
+2. Konfiguriere `webcredentials:example.com`, damit `ASWebAuthenticationSession` HTTPS-Callbacks ab iOS 17.4 und neuer zuordnen kann.
+3. Wenn dieselbe URL deine App auch außerhalb der Authentifizierungssitzung als Universal Link öffnen soll, konfiguriere `applinks:example.com` und hoste eine gültige `apple-app-site-association`-Datei für die Domain und den Pfad.
+4. Füge die HTTPS-URI zu den Redirect-URIs deiner Logto-Anwendung hinzu.
+5. Übergebe dieselbe URI an `signInWithBrowser`.
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+Ab iOS 17.4 verwendet das SDK die HTTPS-Callback-Matching-API von `ASWebAuthenticationSession`, sodass HTTPS-Redirects automatisch abgeschlossen werden und die Sitzung beendet wird. Auf älteren iOS-Versionen kann die Autorisierungsanfrage weiterhin die HTTPS-Redirect-URI verwenden, aber die Sitzung wird möglicherweise nicht automatisch geschlossen, es sei denn, deine App verarbeitet den Universal Link Callback selbst. Behalte eine Redirect-URI mit benutzerdefiniertem Schema als Kompatibilitätsoption, wenn du eine automatische Fertigstellung auf älteren iOS-Versionen benötigst.
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+Die Redirect-URI im iOS SDK ist nur für die interne Verwendung. Es besteht _KEIN BEDARF_, ein [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) hinzuzufügen, bis ein Connector dies verlangt.
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### Anmelden und Abmelden \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+In v2 führt `client.signOut(postLogoutRedirectUri:)` ein vollständiges Abmelden durch: Es werden die lokalen Anmeldedaten gelöscht, das Auffrischungstoken widerrufen und die Logto-Sitzung beendet, indem der Endpunkt zum Sitzungsende im Systembrowser geöffnet wird. Der Browser navigiert dann über die Post-Logout-Redirect-URI zurück zu deiner App. Bevor du dies verwendest, wechsle zur Anwendungsdetailseite der Logto Console, füge die Post-Logout-Redirect-URI `io.logto.app://signed-out` hinzu und klicke auf "Änderungen speichern". Die Post-Logout-Redirect-URI kann dasselbe benutzerdefinierte Schema verwenden, das du für die Anmeldung registriert hast.
-For example, in a SwiftUI app:
+Zum Beispiel in einer SwiftUI-App:
```swift title="ContentView.swift"
+// Beispielcode, Kommentare ggf. übersetzen
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // Fehler während der Anmeldung aufgetreten
} catch {
- // other errors
+ // andere Fehler
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- Du kannst auch `client.signOut()` ohne eine Post-Logout-Redirect-URI aufrufen. In diesem Fall ist keine Console-Konfiguration erforderlich: Der Browser zeigt die Logto-Abmeldeseite an, und der Benutzer kehrt durch manuelles Schließen zur App zurück.
+- Wenn kein UI-Kontext verfügbar ist, kannst du `client.clearCredentials()` aufrufen, um die lokalen Anmeldedaten zu löschen und das Auffrischungstoken zu widerrufen. Beachte, dass dadurch die Logto-Sitzung im Browser erhalten bleibt, sodass die nächste `signInWithBrowser`-Anmeldung den Benutzer möglicherweise stillschweigend über diese Sitzung erneut anmeldet.
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+Du kannst `client.signInWithBrowser(redirectUri:)` verwenden, um den Benutzer anzumelden, und `client.signOut()`, um den Benutzer abzumelden.
-For example, in a SwiftUI app:
+Zum Beispiel in einer SwiftUI-App:
```swift title="ContentView.swift"
+// Beispielcode, Kommentare ggf. übersetzen
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // Fehler während der Anmeldung aufgetreten
} catch {
- // other errors
+ // andere Fehler
}
}
}
diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 85f9ba6e9e6..0bcc40dcc85 100644
--- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -37,7 +37,7 @@ Esta guía te mostrará cómo integrar Logto en tu aplicación Android.
-## Prerrequisitos \{#prerequisites}
+## Requisitos previos \{#prerequisites}
- Una cuenta de [Logto Cloud](https://cloud.logto.io) o un [Logto autoalojado](/introduction/set-up-logto-oss).
- Una aplicación nativa de Logto creada.
@@ -53,7 +53,7 @@ Esta guía te mostrará cómo integrar Logto en tu aplicación Android.
-### Configurar URI de redirección \{#configure-redirect-uri}
+### Configurar el URI de redirección \{#configure-redirect-uri}
@@ -64,16 +64,16 @@ Esta guía te mostrará cómo integrar Logto en tu aplicación Android.
En Android, el URI de redirección sigue el patrón: `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
-- El `LOGTO_REDIRECT_SCHEME` debe ser un esquema personalizado en el formato de dominio inverso.
+- El `LOGTO_REDIRECT_SCHEME` debe ser un esquema personalizado en formato de dominio inverso.
- El `YOUR_APP_PACKAGE` es el nombre del paquete de tu aplicación.
-Suponiendo que trates `io.logto.android` como el esquema personalizado `LOGTO_REDIRECT_SCHEME`, y `io.logto.sample` sea el nombre del paquete de tu aplicación, el URI de redirección debería ser `io.logto.android://io.logto.sample/callback`.
+Suponiendo que uses `io.logto.android` como el esquema personalizado `LOGTO_REDIRECT_SCHEME`, y `io.logto.sample` es el nombre del paquete de tu aplicación, el URI de redirección debe ser `io.logto.android://io.logto.sample/callback`.
-
+
-En v3, la experiencia de inicio de sesión se abre en un [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (el navegador del sistema), y la redirección se enruta de vuelta a tu aplicación a través de un filtro de intents a nivel del sistema operativo. Debes declarar el esquema de tu URI de redirección con el marcador de posición de manifiesto `logtoRedirectScheme` en el archivo de compilación de tu aplicación:
+En la v3, la experiencia de inicio de sesión se abre en una [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (el navegador del sistema), y la redirección se enruta de vuelta a tu aplicación a través de un intent filter a nivel del sistema operativo. Debes declarar el esquema de tu URI de redirección con el placeholder de manifiesto `logtoRedirectScheme` en el archivo de compilación de tu aplicación:
@@ -103,13 +103,13 @@ android {
-Además, v3 aplica el patrón de URI de redirección a través de la coincidencia de filtros de intents de Android, por lo que un URI de redirección que se desvíe del patrón nunca se entregará a tu aplicación:
+Además, la v3 aplica el patrón del URI de redirección mediante la coincidencia del intent filter de Android, por lo que un URI de redirección que se desvíe del patrón nunca se entregará a tu aplicación:
-- El esquema debe ser igual al marcador de posición de manifiesto `logtoRedirectScheme`.
+- El esquema debe ser igual al placeholder de manifiesto `logtoRedirectScheme`.
- El host debe ser tu `applicationId`.
- La ruta debe ser `/callback`.
-Mantén el esquema y el host en minúsculas, ya que la coincidencia de filtros de intents distingue entre mayúsculas y minúsculas, y los navegadores convierten el esquema a minúsculas.
+Mantén el esquema y el host en minúsculas, ya que la coincidencia del intent filter distingue entre mayúsculas y minúsculas y los navegadores convierten el esquema a minúsculas.
@@ -119,18 +119,18 @@ Mantén el esquema y el host en minúsculas, ya que la coincidencia de filtros d
-Para usar [Android App Links](https://developer.android.com/training/app-links) (un URI de redirección `https` en un dominio de tu propiedad) en lugar del esquema personalizado:
+Para usar [Android App Links](https://developer.android.com/training/app-links) (un URI de redirección `https` en un dominio que posees) en lugar del esquema personalizado:
-1. Aloja el archivo [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) en `https://your.domain/.well-known/assetlinks.json`, declarando el ID de tu aplicación y las huellas digitales SHA-256 de tus certificados de firma. Al publicar con Play App Signing, puedes encontrar la huella digital de la versión en Play Console bajo **Configuración** > **Firma de la aplicación**. El archivo debe servirse como `Content-Type: application/json` con HTTP 200 y sin redirecciones.
+1. Aloja el archivo [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) en `https://your.domain/.well-known/assetlinks.json`, declarando tu application ID y las huellas SHA-256 de tus certificados de firma. Al publicar con Play App Signing, puedes encontrar la huella de lanzamiento en Play Console en **Configuración** > **Firma de la aplicación**. El archivo debe servirse como `Content-Type: application/json` con HTTP 200 y sin redirecciones.
-2. Declara el filtro de intents de App Links en la actividad receptora de redirección del SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` en tu archivo `AndroidManifest.xml`. Si no usas el esquema personalizado en absoluto, elimina el filtro incorporado del SDK con `tools:node="removeAll"`, y el marcador de posición de manifiesto `logtoRedirectScheme` ya no será necesario:
+2. Declara el intent filter de App Links en la actividad receptora de redirección del SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` en tu archivo `AndroidManifest.xml`. Si no usas el esquema personalizado en absoluto, elimina el filtro incorporado del SDK con `tools:node="removeAll"`, y el placeholder de manifiesto `logtoRedirectScheme` ya no es necesario:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ Para usar [Android App Links](https://developer.android.com/training/app-links)
```
-3. Añade `https://your.domain/callback` como URI de redirección (y, si se usa para cerrar sesión, como URI de redirección posterior al cierre de sesión) en la página de detalles de la aplicación de Logto Console, y pásalo a `signIn` / `signOut`.
+3. Añade `https://your.domain/callback` como un URI de redirección (y, si se usa para cerrar sesión, como un URI de redirección post sign-out) en la página de detalles de la aplicación en Logto Console, y pásalo a `signIn` / `signOut`.
-Ten en cuenta que el callback es ahora una URL real en tu dominio, por lo que debes servir una página de respaldo allí (p. ej., un botón "Volver a la aplicación") para los navegadores que no inicien App Links en una redirección del servidor. El botón solo necesita enlazar a la URL actual (p. ej., estableciendo `href` en `window.location.href`): los parámetros de autorización están en la cadena de consulta, y un clic iniciado por el usuario da a la misma URL otra oportunidad de ser enrutada a tu aplicación. En Android 12+ un dominio no verificado nunca abre la aplicación, por lo que un `assetlinks.json` roto falla silenciosamente. Puedes comprobar el estado de verificación con `adb shell pm get-app-links `.
+Ten en cuenta que el callback ahora es una URL real en tu dominio, así que sirve una página de respaldo allí (por ejemplo, un botón "Volver a la app") para navegadores que no lanzan App Links en una redirección del servidor. El botón solo necesita enlazar a la URL actual (por ejemplo, estableciendo `href` a `window.location.href`): los parámetros de autorización están en la query string, y un clic iniciado por el usuario da otra oportunidad a la misma URL de ser dirigida a tu app. En Android 12+ un dominio no verificado nunca abre la app, por lo que un `assetlinks.json` roto falla silenciosamente. Puedes comprobar el estado de verificación con `adb shell pm get-app-links `.
@@ -153,7 +153,7 @@ Ten en cuenta que el callback es ahora una URL real en tu dominio, por lo que de
-No se requiere configuración adicional. La experiencia de inicio de sesión se abre en un WebView integrado, y el SDK intercepta la redirección dentro del WebView.
+No se requiere configuración adicional. La experiencia de inicio de sesión se abre en un WebView embebido, y el SDK intercepta la redirección dentro del WebView.
@@ -169,13 +169,13 @@ No se requiere configuración adicional. La experiencia de inicio de sesión se
### Mostrar información del usuario \{#display-user-information}
-Para mostrar la información del usuario, puedes usar el método `logtoClient.getIdTokenClaims()`. Por ejemplo, puedes obtener información del usuario en un ViewModel y luego mostrarla en tu actividad:
+Para mostrar la información del usuario, puedes usar el método `logtoClient.getIdTokenClaims()`. Por ejemplo, puedes obtener la información del usuario en un ViewModel y luego mostrarla en tu actividad:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...otros códigos
- // Añadir un live data para observar los reclamos del token de ID
+ // Añade un live data para observar los claims del id token
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...con otras importaciones
+//...con otros imports
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...otros códigos
- // Supón que tienes un TextView con id `user_info_text_view` en tu diseño
+ // Supón que tienes un TextView con id `user_info_text_view` en tu layout
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -208,30 +208,30 @@ class MainActivity : AppCompatActivity() {
}
```
-### Solicitar reclamos adicionales \{#request-additional-claims}
+### Solicitar claims adicionales \{#request-additional-claims}
-Para solicitar alcances adicionales, puedes pasarlos al objeto `LogtoConfig`. Por ejemplo:
+Para solicitar alcances (scopes) adicionales, puedes pasarlos al objeto `LogtoConfig`. Por ejemplo:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...otras configuraciones
+ // ...otros configs
// highlight-start
scopes = listOf("email", "phone"), // o `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
)
```
-Luego puedes acceder a los reclamos adicionales en el valor de retorno de `logtoClient.getIdTokenClaims()`:
+Luego puedes acceder a los claims adicionales en el valor de retorno de `logtoClient.getIdTokenClaims()`:
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// Ahora puedes acceder a los reclamos adicionales `claims.email`, `claims.phone`, etc.
+// Ahora puedes acceder a los claims adicionales `claims.email`, `claims.phone`, etc.
```
>{`logtoClient.fetchUserInfo {_, userInfoResponse ->
println("UserInfoResponse:$userInfoResponse")
}
-// Ahora puedes acceder al reclamo \`userInfo.custom_data\``}
+// Ahora puedes acceder al claim \`userInfo.custom_data\``}
}
/>
-### Alcances y reclamos \{#scopes-and-claims}
+### Alcances y claims \{#scopes-and-claims}
@@ -256,7 +256,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### Configurar cliente Logto \{#configure-logto-client}
+### Configurar el cliente Logto \{#configure-logto-client}
diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index e466c437a00..27ab05c0c97 100644
--- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,22 +5,22 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-Puedes usar `logtoClient.signIn` para iniciar sesión del usuario y `logtoClient.signOut` para cerrar sesión del usuario.
+Puedes usar `logtoClient.signIn` para iniciar sesión el usuario y `logtoClient.signOut` para cerrar la sesión del usuario.
-
+
-En v3, `logtoClient.signOut` realiza un cierre de sesión completo: limpia las credenciales locales, revoca el token de actualización y finaliza la sesión de Logto abriendo el endpoint de cierre de sesión en el navegador. El navegador luego navega de vuelta a tu aplicación a través del URI de redirección posterior al cierre de sesión. Antes de usarlo, ve a la página de detalles de la aplicación en Logto Console, añade el URI de redirección posterior al cierre de sesión `io.logto.android://io.logto.sample/callback` y haz clic en "Guardar cambios". El URI de redirección posterior al cierre de sesión sigue el mismo patrón que el URI de redirección, y su esquema también debe coincidir con el marcador de posición de manifiesto `logtoRedirectScheme`.
+En la versión v3, `logtoClient.signOut` realiza un cierre de sesión completo: borra las credenciales locales, revoca el token de actualización (refresh token) y finaliza la sesión de Logto abriendo el endpoint de cierre de sesión en el navegador. Luego, el navegador regresa a tu aplicación a través del URI de redirección posterior al cierre de sesión. Antes de usarlo, ve a la página de detalles de la aplicación en Logto Console, agrega el URI de redirección posterior al cierre de sesión `io.logto.android://io.logto.sample/callback` y haz clic en "Guardar cambios". El URI de redirección posterior al cierre de sesión sigue el mismo patrón que el URI de redirección, y su esquema también debe coincidir con el placeholder de manifiesto `logtoRedirectScheme`.
-Por ejemplo, en una aplicación Android:
+Por ejemplo, en una app de Android:
```kotlin title="LogtoModelView.kt"
-//...con otras importaciones
+//...con otros imports
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...otros códigos
- // Añadir un live data para observar el estado de autenticación
+ // Agrega un live data para observar el estado de autenticación
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -28,7 +28,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Actualizar el live data
+ // Actualiza el live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -36,7 +36,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut(context: Activity) {
logtoClient.signOut(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Actualizar el live data
+ // Actualiza el live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -50,13 +50,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...otros códigos
- // Supón que tienes un botón con id "sign_in_button" en tu diseño
+ // Supón que tienes un botón con id "sign_in_button" en tu layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // Supón que tienes un botón con id "sign_out_button" en tu diseño
+ // Supón que tienes un botón con id "sign_out_button" en tu layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // Verifica si el usuario está autenticado
@@ -64,7 +64,7 @@ class MainActivity : AppCompatActivity() {
}
}
- // Observa el estado de autenticación para actualizar la interfaz de usuario
+ // Observa el estado de autenticación para actualizar la UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// El usuario está autenticado
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- También puedes llamar a `logtoClient.signOut(context)` sin un URI de redirección posterior al cierre de sesión. En este caso no se necesita configuración en Console: el navegador muestra la página de cierre de sesión de Logto, y el usuario regresa a la aplicación cerrándola manualmente.
-- Si no hay contexto de UI disponible, puedes llamar a `logtoClient.clearCredentials` para limpiar las credenciales locales y revocar el token de actualización. Ten en cuenta que esto mantiene la sesión de Logto en el navegador, por lo que el próximo `signIn` puede iniciar sesión silenciosamente al usuario a través de esa sesión.
+- También puedes llamar a `logtoClient.signOut(context)` sin un URI de redirección posterior al cierre de sesión. No se necesita configuración en Console en este caso: el navegador muestra la página de cierre de sesión de Logto y el usuario regresa a la app cerrándola manualmente.
+- Si no hay un contexto de UI disponible, puedes llamar a `logtoClient.clearCredentials` para borrar las credenciales locales y revocar el token de actualización (refresh token). Ten en cuenta que esto mantiene la sesión de Logto en el navegador, por lo que el siguiente `signIn` puede iniciar sesión al usuario silenciosamente a través de esa sesión.
:::
@@ -92,14 +92,14 @@ class MainActivity : AppCompatActivity() {
-Por ejemplo, en una aplicación Android:
+Por ejemplo, en una app de Android:
```kotlin title="LogtoModelView.kt"
-//...con otras importaciones
+//...con otros imports
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...otros códigos
- // Añadir un live data para observar el estado de autenticación
+ // Agrega un live data para observar el estado de autenticación
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -107,7 +107,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Actualizar el live data
+ // Actualiza el live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -115,7 +115,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut() {
logtoClient.signOut { logtoException ->
logtoException?.let { println(it) }
- // Actualizar el live data
+ // Actualiza el live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -129,13 +129,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...otros códigos
- // Supón que tienes un botón con id "sign_in_button" en tu diseño
+ // Supón que tienes un botón con id "sign_in_button" en tu layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // Supón que tienes un botón con id "sign_out_button" en tu diseño
+ // Supón que tienes un botón con id "sign_out_button" en tu layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // Verifica si el usuario está autenticado
@@ -143,7 +143,7 @@ class MainActivity : AppCompatActivity() {
}
}
- // Observa el estado de autenticación para actualizar la interfaz de usuario
+ // Observa el estado de autenticación para actualizar la UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// El usuario está autenticado
diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index 47ac632e584..0d10863518c 100644
--- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -7,12 +7,12 @@ El nivel mínimo de API de Android compatible con Logto Android SDK es el nivel
Logto Android SDK viene en dos versiones principales:
-- **v3 (beta)**: Abre la experiencia de inicio de sesión en [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (el navegador del sistema), lo que habilita el inicio de sesión con passkey y comparte la sesión del navegador. Ten en cuenta que v3 elimina el soporte para los conectores WeChat (Nativo) y Alipay (Nativo) ; puedes usar WeChat (Web) y Alipay (Web) en su lugar, que funcionan a través del navegador. Si dependes de los conectores nativos, quédate en v2.
-- **v2**: Abre la experiencia de inicio de sesión en un WebView integrado, que es requerido por los conectores sociales nativos, pero no admite el inicio de sesión con passkey (WebView no admite WebAuthn, el estándar subyacente de las passkeys).
+- **v3**: Abre la experiencia de inicio de sesión en [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (el navegador del sistema), lo que habilita el inicio de sesión con passkey y comparte la sesión del navegador. Ten en cuenta que v3 elimina el soporte para los conectores WeChat (Nativo) y Alipay (Nativo) ; puedes usar WeChat (Web) y Alipay (Web) en su lugar, que funcionan a través del navegador. Si dependes de los conectores nativos, permanece en v2.
+- **v2**: Abre la experiencia de inicio de sesión en un WebView incrustado, lo cual es requerido por los conectores sociales nativos, pero no admite el inicio de sesión con passkey (WebView no soporta WebAuthn, el estándar subyacente de las passkeys).
-Esta guía cubre ambas versiones. Elige tu versión en las pestañas a continuación, y la elección se mantendrá sincronizada en toda esta guía.
+Esta guía cubre ambas versiones. Elige tu versión en las pestañas a continuación, y la elección se mantendrá sincronizada a lo largo de esta guía.
-Antes de instalar Logto Android SDK, asegúrate de que `mavenCentral()` esté agregado a la configuración de tu repositorio en el archivo de construcción del proyecto Gradle:
+Antes de instalar Logto Android SDK, asegúrate de que `mavenCentral()` esté añadido a la configuración de tu repositorio en el archivo de construcción del proyecto Gradle:
```kotlin title="settings.gradle.kts"
dependencyResolutionManagement {
@@ -22,13 +22,13 @@ dependencyResolutionManagement {
}
```
-Añade Logto Android SDK a tus dependencias:
+Agrega Logto Android SDK a tus dependencias:
-
+
-v3 se publica como versiones preliminares `3.0.0-beta` hasta GA. Usa la última versión preliminar como la versión:
+Usa la última versión v3 como la versión:
@@ -36,7 +36,7 @@ v3 se publica como versiones preliminares `3.0.0-beta` hasta GA. Usa la última
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,14 +86,14 @@ dependencies {
-Dado que el SDK necesita acceso a internet, debes añadir el siguiente permiso a tu archivo `AndroidManifest.xml`:
+Como el SDK necesita acceso a internet, debes agregar el siguiente permiso a tu archivo `AndroidManifest.xml`:
```xml title="AndroidManifest.xml"
-
+
diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..9bc0f8500c8 100644
--- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,47 +2,49 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+La versión mínima de iOS compatible con Logto Swift SDK es iOS 13.
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK viene en dos versiones principales:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**: Abre la experiencia de inicio de sesión en [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (el navegador del sistema), lo que habilita el inicio de sesión con passkey y comparte la sesión del navegador. Ten en cuenta que v2 elimina los targets de plugins sociales nativos; los conectores sociales siguen funcionando a través del navegador. Si dependes de la transferencia con el SDK nativo de WeChat o Alipay, permanece en v1.
+- **v1**: Abre la experiencia de inicio de sesión en un WebView embebido, lo cual es requerido por los targets de plugins sociales nativos, pero no admite el inicio de sesión con passkey (WebView no soporta WebAuthn, el estándar subyacente de las passkeys).
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+Esta guía cubre ambas versiones. Elige tu versión en las pestañas de abajo, y la elección se mantendrá sincronizada a lo largo de esta guía.
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+Utiliza la siguiente URL para añadir Logto SDK como dependencia en Swift Package Manager.
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Desde Xcode 11, puedes [importar directamente un paquete Swift](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) sin ninguna herramienta adicional.
-When Xcode asks for the package version, choose the version you want to integrate:
+Cuando Xcode solicite la versión del paquete, elige la versión que deseas integrar:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+Utiliza la última versión v2 como versión. La última versión v2 es `2.0.0`.
-If you use `Package.swift` directly:
+Si usas `Package.swift` directamente:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+// Agrega la dependencia de Logto Swift SDK versión 2.0.0 o superior
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+Utiliza la última versión v1 si necesitas los targets de plugins sociales nativos. La última versión v1 es `1.2.0`.
-If you use `Package.swift` directly:
+Si usas `Package.swift` directamente:
```swift title="Package.swift"
+// Agrega la dependencia de Logto Swift SDK versión 1.2.0 o superior
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
```
@@ -50,7 +52,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+No ofrecemos soporte para **Carthage** ni **CocoaPods** en este momento debido a algunos problemas técnicos.
@@ -60,7 +62,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [necesita un archivo `xcodeproj` para compilar](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). Intentaremos encontrar una solución alternativa más adelante.
@@ -72,6 +74,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [no admite dependencias locales](https://github.com/CocoaPods/CocoaPods/issues/3276) ni monorepo, por lo tanto es difícil crear un `.podspec` para este repositorio.
diff --git a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..606e8d96bbf 100644
--- a/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### Configurar URI de redirección \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+En la versión v2, la experiencia de inicio de sesión se abre en [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (el navegador del sistema), y la redirección se enruta de vuelta a tu app mediante la coincidencia de callback a nivel del sistema operativo. Para un URI de redirección con esquema personalizado como `io.logto.app://callback`, registra solo la parte del esquema (`io.logto.app`) en el `Info.plist` de tu app y luego añade el URI de redirección completo en los Redirect URIs de tu aplicación Logto.
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+En Xcode, abre el target de tu app, selecciona **Info**, expande **URL Types** y añade una entrada con `io.logto.app` en **URL Schemes**. Si editas `Info.plist` directamente, añade:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+Para el flujo en navegador en v2, no necesitas llamar a `LogtoClient.handle(url:)`; esa API de handoff de plugin fue eliminada junto con el flujo de WebView embebido.
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### ¿Usar Universal Links en lugar de un esquema personalizado? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+También puedes usar un URI de redirección HTTPS como `https://example.com/callback`:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. Añade la capacidad Associated Domains a tu app.
+2. Configura `webcredentials:example.com` para que `ASWebAuthenticationSession` pueda hacer coincidir callbacks HTTPS en iOS 17.4 y versiones posteriores.
+3. Si la misma URL también debe abrir tu app como Universal Link fuera de la sesión de autenticación, configura `applinks:example.com` y hospeda un archivo válido `apple-app-site-association` para el dominio y la ruta.
+4. Añade el URI HTTPS a los Redirect URIs de tu aplicación Logto.
+5. Pasa el mismo URI a `signInWithBrowser`.
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+En iOS 17.4 y versiones posteriores, el SDK utiliza la API de coincidencia de callback HTTPS de `ASWebAuthenticationSession` para que las redirecciones HTTPS puedan completarse automáticamente y cerrar la sesión. En versiones anteriores de iOS, la solicitud de autorización aún puede usar el URI de redirección HTTPS, pero la sesión puede no cerrarse automáticamente a menos que tu app maneje el callback Universal Link por sí misma. Mantén un esquema personalizado como opción de compatibilidad si necesitas finalización automática en versiones antiguas de iOS.
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+El Redirect URI en el SDK de iOS es solo para uso interno. _NO HAY NECESIDAD_ de añadir un [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) hasta que un conector lo solicite.
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### Inicio y cierre de sesión \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+En la versión v2, `client.signOut(postLogoutRedirectUri:)` realiza un cierre de sesión completo: borra las credenciales locales, revoca el token de actualización y finaliza la sesión de Logto abriendo el endpoint de cierre de sesión en el navegador del sistema. El navegador luego navega de vuelta a tu app mediante el URI de redirección posterior al cierre de sesión. Antes de usarlo, ve a la página de detalles de la aplicación en Logto Console, añade el URI de redirección posterior al cierre de sesión `io.logto.app://signed-out` y haz clic en "Guardar cambios". El URI de redirección posterior al cierre de sesión puede usar el mismo esquema personalizado que registraste para el inicio de sesión.
-For example, in a SwiftUI app:
+Por ejemplo, en una app SwiftUI:
```swift title="ContentView.swift"
+// Ejemplo de uso de inicio y cierre de sesión en SwiftUI
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // error ocurrido durante el inicio de sesión
} catch {
- // other errors
+ // otros errores
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- También puedes llamar a `client.signOut()` sin un URI de redirección posterior al cierre de sesión. No se necesita configuración en Console en este caso: el navegador muestra la página de cierre de sesión de Logto y el usuario regresa a la app cerrándola manualmente.
+- Si no hay contexto de UI disponible, puedes llamar a `client.clearCredentials()` para borrar las credenciales locales y revocar el token de actualización. Ten en cuenta que esto mantiene la sesión de Logto en el navegador, por lo que el siguiente `signInWithBrowser` puede iniciar sesión al usuario silenciosamente a través de esa sesión.
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+Puedes usar `client.signInWithBrowser(redirectUri:)` para iniciar sesión del usuario y `client.signOut()` para cerrar la sesión del usuario.
-For example, in a SwiftUI app:
+Por ejemplo, en una app SwiftUI:
```swift title="ContentView.swift"
+// Ejemplo de uso de inicio y cierre de sesión en SwiftUI
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // error ocurrido durante el inicio de sesión
} catch {
- // other errors
+ // otros errores
}
}
}
diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 5165b5394c2..c387dc0970a 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -5,7 +5,7 @@ sidebar_custom_props:
description: Guide d'intégration Android.
language: kotlin/java
official_link: https://developer.android.com
-app_type: Native app
+app_type: Application native
framework: Android
---
@@ -31,7 +31,7 @@ import ConfigApiResources from './api-resources/_config-api-resources.mdx';
import FetchAccessTokenForApiResources from './api-resources/_fetch-access-token-for-api-resources.mdx';
import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-token-for-user.mdx';
-# Ajoutez l’authentification à votre application Android (Kotlin/Java)
+# Ajoutez l’authentification à votre application Android (Kotlin / Java)
Ce guide vous montrera comment intégrer Logto dans votre application Android.
@@ -41,7 +41,7 @@ Ce guide vous montrera comment intégrer Logto dans votre application Android.
- Un compte [Logto Cloud](https://cloud.logto.io) ou un [Logto auto-hébergé](/introduction/set-up-logto-oss).
- Une application native Logto créée.
-- Un projet d'application Android Kotlin.
+- Un projet d'application Android en Kotlin.
## Installation \{#installation}
@@ -49,11 +49,11 @@ Ce guide vous montrera comment intégrer Logto dans votre application Android.
## Intégration \{#integration}
-### Init LogtoClient \{#init-logtoclient}
+### Initialiser LogtoClient \{#init-logtoclient}
-### Configurer l'URI de redirection \{#configure-redirect-uri}
+### Configurer l’URI de redirection \{#configure-redirect-uri}
@@ -62,18 +62,18 @@ Ce guide vous montrera comment intégrer Logto dans votre application Android.
redirectUri="io.logto.android://io.logto.sample/callback"
/>
-Dans Android, l'URI de redirection suit le modèle : `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback` :
+Sur Android, l’URI de redirection suit le modèle : `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback` :
-- Le `LOGTO_REDIRECT_SCHEME` doit être un schéma personnalisé au format de domaine inversé.
-- Le `YOUR_APP_PACKAGE` est le nom de votre package d'application.
+- Le `LOGTO_REDIRECT_SCHEME` doit être un schéma personnalisé au format domaine inversé.
+- Le `YOUR_APP_PACKAGE` est le nom du package de votre application.
-En supposant que vous traitiez `io.logto.android` comme le `LOGTO_REDIRECT_SCHEME` personnalisé, et `io.logto.sample` comme le nom de votre package d'application, l'URI de redirection devrait être `io.logto.android://io.logto.sample/callback`.
+En supposant que vous utilisiez `io.logto.android` comme schéma personnalisé `LOGTO_REDIRECT_SCHEME`, et que `io.logto.sample` soit le nom du package de votre application, l’URI de redirection doit être `io.logto.android://io.logto.sample/callback`.
-
+
-En v3, l'expérience de connexion s'ouvre dans un [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (le navigateur système), et la redirection est acheminée vers votre application via un filtre d'intention au niveau du système d'exploitation. Vous devez déclarer le schéma de votre URI de redirection avec l'espace réservé de manifeste `logtoRedirectScheme` dans le fichier de construction de votre application :
+En v3, l’expérience de connexion s’ouvre dans un [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (le navigateur système), et la redirection est renvoyée à votre application via un filtre d’intention au niveau du système d’exploitation. Vous devez déclarer le schéma de votre URI de redirection avec l’espace réservé de manifeste `logtoRedirectScheme` dans le fichier de build de votre application :
@@ -103,34 +103,34 @@ android {
-De plus, v3 applique le modèle d'URI de redirection via la correspondance des filtres d'intention Android, de sorte qu'un URI de redirection qui s'écarte du modèle n'est jamais délivré à votre application :
+De plus, la v3 impose le modèle d’URI de redirection via la correspondance du filtre d’intention Android, donc une URI de redirection qui s’écarte du modèle n’est jamais transmise à votre application :
-- Le schéma doit être égal à l'espace réservé de manifeste `logtoRedirectScheme`.
-- L'hôte doit être votre `applicationId`.
+- Le schéma doit être égal à l’espace réservé de manifeste `logtoRedirectScheme`.
+- L’hôte doit être votre `applicationId`.
- Le chemin doit être `/callback`.
-Gardez le schéma et l'hôte en minuscules, car la correspondance des filtres d'intention est sensible à la casse et les navigateurs mettent le schéma en minuscules.
+Gardez le schéma et l’hôte en minuscules, car la correspondance du filtre d’intention est sensible à la casse et les navigateurs mettent le schéma en minuscules.
-#### Utiliser des App Links plutôt qu'un schéma personnalisé ? \{#use-app-links-instead-of-a-custom-scheme}
+#### Utiliser App Links au lieu d’un schéma personnalisé ? \{#use-app-links-instead-of-a-custom-scheme}
-Pour utiliser les [Android App Links](https://developer.android.com/training/app-links) (un URI de redirection `https` sur un domaine qui vous appartient) plutôt que le schéma personnalisé :
+Pour utiliser [Android App Links](https://developer.android.com/training/app-links) (une URI de redirection `https` sur un domaine que vous possédez) au lieu du schéma personnalisé :
-1. Hébergez le fichier [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) à `https://your.domain/.well-known/assetlinks.json`, en déclarant l'identifiant de votre application et les empreintes SHA-256 de vos certificats de signature. Lors de la publication avec Play App Signing, vous pouvez trouver l'empreinte de la version dans la Play Console sous **Configuration** > **Signature de l'application**. Le fichier doit être servi avec `Content-Type: application/json`, HTTP 200 et sans redirections.
+1. Hébergez le fichier [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) à l’adresse `https://your.domain/.well-known/assetlinks.json`, en déclarant votre ID d’application et les empreintes SHA-256 de vos certificats de signature. Lors de la publication avec Play App Signing, vous pouvez trouver l’empreinte de production dans la Play Console sous **Configuration** > **Signature de l’application**. Le fichier doit être servi avec le type `Content-Type: application/json`, un code HTTP 200 et sans redirections.
-2. Déclarez le filtre d'intention App Links sur l'activité réceptrice de redirection du SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` dans votre fichier `AndroidManifest.xml`. Si vous n'utilisez pas du tout le schéma personnalisé, supprimez le filtre intégré du SDK avec `tools:node="removeAll"`, et l'espace réservé de manifeste `logtoRedirectScheme` n'est alors plus nécessaire :
+2. Déclarez le filtre d’intention App Links sur l’activité de réception de redirection du SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` dans votre fichier `AndroidManifest.xml`. Si vous n’utilisez pas du tout le schéma personnalisé, supprimez le filtre intégré du SDK avec `tools:node="removeAll"`, et l’espace réservé de manifeste `logtoRedirectScheme` n’est alors plus requis :
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ Pour utiliser les [Android App Links](https://developer.android.com/training/app
```
-3. Ajoutez `https://your.domain/callback` comme URI de redirection (et, s'il est utilisé pour la déconnexion, un URI de redirection post-déconnexion) dans la page de détails de l'application de la console Logto, et passez-le à `signIn` / `signOut`.
+3. Ajoutez `https://your.domain/callback` comme URI de redirection (et, si elle est utilisée pour la déconnexion, comme URI de redirection post-déconnexion) dans la page de détails de l’application dans Logto Console, et transmettez-la à `signIn` / `signOut`.
-Gardez à l'esprit que le callback est maintenant une URL réelle sur votre domaine, donc servez une page de repli (par exemple, un bouton « Retour à l'application ») pour les navigateurs qui ne lancent pas les App Links lors d'une redirection serveur. Le bouton n'a besoin que de pointer vers l'URL actuelle (par exemple, en définissant `href` sur `window.location.href`) : les paramètres d'autorisation se trouvent dans la chaîne de requête, et un clic initié par l'utilisateur donne à la même URL une autre chance d'être acheminée vers votre application. Sur Android 12+, un domaine non vérifié n'ouvre jamais l'application, donc un `assetlinks.json` cassé échoue silencieusement. Vous pouvez vérifier l'état de la vérification avec `adb shell pm get-app-links `.
+Gardez à l’esprit que le callback est désormais une véritable URL sur votre domaine, donc servez une page de secours à cet endroit (par exemple, un bouton "Retour à l’application") pour les navigateurs qui ne lancent pas App Links lors d’une redirection serveur. Le bouton doit simplement pointer vers l’URL actuelle (par exemple, en définissant `href` sur `window.location.href`) : les paramètres d’autorisation sont dans la chaîne de requête, et un clic initié par l’utilisateur donne une nouvelle chance à la même URL d’être routée vers votre application. Sur Android 12+, un domaine non vérifié n’ouvre jamais l’application, donc un `assetlinks.json` cassé échoue silencieusement. Vous pouvez vérifier l’état de la vérification avec `adb shell pm get-app-links `.
@@ -153,7 +153,7 @@ Gardez à l'esprit que le callback est maintenant une URL réelle sur votre doma
-Aucune configuration supplémentaire n'est requise. L'expérience de connexion s'ouvre dans une WebView intégrée, et le SDK intercepte la redirection à l'intérieur de la WebView.
+Aucune configuration supplémentaire n’est requise. L’expérience de connexion s’ouvre dans un WebView intégré, et le SDK intercepte la redirection à l’intérieur du WebView.
@@ -165,17 +165,17 @@ Aucune configuration supplémentaire n'est requise. L'expérience de connexion s
-## Obtenir les informations de l'utilisateur \{#get-user-information}
+## Obtenir les informations utilisateur \{#get-user-information}
-### Afficher les informations de l'utilisateur \{#display-user-information}
+### Afficher les informations utilisateur \{#display-user-information}
-Pour afficher les informations de l'utilisateur, vous pouvez utiliser la méthode `logtoClient.getIdTokenClaims()`. Par exemple, vous pouvez obtenir les informations de l'utilisateur dans un ViewModel, puis les afficher dans votre activité :
+Pour afficher les informations de l’utilisateur, vous pouvez utiliser la méthode `logtoClient.getIdTokenClaims()`. Par exemple, vous pouvez obtenir les informations utilisateur dans un ViewModel puis les afficher dans votre activité :
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...autres codes
- // Ajouter une donnée en direct pour observer les revendications du jeton d'identifiant
+ // Ajoutez une LiveData pour observer les revendications du jeton d’identifiant
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...avec d'autres imports
+//...avec d’autres imports
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...autres codes
- // Supposons que vous ayez une vue de texte avec l'identifiant `user_info_text_view` dans votre mise en page
+ // Supposons que vous ayez une TextView avec l’id `user_info_text_view` dans votre layout
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -214,18 +214,18 @@ class MainActivity : AppCompatActivity() {
-Pour demander des portées supplémentaires, vous pouvez passer les portées à l'objet `LogtoConfig`. Par exemple :
+Pour demander des portées supplémentaires, vous pouvez les transmettre à l’objet `LogtoConfig`. Par exemple :
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...autres configurations
+ // ...autres configs
// highlight-start
scopes = listOf("email", "phone"), // ou `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
)
```
-Ensuite, vous pouvez accéder aux revendications supplémentaires dans la valeur de retour de `logtoClient.getIdTokenClaims()` :
+Vous pouvez ensuite accéder aux revendications supplémentaires dans la valeur de retour de `logtoClient.getIdTokenClaims()` :
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
@@ -260,7 +260,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### Récupérer le jeton d’accès pour la ressource API \{#fetch-access-token-for-the-api-resource}
+### Récupérer un jeton d’accès pour la ressource API \{#fetch-access-token-for-the-api-resource}
@@ -268,6 +268,6 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-## Lectures complémentaires \{#further-readings}
+## Pour aller plus loin \{#further-readings}
diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index d1fa7d3ec30..13c8e64d6f0 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,13 +5,13 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-Vous pouvez utiliser `logtoClient.signIn` pour connecter l'utilisateur et `logtoClient.signOut` pour déconnecter l'utilisateur.
+Vous pouvez utiliser `logtoClient.signIn` pour connecter l'utilisateur et `logtoClient.signOut` pour le déconnecter.
-
+
-En v3, `logtoClient.signOut` effectue une déconnexion complète : il efface les identifiants locaux, révoque le jeton de rafraîchissement et termine la session Logto en ouvrant le point de terminaison de fin de session dans le navigateur. Le navigateur navigue ensuite vers votre application via l'URI de redirection post-déconnexion. Avant de l'utiliser, accédez à la page de détails de l'application de la console Logto, ajoutez l'URI de redirection post-déconnexion `io.logto.android://io.logto.sample/callback` et cliquez sur « Enregistrer les modifications ». L'URI de redirection post-déconnexion suit le même modèle que l'URI de redirection, et son schéma doit également correspondre à l'espace réservé de manifeste `logtoRedirectScheme`.
+En v3, `logtoClient.signOut` effectue une déconnexion complète : il efface les identifiants locaux, révoque le jeton de rafraîchissement et termine la session Logto en ouvrant le point de terminaison de fin de session dans le navigateur. Le navigateur revient ensuite à votre application via l’URI de redirection post-déconnexion. Avant de l'utiliser, rendez-vous sur la page de détails de l'application dans Logto Console, ajoutez l’URI de redirection post-déconnexion `io.logto.android://io.logto.sample/callback` et cliquez sur "Enregistrer les modifications". L’URI de redirection post-déconnexion suit le même schéma que l’URI de redirection, et son schéma doit également correspondre au placeholder de manifeste `logtoRedirectScheme`.
Par exemple, dans une application Android :
@@ -20,7 +20,7 @@ Par exemple, dans une application Android :
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...autres codes
- // Ajouter une donnée en direct pour observer le statut d'authentification
+ // Ajoutez un live data pour observer le statut d'authentification
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -28,7 +28,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Mettre à jour la donnée en direct
+ // Met à jour le live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -36,35 +36,35 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut(context: Activity) {
logtoClient.signOut(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Mettre à jour la donnée en direct
+ // Met à jour le live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-Ensuite, appelez les méthodes `signIn` et `signOut` dans votre activité :
+Appelez ensuite les méthodes `signIn` et `signOut` dans votre activité :
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...autres codes
- // Supposons que vous ayez un bouton avec l'identifiant "sign_in_button" dans votre mise en page
+ // Supposons que vous ayez un bouton avec l'id "sign_in_button" dans votre layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // Supposons que vous ayez un bouton avec l'identifiant "sign_out_button" dans votre mise en page
+ // Supposons que vous ayez un bouton avec l'id "sign_out_button" dans votre layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // Vérifiez si l'utilisateur est authentifié
+ if (logtoViewModel.authenticated) { // Vérifie si l'utilisateur est authentifié
logtoViewModel.signOut(this)
}
}
- // Observez le statut d'authentification pour mettre à jour l'interface utilisateur
+ // Observez le statut d'authentification pour mettre à jour l'UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// L'utilisateur est authentifié
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- Vous pouvez également appeler `logtoClient.signOut(context)` sans URI de redirection post-déconnexion. Aucune configuration dans la console n'est alors nécessaire : le navigateur affiche la page de déconnexion Logto, et l'utilisateur revient à l'application en la fermant manuellement.
-- Si aucun contexte d'interface utilisateur n'est disponible, vous pouvez appeler `logtoClient.clearCredentials` pour effacer les identifiants locaux et révoquer le jeton de rafraîchissement. Notez que cela maintient la session Logto dans le navigateur, de sorte que le prochain `signIn` peut reconnecter l'utilisateur silencieusement via cette session.
+- Vous pouvez également appeler `logtoClient.signOut(context)` sans URI de redirection post-déconnexion. Aucune configuration Console n'est nécessaire dans ce cas : le navigateur affiche la page de déconnexion Logto, et l'utilisateur revient à l'application en la fermant manuellement.
+- Si aucun contexte UI n'est disponible, vous pouvez appeler `logtoClient.clearCredentials` pour effacer les identifiants locaux et révoquer le jeton de rafraîchissement. Notez que cela conserve la session Logto dans le navigateur, donc la prochaine `signIn` peut reconnecter l'utilisateur silencieusement via cette session.
:::
@@ -99,7 +99,7 @@ Par exemple, dans une application Android :
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...autres codes
- // Ajouter une donnée en direct pour observer le statut d'authentification
+ // Ajoutez un live data pour observer le statut d'authentification
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -107,7 +107,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // Mettre à jour la donnée en direct
+ // Met à jour le live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -115,35 +115,35 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut() {
logtoClient.signOut { logtoException ->
logtoException?.let { println(it) }
- // Mettre à jour la donnée en direct
+ // Met à jour le live data
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-Ensuite, appelez les méthodes `signIn` et `signOut` dans votre activité :
+Appelez ensuite les méthodes `signIn` et `signOut` dans votre activité :
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...autres codes
- // Supposons que vous ayez un bouton avec l'identifiant "sign_in_button" dans votre mise en page
+ // Supposons que vous ayez un bouton avec l'id "sign_in_button" dans votre layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // Supposons que vous ayez un bouton avec l'identifiant "sign_out_button" dans votre mise en page
+ // Supposons que vous ayez un bouton avec l'id "sign_out_button" dans votre layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // Vérifiez si l'utilisateur est authentifié
+ if (logtoViewModel.authenticated) { // Vérifie si l'utilisateur est authentifié
logtoViewModel.signOut()
}
}
- // Observez le statut d'authentification pour mettre à jour l'interface utilisateur
+ // Observez le statut d'authentification pour mettre à jour l'UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// L'utilisateur est authentifié
diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index f626b1861bb..af61f6562d1 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,17 +2,17 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Le niveau API Android minimal pris en charge par Logto Android SDK est le niveau 24.
+Le niveau minimum d'API Android pris en charge par le SDK Logto Android est le niveau 24.
:::
-Logto Android SDK se décline en deux versions majeures :
+Le SDK Logto Android existe en deux versions principales :
-- **v3 (beta)** : Ouvre l'expérience de connexion dans les [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (le navigateur système), ce qui permet la connexion par passkey et partage la session du navigateur. Notez que v3 supprime la prise en charge des connecteurs WeChat (Native) et Alipay (Native) ; vous pouvez utiliser WeChat (Web) et Alipay (Web) à la place, qui fonctionnent via le navigateur. Si vous dépendez des connecteurs natifs, restez sur v2.
-- **v2** : Ouvre l'expérience de connexion dans une WebView intégrée, ce qui est requis par les connecteurs sociaux natifs, mais ne prend pas en charge la connexion par passkey (WebView ne prend pas en charge WebAuthn, la norme sous-jacente des passkeys).
+- **v3** : Ouvre l'expérience de connexion dans les [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (le navigateur système), ce qui permet la connexion par passkey et partage la session du navigateur. Notez que la v3 supprime la prise en charge des connecteurs WeChat (Native) et Alipay (Native) ; vous pouvez utiliser à la place WeChat (Web) et Alipay (Web) , qui fonctionnent via le navigateur. Si vous dépendez des connecteurs natifs, restez sur la v2.
+- **v2** : Ouvre l'expérience de connexion dans un WebView intégré, ce qui est requis par les connecteurs sociaux natifs, mais ne prend pas en charge la connexion par passkey (WebView ne prend pas en charge WebAuthn, la norme sous-jacente des passkeys).
-Ce guide couvre les deux versions. Choisissez votre version dans les onglets ci-dessous, et le choix sera synchronisé tout au long de ce guide.
+Ce guide couvre les deux versions. Choisissez votre version dans les onglets ci-dessous, et ce choix sera synchronisé tout au long de ce guide.
-Avant d'installer Logto Android SDK, assurez-vous que `mavenCentral()` est ajouté à votre configuration de dépôt dans le fichier de construction du projet Gradle :
+Avant d'installer le SDK Logto Android, assurez-vous que `mavenCentral()` est ajouté à la configuration de votre dépôt dans le fichier de build Gradle du projet :
```kotlin title="settings.gradle.kts"
dependencyResolutionManagement {
@@ -22,13 +22,13 @@ dependencyResolutionManagement {
}
```
-Ajoutez Logto Android SDK à vos dépendances :
+Ajoutez le SDK Logto Android à vos dépendances :
-
+
-v3 est disponible en tant que préreleases `3.0.0-beta` jusqu'à la disponibilité générale. Utilisez la dernière prérelease comme version :
+Utilisez la dernière version v3 comme version :
@@ -36,7 +36,7 @@ v3 est disponible en tant que préreleases `3.0.0-beta` jusqu'à la disponibilit
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,7 +86,7 @@ dependencies {
-Étant donné que le SDK nécessite un accès à Internet, vous devez ajouter la permission suivante à votre fichier `AndroidManifest.xml` :
+Comme le SDK a besoin d'un accès à Internet, vous devez ajouter la permission suivante à votre fichier `AndroidManifest.xml` :
```xml title="AndroidManifest.xml"
diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..70a7cef3cfa 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,45 +2,45 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+La version minimale d’iOS prise en charge par Logto Swift SDK est iOS 13.
:::
-Logto Swift SDK comes in two major versions:
+Le SDK Logto Swift existe en deux versions majeures :
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2** : Ouvre l’expérience de connexion dans [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (le navigateur système), ce qui permet la connexion par passkey et partage la session du navigateur. Notez que la v2 supprime les cibles de plugins sociaux natifs ; les connecteurs sociaux fonctionnent toujours via le navigateur. Si vous dépendez du transfert natif du SDK WeChat ou Alipay, restez en v1.
+- **v1** : Ouvre l’expérience de connexion dans une WebView intégrée, ce qui est requis par les cibles de plugins sociaux natifs, mais ne prend pas en charge la connexion par passkey (WebView ne prend pas en charge WebAuthn, la norme sous-jacente des passkeys).
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+Ce guide couvre les deux versions. Choisissez votre version dans les onglets ci-dessous, et ce choix sera synchronisé tout au long de ce guide.
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+Utilisez l’URL suivante pour ajouter le SDK Logto comme dépendance dans Swift Package Manager.
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Depuis Xcode 11, vous pouvez [importer directement un package Swift](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) sans outil supplémentaire.
-When Xcode asks for the package version, choose the version you want to integrate:
+Lorsque Xcode demande la version du package, choisissez la version que vous souhaitez intégrer :
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+Utilisez la dernière version v2 comme version. La dernière version v2 est `2.0.0`.
-If you use `Package.swift` directly:
+Si vous utilisez directement `Package.swift` :
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+Utilisez la dernière version v1 si vous avez besoin des cibles de plugins sociaux natifs. La dernière version v1 est `1.2.0`.
-If you use `Package.swift` directly:
+Si vous utilisez directement `Package.swift` :
```swift title="Package.swift"
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
@@ -50,7 +50,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+Nous ne prenons pas en charge **Carthage** et **CocoaPods** pour le moment en raison de certains problèmes techniques.
@@ -60,7 +60,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [nécessite un fichier `xcodeproj` pour compiler](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). Nous essaierons de trouver une solution de contournement plus tard.
@@ -72,6 +72,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [ne prend pas en charge les dépendances locales](https://github.com/CocoaPods/CocoaPods/issues/3276) et les monorepos, il est donc difficile de créer un `.podspec` pour ce dépôt.
diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..a5afc19c786 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### Configurer l’URI de redirection \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+En v2, l’expérience de connexion s’ouvre dans [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (le navigateur système), et la redirection est renvoyée vers votre application via la correspondance de callback au niveau du système d’exploitation. Pour une URI de redirection avec un schéma personnalisé comme `io.logto.app://callback`, enregistrez uniquement la partie schéma (`io.logto.app`) dans le `Info.plist` de votre application, puis ajoutez l’URI de redirection complète dans les URI de redirection de votre application Logto.
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+Dans Xcode, ouvrez la cible de votre application, sélectionnez **Info**, développez **URL Types**, et ajoutez une entrée avec `io.logto.app` dans **URL Schemes**. Si vous modifiez directement le `Info.plist`, ajoutez :
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+Pour le flux navigateur en v2, il n’est pas nécessaire d’appeler `LogtoClient.handle(url:)` ; cette API de transfert de plugin a été supprimée avec le flux WebView intégré.
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### Utiliser Universal Links au lieu d’un schéma personnalisé ? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+Vous pouvez également utiliser une URI de redirection HTTPS telle que `https://example.com/callback` :
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. Ajoutez la capacité Associated Domains à votre application.
+2. Configurez `webcredentials:example.com` pour que `ASWebAuthenticationSession` puisse faire correspondre les callbacks HTTPS sur iOS 17.4 et versions ultérieures.
+3. Si la même URL doit également ouvrir votre application en tant qu’Universal Link en dehors de la session d’authentification, configurez `applinks:example.com` et hébergez un fichier `apple-app-site-association` valide pour le domaine et le chemin.
+4. Ajoutez l’URI HTTPS dans les URI de redirection de votre application Logto.
+5. Passez la même URI à `signInWithBrowser`.
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+Sur iOS 17.4 et versions ultérieures, le SDK utilise l’API de correspondance de callback HTTPS de `ASWebAuthenticationSession` afin que les redirections HTTPS puissent automatiquement terminer et fermer la session. Sur les versions iOS plus anciennes, la requête d’autorisation peut toujours utiliser l’URI de redirection HTTPS, mais la session peut ne pas se fermer automatiquement à moins que votre application ne gère elle-même le callback Universal Link. Gardez une redirection avec schéma personnalisé comme option de compatibilité si vous avez besoin d’une complétion automatique sur les anciennes versions d’iOS.
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+L’URI de redirection dans le SDK iOS est uniquement à usage interne. Il n’est _PAS NÉCESSAIRE_ d’ajouter un [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) tant qu’un connecteur ne le demande pas.
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### Connexion et déconnexion \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+En v2, `client.signOut(postLogoutRedirectUri:)` effectue une déconnexion complète : il efface les identifiants locaux, révoque le jeton de rafraîchissement et termine la session Logto en ouvrant le point de terminaison de fin de session dans le navigateur système. Le navigateur revient ensuite à votre application via l’URI de redirection post-déconnexion. Avant de l’utiliser, allez sur la page de détails de l’application dans Logto Console, ajoutez l’URI de redirection post-déconnexion `io.logto.app://signed-out` et cliquez sur "Save changes". L’URI de redirection post-déconnexion peut utiliser le même schéma personnalisé que celui enregistré pour la connexion.
-For example, in a SwiftUI app:
+Par exemple, dans une application SwiftUI :
```swift title="ContentView.swift"
+// Les commentaires dans ce bloc de code peuvent être traduits si nécessaire.
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // erreur survenue lors de la connexion
} catch {
- // other errors
+ // autres erreurs
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- Vous pouvez également appeler `client.signOut()` sans URI de redirection post-déconnexion. Aucune configuration dans la Console n’est nécessaire dans ce cas : le navigateur affiche la page de déconnexion Logto, et l’utilisateur revient à l’application en la fermant manuellement.
+- Si aucun contexte d’interface utilisateur n’est disponible, vous pouvez appeler `client.clearCredentials()` pour effacer les identifiants locaux et révoquer le jeton de rafraîchissement. Notez que cela conserve la session Logto dans le navigateur, donc le prochain `signInWithBrowser` peut reconnecter l’utilisateur silencieusement via cette session.
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+Vous pouvez utiliser `client.signInWithBrowser(redirectUri:)` pour connecter l’utilisateur et `client.signOut()` pour le déconnecter.
-For example, in a SwiftUI app:
+Par exemple, dans une application SwiftUI :
```swift title="ContentView.swift"
+// Les commentaires dans ce bloc de code peuvent être traduits si nécessaire.
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // erreur survenue lors de la connexion
} catch {
- // other errors
+ // autres erreurs
}
}
}
diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 9a8f2b0297f..9dd01189162 100644
--- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -31,16 +31,16 @@ import ConfigApiResources from './api-resources/_config-api-resources.mdx';
import FetchAccessTokenForApiResources from './api-resources/_fetch-access-token-for-api-resources.mdx';
import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-token-for-user.mdx';
-# あなたの Android (Kotlin/Java) アプリケーションに認証 (Authentication) を追加する
+# Android (Kotlin / Java) アプリケーションへ認証機能の追加
-このガイドでは、Logto をあなたの Android アプリケーションに統合する方法を示します。
+このガイドでは、Android アプリケーションに Logto を統合する方法を紹介します。
## 前提条件 \{#prerequisites}
-- [Logto Cloud](https://cloud.logto.io) アカウントまたは [セルフホスト Logto](/introduction/set-up-logto-oss)。
-- 作成された Logto ネイティブアプリケーション。
+- [Logto Cloud](https://cloud.logto.io) アカウント、または [セルフホスト Logto](/introduction/set-up-logto-oss)。
+- 作成済みの Logto ネイティブアプリケーション。
- Kotlin Android アプリケーションプロジェクト。
## インストール \{#installation}
@@ -62,18 +62,18 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
redirectUri="io.logto.android://io.logto.sample/callback"
/>
-Android では、リダイレクト URI は次のパターンに従います:`$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
+Android では、リダイレクト URI は `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback` というパターンに従います:
-- `LOGTO_REDIRECT_SCHEME` は逆ドメイン形式のカスタムスキームである必要があります。
-- `YOUR_APP_PACKAGE` はあなたのアプリのパッケージ名です。
+- `LOGTO_REDIRECT_SCHEME` はリバースドメイン形式のカスタムスキームにしてください。
+- `YOUR_APP_PACKAGE` はアプリのパッケージ名です。
-`io.logto.android` をカスタム `LOGTO_REDIRECT_SCHEME` とし、`io.logto.sample` をあなたのアプリのパッケージ名と仮定すると、リダイレクト URI は `io.logto.android://io.logto.sample/callback` になります。
+たとえば、`io.logto.android` をカスタム `LOGTO_REDIRECT_SCHEME` とし、`io.logto.sample` をアプリのパッケージ名とする場合、リダイレクト URI は `io.logto.android://io.logto.sample/callback` となります。
-
+
-v3 では、サインインエクスペリエンスは [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(システムブラウザ)で開き、リダイレクトは OS レベルのインテントフィルターを通じてアプリに戻されます。アプリのビルドファイルで `logtoRedirectScheme` マニフェストプレースホルダーを使用してリダイレクト URI のスキームを宣言する必要があります:
+v3 では、サインイン体験は [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(システムブラウザ)で開かれ、リダイレクトは OS レベルのインテントフィルターを通じてアプリに戻されます。リダイレクト URI のスキームをアプリのビルドファイルで `logtoRedirectScheme` マニフェストプレースホルダーとして宣言する必要があります:
@@ -103,34 +103,34 @@ android {
-さらに、v3 は Android のインテントフィルターマッチングを通じてリダイレクト URI パターンを強制するため、パターンから外れたリダイレクト URI はアプリに届きません:
+さらに、v3 では Android のインテントフィルターマッチングによってリダイレクト URI パターンが強制されるため、パターンから外れたリダイレクト URI はアプリに届きません:
-- スキームは `logtoRedirectScheme` マニフェストプレースホルダーと等しくなければなりません。
+- スキームは `logtoRedirectScheme` マニフェストプレースホルダーと一致する必要があります。
- ホストは `applicationId` でなければなりません。
- パスは `/callback` でなければなりません。
-インテントフィルターマッチングは大文字と小文字を区別し、ブラウザはスキームを小文字にするため、スキームとホストは小文字に保ってください。
+スキームとホストは小文字で統一してください。インテントフィルターマッチングは大文字小文字を区別し、ブラウザはスキームを小文字に変換します。
-#### カスタムスキームの代わりに App Links を使用しますか? \{#use-app-links-instead-of-a-custom-scheme}
+#### カスタムスキームの代わりに App Links を使うには? \{#use-app-links-instead-of-a-custom-scheme}
-[Android App Links](https://developer.android.com/training/app-links)(所有するドメインの `https` リダイレクト URI)をカスタムスキームの代わりに使用するには:
+カスタムスキームの代わりに [Android App Links](https://developer.android.com/training/app-links)(所有ドメイン上の `https` リダイレクト URI)を使うには:
-1. [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) ファイルを `https://your.domain/.well-known/assetlinks.json` にホストし、アプリケーション ID と署名証明書の SHA-256 フィンガープリントを宣言します。Play アプリ署名で公開する場合は、Play Console の **設定** > **アプリ署名** でリリースフィンガープリントを確認できます。ファイルは `Content-Type: application/json` として HTTP 200 で、リダイレクトなしで提供される必要があります。
+1. [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) ファイルを `https://your.domain/.well-known/assetlinks.json` にホストし、アプリケーション ID と署名証明書の SHA-256 フィンガープリントを宣言します。Play App Signing で公開する場合、リリースフィンガープリントは Play Console の **セットアップ** > **アプリ署名** で確認できます。ファイルは `Content-Type: application/json` で HTTP 200、リダイレクトなしで配信してください。
-2. SDK のリダイレクトレシーバーアクティビティ `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` の App Links インテントフィルターを `AndroidManifest.xml` ファイルで宣言します。カスタムスキームをまったく使用しない場合は、`tools:node="removeAll"` で SDK の組み込みフィルターを削除してください。その場合、`logtoRedirectScheme` マニフェストプレースホルダーは不要になります:
+2. SDK のリダイレクト受信アクティビティ `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` に App Links インテントフィルターを `AndroidManifest.xml` に宣言します。カスタムスキームを全く使わない場合は、SDK の組み込みフィルターを `tools:node="removeAll"` で削除し、`logtoRedirectScheme` マニフェストプレースホルダーは不要です:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ android {
```
-3. Logto Console のアプリケーション詳細ページで `https://your.domain/callback` をリダイレクト URI として(サインアウトにも使用する場合はサインアウト後のリダイレクト URI としても)追加し、`signIn` / `signOut` に渡します。
+3. Logto コンソールのアプリケーション詳細ページで `https://your.domain/callback` をリダイレクト URI(サインアウトにも使う場合はポストサインアウトリダイレクト URI)として追加し、`signIn` / `signOut` に渡します。
-コールバックはドメイン上の実際の URL になったことに注意してください。サーバーリダイレクトで App Links を起動しないブラウザのために、フォールバックページ(例:「アプリに戻る」ボタン)を提供してください。ボタンは現在の URL にリンクするだけで十分です(例:`href` を `window.location.href` に設定)。認可パラメーターはクエリ文字列にあり、ユーザーによるクリックで同じ URL がアプリにルーティングされる機会が再び得られます。Android 12 以降では、未確認のドメインはアプリを開かないため、壊れた `assetlinks.json` はサイレントに失敗します。`adb shell pm get-app-links ` で確認状態を確認できます。
+コールバックは実際にドメイン上の URL となるため、App Links をサーバーリダイレクトで起動しないブラウザ向けにフォールバックページ(例:「アプリに戻る」ボタン)を用意してください。ボタンは現在の URL へのリンク(例:`href` を `window.location.href` に設定)だけで十分です。認可パラメーターはクエリ文字列に含まれており、ユーザー操作によるクリックで同じ URL が再度アプリにルーティングされるチャンスが生まれます。Android 12 以降では未検証ドメインはアプリを開かないため、`assetlinks.json` の不備はサイレントに失敗します。検証状態は `adb shell pm get-app-links ` で確認できます。
@@ -153,13 +153,13 @@ android {
-追加の設定は不要です。サインインエクスペリエンスは埋め込み WebView で開き、SDK は WebView 内でリダイレクトをインターセプトします。
+追加設定は不要です。サインイン体験は埋め込み WebView で開かれ、SDK が WebView 内でリダイレクトをインターセプトします。
-### サインインとサインアウトの実装 \{#implement-sign-in-and-sign-out}
+### サインイン・サインアウトの実装 \{#implement-sign-in-and-sign-out}
@@ -169,13 +169,13 @@ android {
### ユーザー情報の表示 \{#display-user-information}
-ユーザーの情報を表示するには、`logtoClient.getIdTokenClaims()` メソッドを使用できます。例えば、ViewModel でユーザー情報を取得し、それをアクティビティで表示することができます:
+ユーザー情報を表示するには、`logtoClient.getIdTokenClaims()` メソッドを利用できます。たとえば、ViewModel でユーザー情報を取得し、アクティビティで表示できます:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...他のコード
- // ID トークンクレームを監視するライブデータを追加
+ // id token claims を監視する LiveData を追加
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...他のインポートと共に
+//...他の import
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...他のコード
- // レイアウトに `user_info_text_view` という ID のテキストビューがあると仮定
+ // レイアウトに id `user_info_text_view` の TextView があると仮定
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -208,13 +208,13 @@ class MainActivity : AppCompatActivity() {
}
```
-### 追加のクレームをリクエストする \{#request-additional-claims}
+### 追加クレームのリクエスト \{#request-additional-claims}
-追加のスコープをリクエストするには、スコープを `LogtoConfig` オブジェクトに渡すことができます。例えば:
+追加のスコープをリクエストするには、`LogtoConfig` オブジェクトにスコープを渡します。例:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
@@ -225,13 +225,13 @@ private val logtoConfig = LogtoConfig(
)
```
-その後、`logtoClient.getIdTokenClaims()` の戻り値で追加のクレームにアクセスできます:
+その後、`logtoClient.getIdTokenClaims()` の戻り値で追加クレームにアクセスできます:
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// これで追加のクレーム `claims.email`、`claims.phone` などにアクセスできます。
+// 追加クレーム `claims.email`、`claims.phone` などにアクセスできます
```
>{`logtoClient.fetchUserInfo {_, userInfoResponse ->
println("UserInfoResponse:$userInfoResponse")
}
-// これでクレーム \`userInfo.custom_data\` にアクセスできます。`}
+// これで claim \`userInfo.custom_data\` にアクセスできます`}
}
/>
@@ -260,7 +260,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### API リソースのためのアクセス トークンの取得 \{#fetch-access-token-for-the-api-resource}
+### API リソース用のアクセス トークンの取得 \{#fetch-access-token-for-the-api-resource}
@@ -268,6 +268,6 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-## さらなる読み物 \{#further-readings}
+## さらに読む \{#further-readings}
diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index 09045d09480..c1173f5143d 100644
--- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,22 +5,22 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-`logtoClient.signIn` を使用してユーザーをサインインし、`logtoClient.signOut` を使用してユーザーをサインアウトできます。
+`logtoClient.signIn` を使ってユーザーのサインイン、`logtoClient.signOut` を使ってユーザーのサインアウトができます。
-
+
-v3 では、`logtoClient.signOut` は完全なサインアウトを実行します。ローカルの資格情報をクリアし、リフレッシュトークンを失効させ、ブラウザでエンドセッションエンドポイントを開いて Logto セッションを終了します。その後、ブラウザはサインアウト後のリダイレクト URI を通じてアプリに戻ります。使用する前に、Logto Console のアプリケーション詳細ページに切り替え、サインアウト後のリダイレクト URI `io.logto.android://io.logto.sample/callback` を追加して「変更を保存」をクリックしてください。サインアウト後のリダイレクト URI はリダイレクト URI と同じパターンに従い、そのスキームも `logtoRedirectScheme` マニフェストプレースホルダーと一致する必要があります。
+v3 では、`logtoClient.signOut` は完全なサインアウトを実行します:ローカルの認証情報をクリアし、リフレッシュ トークン (Refresh token) を取り消し、エンドセッションエンドポイントをブラウザで開いて Logto セッションを終了します。その後、ブラウザはポストサインアウトリダイレクト URI を通じてアプリに戻ります。使用前に Logto コンソールのアプリケーション詳細ページに移動し、ポストサインアウトリダイレクト URI `io.logto.android://io.logto.sample/callback` を追加して「変更を保存」をクリックしてください。ポストサインアウトリダイレクト URI はリダイレクト URI と同じパターンに従い、そのスキームも `logtoRedirectScheme` マニフェストプレースホルダーと一致する必要があります。
-例えば、Android アプリでは次のようにします:
+例えば、Android アプリの場合:
```kotlin title="LogtoModelView.kt"
-//...他のインポートと共に
+//...他のインポート
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...他のコード
- // 認証 (Authentication) 状態を監視するライブデータを追加
+ // 認証 (Authentication) 状態を監視する LiveData を追加
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -28,7 +28,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // ライブデータを更新
+ // LiveData を更新
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -36,7 +36,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut(context: Activity) {
logtoClient.signOut(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // ライブデータを更新
+ // LiveData を更新
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -50,13 +50,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...他のコード
- // レイアウトに id "sign_in_button" を持つボタンがあると仮定
+ // レイアウトに id "sign_in_button" のボタンがあると仮定
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // レイアウトに id "sign_out_button" を持つボタンがあると仮定
+ // レイアウトに id "sign_out_button" のボタンがあると仮定
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // ユーザーが認証 (Authentication) されているか確認
@@ -67,11 +67,11 @@ class MainActivity : AppCompatActivity() {
// 認証 (Authentication) 状態を監視して UI を更新
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // ユーザーは認証 (Authentication) されています
+ // ユーザーが認証 (Authentication) されている
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // ユーザーは認証 (Authentication) されていません
+ // ユーザーが認証 (Authentication) されていない
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- サインアウト後のリダイレクト URI なしで `logtoClient.signOut(context)` を呼び出すこともできます。この場合、Console の設定は不要です。ブラウザが Logto のサインアウトページを表示し、ユーザーは手動で閉じてアプリに戻ります。
-- UI コンテキストが利用できない場合は、`logtoClient.clearCredentials` を呼び出してローカルの資格情報をクリアし、リフレッシュトークンを失効させることができます。ただし、これはブラウザの Logto セッションをそのままにするため、次の `signIn` でそのセッションを通じてサイレントにサインインされる可能性があります。
+- ポストサインアウトリダイレクト URI なしで `logtoClient.signOut(context)` を呼び出すこともできます。この場合、コンソールでの設定は不要です:ブラウザに Logto のサインアウトページが表示され、ユーザーは手動で閉じてアプリに戻ります。
+- UI コンテキストが利用できない場合は、`logtoClient.clearCredentials` を呼び出してローカルの認証情報をクリアし、リフレッシュ トークン (Refresh token) を取り消すことができます。ただし、この場合ブラウザ上の Logto セッションは維持されるため、次回の `signIn` でそのセッションを通じてユーザーがサイレントにサインインされる可能性があります。
:::
@@ -92,14 +92,14 @@ class MainActivity : AppCompatActivity() {
-例えば、Android アプリでは次のようにします:
+例えば、Android アプリの場合:
```kotlin title="LogtoModelView.kt"
-//...他のインポートと共に
+//...他のインポート
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...他のコード
- // 認証 (Authentication) 状態を監視するライブデータを追加
+ // 認証 (Authentication) 状態を監視する LiveData を追加
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -107,7 +107,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // ライブデータを更新
+ // LiveData を更新
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -115,7 +115,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut() {
logtoClient.signOut { logtoException ->
logtoException?.let { println(it) }
- // ライブデータを更新
+ // LiveData を更新
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -129,13 +129,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...他のコード
- // レイアウトに id "sign_in_button" を持つボタンがあると仮定
+ // レイアウトに id "sign_in_button" のボタンがあると仮定
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // レイアウトに id "sign_out_button" を持つボタンがあると仮定
+ // レイアウトに id "sign_out_button" のボタンがあると仮定
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // ユーザーが認証 (Authentication) されているか確認
@@ -146,11 +146,11 @@ class MainActivity : AppCompatActivity() {
// 認証 (Authentication) 状態を監視して UI を更新
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // ユーザーは認証 (Authentication) されています
+ // ユーザーが認証 (Authentication) されている
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // ユーザーは認証 (Authentication) されていません
+ // ユーザーが認証 (Authentication) されていない
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index a6079ae28e6..d4613bb750a 100644
--- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,15 +2,15 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Logto Android SDK のサポートされている最小 Android API レベルはレベル 24 です。
+Logto Android SDK のサポートされている最小 Android API レベルは 24 です。
:::
-Logto Android SDK には 2 つのメジャーバージョンがあります:
+Logto Android SDK には 2 つの主要バージョンがあります:
-- **v3 (beta)**:[Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(システムブラウザ)でサインインエクスペリエンスを開き、パスキーサインインが可能になり、ブラウザセッションを共有します。v3 は WeChat (Native) および Alipay (Native) コネクターのサポートを削除します。代わりに、ブラウザを通じて動作する WeChat (Web) および Alipay (Web) を使用できます。ネイティブコネクターに依存している場合は、v2 のままにしてください。
-- **v2**:埋め込み WebView でサインインエクスペリエンスを開きます。ネイティブソーシャルコネクターに必要ですが、パスキーサインイン をサポートしていません(WebView はパスキーの基礎となる標準である WebAuthn をサポートしていません)。
+- **v3**:サインイン体験を [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(システムブラウザ)で開きます。これによりパスキーサインインが可能となり、ブラウザセッションが共有されます。なお、v3 では WeChat (Native) および Alipay (Native) コネクターのサポートが削除されています。代わりに WeChat (Web) および Alipay (Web) を利用できます(これらはブラウザ経由で動作します)。ネイティブコネクターに依存している場合は v2 をご利用ください。
+- **v2**:サインイン体験を埋め込み WebView で開きます。これはネイティブソーシャルコネクターに必要ですが、パスキーサインイン はサポートされません(WebView はパスキーの基盤となる WebAuthn をサポートしていません)。
-このガイドでは両方のバージョンを説明します。以下のタブでバージョンを選択すると、選択がこのガイド全体で同期されます。
+このガイドでは両バージョンをカバーしています。下記のタブでバージョンを選択すると、ガイド全体でその選択が同期されます。
Logto Android SDK をインストールする前に、Gradle プロジェクトのビルドファイルで `mavenCentral()` がリポジトリ設定に追加されていることを確認してください:
@@ -22,13 +22,13 @@ dependencyResolutionManagement {
}
```
-Logto Android SDK を依存関係に追加します:
+依存関係に Logto Android SDK を追加します:
-
+
-v3 は GA まで `3.0.0-beta` プレリリースとしてリリースされています。最新のプレリリースをバージョンとして使用してください:
+最新版の v3 リリースをバージョンとして使用します:
@@ -36,7 +36,7 @@ v3 は GA まで `3.0.0-beta` プレリリースとしてリリースされて
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,14 +86,14 @@ dependencies {
-SDK はインターネットアクセスが必要なため、次の権限を `AndroidManifest.xml` ファイルに追加する必要があります:
+SDK はインターネットアクセスが必要なため、`AndroidManifest.xml` ファイルに次のパーミッションを追加してください:
```xml title="AndroidManifest.xml"
-
+
diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..19bb4387142 100644
--- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,47 +2,49 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+Logto Swift SDK のサポートされている最小 iOS バージョンは iOS 13 です。
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK には 2 つの主要バージョンがあります:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**:サインイン体験を [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(システムブラウザ)で開きます。これによりパスキーサインインが可能になり、ブラウザセッションが共有されます。v2 ではネイティブソーシャルプラグインターゲットが削除されていますが、ソーシャルコネクターは引き続きブラウザ経由で動作します。ネイティブの WeChat や Alipay SDK 連携が必要な場合は v1 をご利用ください。
+- **v1**:サインイン体験を埋め込み WebView で開きます。これはネイティブソーシャルプラグインターゲットに必要ですが、パスキーサインイン には対応していません(WebView はパスキーの基盤となる WebAuthn をサポートしていません)。
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+このガイドは両バージョンに対応しています。下記のタブでバージョンを選択してください。選択はガイド全体で同期されます。
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+Swift Package Manager で Logto SDK を依存関係として追加するには、以下の URL を使用してください。
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Xcode 11 以降、[Swift パッケージを直接インポート](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) できます。追加ツールは不要です。
-When Xcode asks for the package version, choose the version you want to integrate:
+Xcode でパッケージバージョンを尋ねられたら、統合したいバージョンを選択してください:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+バージョンには最新の v2 リリースを使用してください。最新の v2 バージョンは `2.0.0` です。
-If you use `Package.swift` directly:
+`Package.swift` を直接使用する場合:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+// Logto Swift SDK を依存関係として追加
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+ネイティブソーシャルプラグインターゲットが必要な場合は、最新の v1 リリースを使用してください。最新の v1 バージョンは `1.2.0` です。
-If you use `Package.swift` directly:
+`Package.swift` を直接使用する場合:
```swift title="Package.swift"
+// Logto Swift SDK を依存関係として追加
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
```
@@ -50,7 +52,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+**Carthage** および **CocoaPods** には、技術的な理由により現時点では対応していません。
@@ -60,7 +62,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage は [ビルドに `xcodeproj` ファイルが必要](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385) です。今後回避策を検討します。
@@ -72,6 +74,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods は [ローカル依存関係](https://github.com/CocoaPods/CocoaPods/issues/3276) およびモノレポに対応していないため、このリポジトリ用の `.podspec` を作成するのは困難です。
diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..805e810f5da 100644
--- a/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### リダイレクト URI の設定 \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+v2 では、サインイン体験は [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(システムブラウザ)で開かれ、リダイレクトは OS レベルのコールバックマッチングを通じてアプリに戻されます。`io.logto.app://callback` のようなカスタムスキームのリダイレクト URI を使う場合、アプリの `Info.plist` にはスキーム部分(`io.logto.app`)のみを登録し、Logto アプリケーションの Redirect URIs には完全なリダイレクト URI を追加してください。
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+Xcode でアプリのターゲットを開き、**Info** を選択し、**URL Types** を展開して、**URL Schemes** に `io.logto.app` を追加します。`Info.plist` を直接編集する場合は、以下を追加します:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+v2 のブラウザフローでは、`LogtoClient.handle(url:)` を呼び出す必要はありません。このプラグインハンドオフ API は埋め込み WebView フローとともに削除されました。
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### カスタムスキームの代わりに Universal Links を使う? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+`https://example.com/callback` のような HTTPS リダイレクト URI も利用できます:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. アプリに Associated Domains 機能を追加します。
+2. `webcredentials:example.com` を設定し、iOS 17.4 以降で `ASWebAuthenticationSession` が HTTPS コールバックをマッチできるようにします。
+3. 同じ URL で認証セッション外でも Universal Link としてアプリを開きたい場合は、`applinks:example.com` を設定し、ドメインとパスに有効な `apple-app-site-association` ファイルをホストします。
+4. Logto アプリケーションの Redirect URIs に HTTPS URI を追加します。
+5. `signInWithBrowser` に同じ URI を渡します。
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+iOS 17.4 以降では、SDK は `ASWebAuthenticationSession` の HTTPS コールバックマッチング API を利用するため、HTTPS リダイレクトで自動的にセッションを完了・終了できます。古い iOS バージョンでは、認可リクエストで HTTPS リダイレクト URI を使えますが、Universal Link コールバックをアプリ側で処理しない限りセッションが自動で閉じない場合があります。古い iOS バージョンで自動完了が必要な場合は、互換性のためにカスタムスキームリダイレクトも残しておいてください。
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+iOS SDK の Redirect URI は内部利用のみです。コネクターから要求されるまで [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) を追加する _必要はありません_。
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### サインインとサインアウト \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+v2 では、`client.signOut(postLogoutRedirectUri:)` を使うと完全なサインアウトが実行されます:ローカル認証情報のクリア、リフレッシュ トークン (Refresh token) の取り消し、システムブラウザでエンドセッションエンドポイントを開いて Logto セッションを終了します。その後、ブラウザはサインアウト後リダイレクト URI を通じてアプリに戻ります。利用前に Logto Console のアプリケーション詳細ページでサインアウト後リダイレクト URI `io.logto.app://signed-out` を追加し、「Save changes」をクリックしてください。サインアウト後リダイレクト URI にはサインイン時に登録したカスタムスキームを使えます。
-For example, in a SwiftUI app:
+SwiftUI アプリの例:
```swift title="ContentView.swift"
+// コメントは翻訳済み
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // サインイン中にエラーが発生
} catch {
- // other errors
+ // その他のエラー
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- サインアウト後リダイレクト URI なしで `client.signOut()` を呼ぶこともできます。この場合 Console 側の設定は不要です:ブラウザに Logto サインアウトページが表示され、ユーザーは手動で閉じてアプリに戻ります。
+- UI コンテキストが利用できない場合は、`client.clearCredentials()` でローカル認証情報のクリアとリフレッシュ トークン (Refresh token) の取り消しが可能です。ただし、この場合ブラウザ上の Logto セッションは残るため、次回の `signInWithBrowser` でそのセッションを使ってサイレントサインインされる場合があります。
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+`client.signInWithBrowser(redirectUri:)` でユーザーのサインイン、`client.signOut()` でサインアウトができます。
-For example, in a SwiftUI app:
+SwiftUI アプリの例:
```swift title="ContentView.swift"
+// コメントは翻訳済み
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // サインイン中にエラーが発生
} catch {
- // other errors
+ // その他のエラー
}
}
}
diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 1027ee546bc..bf26c0a79a7 100644
--- a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -2,10 +2,10 @@
slug: /quick-starts/android
sidebar_label: Android (Kotlin / Java)
sidebar_custom_props:
- description: Android 통합 가이드.
+ description: Android 연동 가이드.
language: kotlin/java
official_link: https://developer.android.com
-app_type: Native app
+app_type: 네이티브 앱
framework: Android
---
@@ -31,29 +31,29 @@ import ConfigApiResources from './api-resources/_config-api-resources.mdx';
import FetchAccessTokenForApiResources from './api-resources/_fetch-access-token-for-api-resources.mdx';
import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-token-for-user.mdx';
-# Android (Kotlin/Java) 애플리케이션에 인증 (Authentication)을 추가하세요
+# Android (Kotlin / Java) 애플리케이션에 인증 (Authentication)을 추가하세요
-이 가이드는 Android 애플리케이션에 Logto를 통합하는 방법을 보여줍니다.
+이 가이드는 Logto를 Android 애플리케이션에 통합하는 방법을 안내합니다.
## 사전 준비 사항 \{#prerequisites}
- [Logto Cloud](https://cloud.logto.io) 계정 또는 [셀프 호스팅 Logto](/introduction/set-up-logto-oss).
-- Logto 네이티브 애플리케이션 생성.
+- 생성된 Logto 네이티브 애플리케이션.
- Kotlin Android 애플리케이션 프로젝트.
## 설치 \{#installation}
-## 통합 \{#integration}
+## 연동 \{#integration}
### LogtoClient 초기화 \{#init-logtoclient}
-### 리디렉트 URI 구성 \{#configure-redirect-uri}
+### 리디렉션 URI 구성 \{#configure-redirect-uri}
@@ -62,18 +62,18 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
redirectUri="io.logto.android://io.logto.sample/callback"
/>
-Android에서는 리디렉트 URI가 다음 패턴을 따릅니다: `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
+Android에서 리디렉션 URI는 다음 패턴을 따릅니다: `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
-- `LOGTO_REDIRECT_SCHEME`는 역도메인 형식의 사용자 정의 스킴이어야 합니다.
-- `YOUR_APP_PACKAGE`는 애플리케이션 패키지 이름입니다.
+- `LOGTO_REDIRECT_SCHEME`는 reverse domain 형식의 커스텀 스킴이어야 합니다.
+- `YOUR_APP_PACKAGE`는 앱의 패키지 이름입니다.
-`io.logto.android`를 사용자 정의 `LOGTO_REDIRECT_SCHEME`로, `io.logto.sample`을 애플리케이션 패키지 이름으로 처리한다고 가정하면, 리디렉트 URI는 `io.logto.android://io.logto.sample/callback`이어야 합니다.
+예를 들어, `io.logto.android`를 커스텀 `LOGTO_REDIRECT_SCHEME`로, `io.logto.sample`을 앱 패키지 이름으로 사용할 경우, 리디렉션 URI는 `io.logto.android://io.logto.sample/callback`이 됩니다.
-
+
-v3에서는 로그인 환경이 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (시스템 브라우저)에서 열리며, 리디렉션은 OS 수준의 인텐트 필터를 통해 앱으로 다시 라우팅됩니다. 앱의 빌드 파일에서 `logtoRedirectScheme` 매니페스트 플레이스홀더를 사용하여 리디렉트 URI의 스킴을 선언해야 합니다:
+v3에서는 로그인 경험이 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (시스템 브라우저)에서 열리며, 리디렉션은 OS 레벨 인텐트 필터를 통해 앱으로 전달됩니다. 앱의 빌드 파일에서 `logtoRedirectScheme` 매니페스트 플레이스홀더로 리디렉션 URI의 스킴을 선언해야 합니다:
@@ -103,13 +103,13 @@ android {
-또한 v3은 Android의 인텐트 필터 매칭을 통해 리디렉트 URI 패턴을 강제하므로, 패턴에서 벗어난 리디렉트 URI는 앱으로 전달되지 않습니다:
+또한, v3에서는 Android의 인텐트 필터 매칭을 통해 리디렉션 URI 패턴을 강제하므로, 패턴에서 벗어난 리디렉션 URI는 앱에 전달되지 않습니다:
-- 스킴은 `logtoRedirectScheme` 매니페스트 플레이스홀더와 일치해야 합니다.
-- 호스트는 `applicationId`여야 합니다.
-- 경로는 `/callback`이어야 합니다.
+- 스킴은 반드시 `logtoRedirectScheme` 매니페스트 플레이스홀더와 같아야 합니다.
+- 호스트는 반드시 `applicationId`여야 합니다.
+- 경로는 반드시 `/callback`이어야 합니다.
-인텐트 필터 매칭은 대소문자를 구분하고 브라우저는 스킴을 소문자로 변환하므로, 스킴과 호스트는 소문자로 유지하세요.
+스킴과 호스트는 소문자로 유지하세요. 인텐트 필터 매칭은 대소문자를 구분하며, 브라우저는 스킴을 소문자로 변환합니다.
@@ -119,18 +119,18 @@ android {
-커스텀 스킴 대신 [Android App Links](https://developer.android.com/training/app-links)(`https` 리디렉트 URI를 자신이 소유한 도메인에 사용)를 사용하려면:
+커스텀 스킴 대신 [Android App Links](https://developer.android.com/training/app-links) (`https` 리디렉션 URI, 소유한 도메인 사용)를 사용하려면:
-1. [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 파일을 `https://your.domain/.well-known/assetlinks.json`에 호스팅하고, 애플리케이션 ID와 서명 인증서의 SHA-256 지문을 선언하세요. Play App Signing으로 게시하는 경우, Play Console의 **설정** > **앱 서명**에서 릴리스 지문을 찾을 수 있습니다. 파일은 `Content-Type: application/json`으로 HTTP 200과 리디렉션 없이 제공되어야 합니다.
+1. [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 파일을 `https://your.domain/.well-known/assetlinks.json`에 호스팅하고, 애플리케이션 ID와 서명 인증서의 SHA-256 지문을 선언하세요. Play App Signing으로 배포할 경우, Play Console의 **설정** > **앱 서명**에서 릴리즈 지문을 확인할 수 있습니다. 파일은 반드시 `Content-Type: application/json`으로 HTTP 200, 리디렉션 없이 제공되어야 합니다.
-2. SDK의 리디렉트 수신 액티비티 `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity`에 App Links 인텐트 필터를 `AndroidManifest.xml` 파일에 선언하세요. 커스텀 스킴을 전혀 사용하지 않는 경우, `tools:node="removeAll"`로 SDK의 기본 제공 필터를 제거하면 `logtoRedirectScheme` 매니페스트 플레이스홀더가 더 이상 필요하지 않습니다:
+2. SDK의 리디렉션 수신 액티비티 `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity`에 App Links 인텐트 필터를 `AndroidManifest.xml`에 선언하세요. 커스텀 스킴을 전혀 사용하지 않는다면, SDK의 기본 필터를 `tools:node="removeAll"`로 제거하고, `logtoRedirectScheme` 매니페스트 플레이스홀더는 더 이상 필요하지 않습니다:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ android {
```
-3. Logto Console의 애플리케이션 세부 정보 페이지에서 `https://your.domain/callback`을 리디렉트 URI (로그아웃에도 사용하는 경우 로그아웃 후 리디렉트 URI)로 추가하고, `signIn` / `signOut`에 전달하세요.
+3. Logto Console의 애플리케이션 상세 페이지에서 `https://your.domain/callback`을 리디렉션 URI (로그아웃에 사용할 경우, 로그아웃 후 리디렉션 URI)로 추가하고, `signIn` / `signOut`에 전달하세요.
-콜백이 이제 도메인의 실제 URL이므로, 서버 리디렉션에서 App Links를 실행하지 않는 브라우저를 위해 대체 페이지(예: "앱으로 돌아가기" 버튼)를 제공하세요. 버튼은 현재 URL만 링크하면 됩니다(예: `href`를 `window.location.href`로 설정): 인증 매개변수는 쿼리 문자열에 있으며, 사용자가 클릭하면 동일한 URL이 앱으로 라우팅될 수 있는 기회를 다시 얻습니다. Android 12+에서는 미인증 도메인이 앱을 열지 않으므로, `assetlinks.json`이 잘못되면 조용히 실패합니다. `adb shell pm get-app-links `로 인증 상태를 확인할 수 있습니다.
+이제 콜백이 실제 도메인의 URL이므로, App Links를 서버 리디렉션에서 실행하지 않는 브라우저를 위해 해당 위치에 폴백 페이지(예: "앱으로 돌아가기" 버튼)를 제공하세요. 버튼은 현재 URL로만 연결하면 됩니다(예: `href`를 `window.location.href`로 설정): 인가 파라미터는 쿼리 스트링에 있으며, 사용자가 클릭하면 동일한 URL이 앱으로 라우팅될 또 다른 기회를 얻게 됩니다. Android 12 이상에서는 검증되지 않은 도메인은 앱을 절대 열지 않으므로, 잘못된 `assetlinks.json`은 조용히 실패합니다. 검증 상태는 `adb shell pm get-app-links `로 확인할 수 있습니다.
@@ -153,7 +153,7 @@ android {
-추가 설정이 필요하지 않습니다. 로그인 환경은 임베디드 WebView에서 열리며, SDK가 WebView 내에서 리디렉션을 가로챕니다.
+추가 설정이 필요하지 않습니다. 로그인 경험이 임베디드 WebView에서 열리며, SDK가 WebView 내부에서 리디렉션을 가로챕니다.
@@ -169,13 +169,13 @@ android {
### 사용자 정보 표시 \{#display-user-information}
-사용자의 정보를 표시하려면 `logtoClient.getIdTokenClaims()` 메서드를 사용할 수 있습니다. 예를 들어, ViewModel에서 사용자 정보를 가져와서 활동에 표시할 수 있습니다:
+사용자 정보를 표시하려면 `logtoClient.getIdTokenClaims()` 메서드를 사용할 수 있습니다. 예를 들어, ViewModel에서 사용자 정보를 가져와 액티비티에 표시할 수 있습니다:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
- // ...다른 코드
+ // ...기타 코드
- // ID 토큰 클레임을 관찰하기 위한 라이브 데이터를 추가합니다
+ // id token 클레임을 관찰할 LiveData 추가
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -192,9 +192,9 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
//...다른 import와 함께
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
- //...다른 코드
+ //...기타 코드
- // 레이아웃에 `user_info_text_view` ID를 가진 텍스트 뷰가 있다고 가정합니다
+ // 레이아웃에 id가 `user_info_text_view`인 TextView가 있다고 가정
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -214,18 +214,18 @@ class MainActivity : AppCompatActivity() {
-추가 스코프를 요청하려면, `LogtoConfig` 객체에 스코프를 전달할 수 있습니다. 예를 들어:
+추가 스코프를 요청하려면, `LogtoConfig` 객체에 스코프를 전달할 수 있습니다. 예시:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...다른 설정
+ // ...기타 설정
// highlight-start
scopes = listOf("email", "phone"), // 또는 `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
)
```
-그런 다음 `logtoClient.getIdTokenClaims()`의 반환 값에서 추가 클레임에 접근할 수 있습니다:
+그런 다음 `logtoClient.getIdTokenClaims()`의 반환값에서 추가 클레임에 접근할 수 있습니다:
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
@@ -252,7 +252,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-## API 리소스 및 조직 \{#api-resources-and-organizations}
+## API 리소스와 조직 \{#api-resources-and-organizations}
@@ -260,7 +260,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### API 리소스를 위한 액세스 토큰 가져오기 \{#fetch-access-token-for-the-api-resource}
+### API 리소스용 액세스 토큰 가져오기 \{#fetch-access-token-for-the-api-resource}
@@ -268,6 +268,6 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-## 추가 읽을거리 \{#further-readings}
+## 추가 자료 \{#further-readings}
diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index c14c80ec558..b4ca5ee4a2b 100644
--- a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,13 +5,13 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-`logtoClient.signIn`을 사용하여 사용자를 로그인시키고 `logtoClient.signOut`을 사용하여 사용자를 로그아웃시킬 수 있습니다.
+`logtoClient.signIn`을 사용하여 사용자를 로그인시키고, `logtoClient.signOut`을 사용하여 사용자를 로그아웃시킬 수 있습니다.
-
+
-v3에서 `logtoClient.signOut`은 완전한 로그아웃을 수행합니다: 로컬 자격 증명을 지우고, 리프레시 토큰을 폐기하며, 브라우저에서 세션 종료 엔드포인트를 열어 Logto 세션을 종료합니다. 브라우저는 로그아웃 후 리디렉트 URI를 통해 앱으로 돌아갑니다. 사용하기 전에 Logto Console의 애플리케이션 세부 정보 페이지로 이동하여, 로그아웃 후 리디렉트 URI `io.logto.android://io.logto.sample/callback`을 추가하고 "변경 사항 저장"을 클릭하세요. 로그아웃 후 리디렉트 URI는 리디렉트 URI와 동일한 패턴을 따르며, 스킴도 `logtoRedirectScheme` 매니페스트 플레이스홀더와 일치해야 합니다.
+v3에서는, `logtoClient.signOut`이 완전한 로그아웃을 수행합니다: 로컬 자격 증명을 삭제하고, 리프레시 토큰을 폐기하며, 브라우저에서 end session endpoint를 열어 Logto 세션을 종료합니다. 이후 브라우저는 post sign-out redirect URI를 통해 다시 앱으로 이동합니다. 사용하기 전에 Logto Console의 애플리케이션 상세 페이지로 이동하여 post sign-out redirect URI `io.logto.android://io.logto.sample/callback`을 추가하고 "변경 사항 저장"을 클릭하세요. post sign-out redirect URI는 redirect URI와 동일한 패턴을 따르며, 스킴도 `logtoRedirectScheme` 매니페스트 플레이스홀더와 일치해야 합니다.
예를 들어, Android 앱에서:
@@ -20,7 +20,7 @@ v3에서 `logtoClient.signOut`은 완전한 로그아웃을 수행합니다: 로
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...다른 코드
- // 인증 상태를 관찰하기 위한 라이브 데이터를 추가합니다
+ // 인증 (Authentication) 상태를 관찰하기 위한 live data 추가
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -28,7 +28,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // 라이브 데이터를 업데이트합니다
+ // live data 업데이트
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -36,42 +36,42 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut(context: Activity) {
logtoClient.signOut(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // 라이브 데이터를 업데이트합니다
+ // live data 업데이트
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-그런 다음, 활동에서 `signIn` 및 `signOut` 메서드를 호출합니다:
+그런 다음, 액티비티에서 `signIn`과 `signOut` 메서드를 호출하세요:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...다른 코드
- // 레이아웃에 "sign_in_button"이라는 id를 가진 버튼이 있다고 가정합니다
+ // 레이아웃에 id가 "sign_in_button"인 버튼이 있다고 가정
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // 레이아웃에 "sign_out_button"이라는 id를 가진 버튼이 있다고 가정합니다
+ // 레이아웃에 id가 "sign_out_button"인 버튼이 있다고 가정
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 사용자가 인증되었는지 확인합니다
+ if (logtoViewModel.authenticated) { // 사용자가 인증 (Authentication)되었는지 확인
logtoViewModel.signOut(this)
}
}
- // UI를 업데이트하기 위해 인증 상태를 관찰합니다
+ // 인증 (Authentication) 상태를 관찰하여 UI 업데이트
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 사용자가 인증되었습니다
+ // 사용자가 인증 (Authentication)됨
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 사용자가 인증되지 않았습니다
+ // 사용자가 인증 (Authentication)되지 않음
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- 로그아웃 후 리디렉트 URI 없이 `logtoClient.signOut(context)`를 호출할 수도 있습니다. 이 경우 Console 설정이 필요하지 않습니다: 브라우저에 Logto 로그아웃 페이지가 표시되며, 사용자는 직접 닫아서 앱으로 돌아옵니다.
-- UI 컨텍스트를 사용할 수 없는 경우, `logtoClient.clearCredentials`를 호출하여 로컬 자격 증명을 지우고 리프레시 토큰을 폐기할 수 있습니다. 이 경우 브라우저의 Logto 세션은 유지되므로, 다음 `signIn` 시 해당 세션을 통해 자동으로 로그인될 수 있습니다.
+- post sign-out redirect URI 없이 `logtoClient.signOut(context)`를 호출할 수도 있습니다. 이 경우 Console 설정이 필요하지 않습니다: 브라우저에 Logto 로그아웃 페이지가 표시되고, 사용자가 수동으로 닫으면 앱으로 돌아갑니다.
+- UI 컨텍스트가 없는 경우, `logtoClient.clearCredentials`를 호출하여 로컬 자격 증명을 삭제하고 리프레시 토큰을 폐기할 수 있습니다. 이 경우 브라우저의 Logto 세션은 유지되므로, 다음 `signIn` 시 해당 세션을 통해 사용자가 자동으로 다시 로그인될 수 있습니다.
:::
@@ -99,7 +99,7 @@ class MainActivity : AppCompatActivity() {
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...다른 코드
- // 인증 상태를 관찰하기 위한 라이브 데이터를 추가합니다
+ // 인증 (Authentication) 상태를 관찰하기 위한 live data 추가
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -107,7 +107,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signIn(context: Activity) {
logtoClient.signIn(context, "io.logto.android://io.logto.sample/callback") { logtoException ->
logtoException?.let { println(it) }
- // 라이브 데이터를 업데이트합니다
+ // live data 업데이트
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
@@ -115,42 +115,42 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
fun signOut() {
logtoClient.signOut { logtoException ->
logtoException?.let { println(it) }
- // 라이브 데이터를 업데이트합니다
+ // live data 업데이트
_authenticated.postValue(logtoClient.isAuthenticated)
}
}
}
```
-그런 다음, 활동에서 `signIn` 및 `signOut` 메서드를 호출합니다:
+그런 다음, 액티비티에서 `signIn`과 `signOut` 메서드를 호출하세요:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...다른 코드
- // 레이아웃에 "sign_in_button"이라는 id를 가진 버튼이 있다고 가정합니다
+ // 레이아웃에 id가 "sign_in_button"인 버튼이 있다고 가정
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // 레이아웃에 "sign_out_button"이라는 id를 가진 버튼이 있다고 가정합니다
+ // 레이아웃에 id가 "sign_out_button"인 버튼이 있다고 가정
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 사용자가 인증되었는지 확인합니다
+ if (logtoViewModel.authenticated) { // 사용자가 인증 (Authentication)되었는지 확인
logtoViewModel.signOut()
}
}
- // UI를 업데이트하기 위해 인증 상태를 관찰합니다
+ // 인증 (Authentication) 상태를 관찰하여 UI 업데이트
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 사용자가 인증되었습니다
+ // 사용자가 인증 (Authentication)됨
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 사용자가 인증되지 않았습니다
+ // 사용자가 인증 (Authentication)되지 않음
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index a6b6666a74c..1a481a9e5fa 100644
--- a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,17 +2,17 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Logto Android SDK의 최소 지원 Android API 레벨은 레벨 24입니다.
+Logto Android SDK가 지원하는 최소 Android API 레벨은 24입니다.
:::
Logto Android SDK는 두 가지 주요 버전으로 제공됩니다:
-- **v3 (beta)**: [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (시스템 브라우저)에서 로그인 환경을 열어 패스키 로그인을 지원하고 브라우저 세션을 공유합니다. v3은 WeChat (Native) 및 Alipay (Native) 커넥터 지원을 제거합니다. 대신 브라우저를 통해 작동하는 WeChat (Web) 및 Alipay (Web) 을 사용할 수 있습니다. 네이티브 커넥터에 의존하는 경우 v2를 유지하세요.
-- **v2**: 네이티브 소셜 커넥터에 필요한 임베디드 WebView에서 로그인 환경을 엽니다. 단, 패스키 로그인 은 지원하지 않습니다 (WebView는 패스키의 기반 표준인 WebAuthn을 지원하지 않습니다).
+- **v3**: [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (시스템 브라우저)에서 로그인 경험을 엽니다. 이를 통해 패스키 로그인과 브라우저 세션 공유가 가능합니다. v3에서는 WeChat (Native) 및 Alipay (Native) 커넥터 지원이 제거되었습니다. 대신 WeChat (Web) 및 Alipay (Web) 을 사용할 수 있으며, 이들은 브라우저를 통해 동작합니다. 네이티브 커넥터가 필요하다면 v2를 사용하세요.
+- **v2**: 로그인 경험을 임베디드 WebView에서 엽니다. 이는 네이티브 소셜 커넥터에 필요하지만, 패스키 로그인 을 지원하지 않습니다 (WebView는 패스키의 기반 표준인 WebAuthn을 지원하지 않음).
-이 가이드는 두 버전을 모두 다룹니다. 아래 탭에서 버전을 선택하면, 선택이 이 가이드 전반에 걸쳐 동기화됩니다.
+이 가이드는 두 버전을 모두 다룹니다. 아래 탭에서 원하는 버전을 선택하면, 선택이 가이드 전체에서 동기화됩니다.
-Logto Android SDK를 설치하기 전에, Gradle 프로젝트 빌드 파일의 저장소 구성에 `mavenCentral()`이 추가되어 있는지 확인하세요:
+Logto Android SDK를 설치하기 전에, Gradle 프로젝트 빌드 파일의 저장소 설정에 `mavenCentral()`이 추가되어 있는지 확인하세요:
```kotlin title="settings.gradle.kts"
dependencyResolutionManagement {
@@ -22,13 +22,13 @@ dependencyResolutionManagement {
}
```
-Logto Android SDK를 종속성에 추가하세요:
+Logto Android SDK를 의존성에 추가하세요:
-
+
-v3은 GA 전까지 `3.0.0-beta` 프리릴리스로 제공됩니다. 최신 프리릴리스를 버전으로 사용하세요:
+최신 v3 릴리스를 버전으로 사용하세요:
@@ -36,7 +36,7 @@ v3은 GA 전까지 `3.0.0-beta` 프리릴리스로 제공됩니다. 최신 프
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,7 +86,7 @@ dependencies {
-SDK가 인터넷에 접근해야 하므로, `AndroidManifest.xml` 파일에 다음 권한을 추가해야 합니다:
+SDK가 인터넷 접근 권한이 필요하므로, `AndroidManifest.xml` 파일에 다음 권한을 추가해야 합니다:
```xml title="AndroidManifest.xml"
@@ -96,6 +96,6 @@ SDK가 인터넷에 접근해야 하므로, `AndroidManifest.xml` 파일에 다
-
+
```
diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..d9bd0ccc7a6 100644
--- a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,45 +2,45 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+Logto Swift SDK가 지원하는 최소 iOS 버전은 iOS 13입니다.
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK는 두 가지 주요 버전으로 제공됩니다:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**: [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (시스템 브라우저)에서 로그인 경험을 엽니다. 이를 통해 패스키 로그인과 브라우저 세션 공유가 가능합니다. v2에서는 네이티브 소셜 플러그인 타겟이 제거되었으니 참고하세요. 소셜 커넥터는 여전히 브라우저를 통해 동작합니다. 네이티브 WeChat 또는 Alipay SDK 연동이 필요하다면 v1을 사용하세요.
+- **v1**: 임베디드 WebView에서 로그인 경험을 엽니다. 이는 네이티브 소셜 플러그인 타겟에 필요하지만, 패스키 로그인 을 지원하지 않습니다 (WebView는 패스키의 기반 표준인 WebAuthn을 지원하지 않습니다).
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+이 가이드는 두 버전을 모두 다룹니다. 아래 탭에서 원하는 버전을 선택하면, 선택이 가이드 전체에서 동기화됩니다.
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+다음 URL을 사용하여 Swift Package Manager에서 Logto SDK를 의존성으로 추가하세요.
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Xcode 11부터는 [Swift 패키지를 직접 가져올 수 있습니다](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) (추가 도구 없이).
-When Xcode asks for the package version, choose the version you want to integrate:
+Xcode에서 패키지 버전을 묻는 경우, 통합하고자 하는 버전을 선택하세요:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+최신 v2 릴리스를 버전으로 사용하세요. 최신 v2 버전은 `2.0.0`입니다.
-If you use `Package.swift` directly:
+`Package.swift`를 직접 사용하는 경우:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+네이티브 소셜 플러그인 타겟이 필요하다면 최신 v1 릴리스를 사용하세요. 최신 v1 버전은 `1.2.0`입니다.
-If you use `Package.swift` directly:
+`Package.swift`를 직접 사용하는 경우:
```swift title="Package.swift"
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
@@ -50,7 +50,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+일부 기술적 이슈로 인해 현재 **Carthage** 및 **CocoaPods**는 지원하지 않습니다.
@@ -60,7 +60,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage는 [빌드를 위해 `xcodeproj` 파일이 필요합니다](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). 추후 해결 방법을 찾아볼 예정입니다.
@@ -72,6 +72,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods는 [로컬 의존성](https://github.com/CocoaPods/CocoaPods/issues/3276)과 모노레포를 지원하지 않으므로, 이 저장소에 대한 `.podspec`을 만들기 어렵습니다.
diff --git a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..214a4f198b4 100644
--- a/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### 리디렉션 URI 구성하기 \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+v2에서는, 로그인 경험이 [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (시스템 브라우저)에서 열리며, 리디렉션은 OS 수준의 콜백 매칭을 통해 앱으로 다시 라우팅됩니다. `io.logto.app://callback`과 같은 커스텀 스킴 리디렉션 URI의 경우, 앱의 `Info.plist`에는 스킴 부분(`io.logto.app`)만 등록하고, 전체 리디렉션 URI는 Logto 애플리케이션의 Redirect URIs에 추가하세요.
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+Xcode에서 앱 타겟을 열고 **Info**를 선택한 후, **URL Types**를 확장하고 **URL Schemes**에 `io.logto.app`을 추가하세요. `Info.plist`를 직접 수정하는 경우, 다음과 같이 추가합니다:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+v2의 브라우저 플로우에서는 `LogtoClient.handle(url:)`를 호출할 필요가 없습니다. 해당 플러그인 핸드오프 API는 임베디드 WebView 플로우와 함께 제거되었습니다.
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### 커스텀 스킴 대신 Universal Links를 사용할 수 있나요? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+`https://example.com/callback`과 같은 HTTPS 리디렉션 URI도 사용할 수 있습니다:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. 앱에 Associated Domains 기능을 추가하세요.
+2. `webcredentials:example.com`을 구성하여 iOS 17.4 이상에서 `ASWebAuthenticationSession`이 HTTPS 콜백을 매칭할 수 있도록 합니다.
+3. 동일한 URL이 인증 세션 외부에서 Universal Link로도 앱을 열어야 한다면, `applinks:example.com`을 구성하고 해당 도메인 및 경로에 대해 유효한 `apple-app-site-association` 파일을 호스팅하세요.
+4. HTTPS URI를 Logto 애플리케이션의 Redirect URIs에 추가하세요.
+5. 동일한 URI를 `signInWithBrowser`에 전달하세요.
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+iOS 17.4 이상에서는 SDK가 `ASWebAuthenticationSession`의 HTTPS 콜백 매칭 API를 사용하므로, HTTPS 리디렉션이 자동으로 완료되고 세션이 닫힙니다. 구버전 iOS에서는 인가 요청에 HTTPS 리디렉션 URI를 사용할 수 있지만, Universal Link 콜백을 앱에서 직접 처리하지 않으면 세션이 자동으로 닫히지 않을 수 있습니다. 구버전 iOS에서 자동 완료가 필요하다면 커스텀 스킴 리디렉션을 호환 옵션으로 유지하세요.
@@ -70,24 +70,24 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+iOS SDK의 Redirect URI는 내부 용도로만 사용됩니다. 커넥터가 요청하지 않는 한 [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)를 추가할 _필요가 없습니다_.
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### 로그인 및 로그아웃 \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+v2에서는, `client.signOut(postLogoutRedirectUri:)`가 완전한 로그아웃을 수행합니다: 로컬 자격 증명을 삭제하고, 리프레시 토큰을 폐기하며, 시스템 브라우저에서 end session 엔드포인트를 열어 Logto 세션을 종료합니다. 브라우저는 로그아웃 후 리디렉션 URI를 통해 다시 앱으로 이동합니다. 사용 전에 Logto Console의 애플리케이션 상세 페이지로 이동하여 로그아웃 후 리디렉션 URI `io.logto.app://signed-out`을 추가하고 "Save changes"를 클릭하세요. 로그아웃 후 리디렉션 URI는 로그인에 등록한 것과 동일한 커스텀 스킴을 사용할 수 있습니다.
-For example, in a SwiftUI app:
+예시: SwiftUI 앱에서
```swift title="ContentView.swift"
struct ContentView: View {
@@ -120,9 +120,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 로그인 중 오류 발생
} catch {
- // other errors
+ // 기타 오류
}
}
}
@@ -134,8 +134,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- 로그아웃 후 리디렉션 URI 없이 `client.signOut()`만 호출할 수도 있습니다. 이 경우 Console 설정이 필요하지 않습니다: 브라우저에 Logto 로그아웃 페이지가 표시되고, 사용자는 수동으로 닫아 앱으로 돌아갑니다.
+- UI 컨텍스트가 없는 경우, `client.clearCredentials()`를 호출하여 로컬 자격 증명을 삭제하고 리프레시 토큰을 폐기할 수 있습니다. 이 경우 브라우저의 Logto 세션은 유지되므로, 다음 `signInWithBrowser` 호출 시 해당 세션을 통해 사용자가 자동으로 다시 로그인될 수 있습니다.
:::
@@ -143,9 +143,9 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+`client.signInWithBrowser(redirectUri:)`로 사용자를 로그인시키고, `client.signOut()`으로 로그아웃시킬 수 있습니다.
-For example, in a SwiftUI app:
+예시: SwiftUI 앱에서
```swift title="ContentView.swift"
struct ContentView: View {
@@ -171,9 +171,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 로그인 중 오류 발생
} catch {
- // other errors
+ // 기타 오류
}
}
}
diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index beed4fb86c8..eeba89f2094 100644
--- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -2,10 +2,10 @@
slug: /quick-starts/android
sidebar_label: Android (Kotlin / Java)
sidebar_custom_props:
- description: Guia de integração Android.
+ description: Guia de integração com Android.
language: kotlin/java
official_link: https://developer.android.com
-app_type: Native app
+app_type: Aplicativo nativo
framework: Android
---
@@ -39,7 +39,7 @@ Este guia mostrará como integrar o Logto ao seu aplicativo Android.
## Pré-requisitos \{#prerequisites}
-- Uma conta [Logto Cloud](https://cloud.logto.io) ou um [Logto auto-hospedado](/introduction/set-up-logto-oss).
+- Uma conta no [Logto Cloud](https://cloud.logto.io) ou um [Logto auto-hospedado](/introduction/set-up-logto-oss).
- Um aplicativo nativo Logto criado.
- Um projeto de aplicativo Android em Kotlin.
@@ -67,13 +67,13 @@ No Android, o URI de redirecionamento segue o padrão: `$(LOGTO_REDIRECT_SCHEME)
- O `LOGTO_REDIRECT_SCHEME` deve ser um esquema personalizado no formato de domínio reverso.
- O `YOUR_APP_PACKAGE` é o nome do pacote do seu aplicativo.
-Assumindo que você trate `io.logto.android` como o esquema personalizado `LOGTO_REDIRECT_SCHEME`, e `io.logto.sample` seja o nome do pacote do seu aplicativo, o URI de redirecionamento deve ser `io.logto.android://io.logto.sample/callback`.
+Assumindo que você use `io.logto.android` como o esquema personalizado `LOGTO_REDIRECT_SCHEME`, e `io.logto.sample` como o nome do pacote do seu aplicativo, o URI de redirecionamento deve ser `io.logto.android://io.logto.sample/callback`.
-
+
-Na v3, a experiência de login abre em uma [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (o navegador do sistema), e o redirecionamento é roteado de volta para o seu aplicativo por meio de um filtro de intent no nível do sistema operacional. Você precisa declarar o esquema do seu URI de redirecionamento com o placeholder de manifesto `logtoRedirectScheme` no arquivo de build do seu aplicativo:
+Na v3, a experiência de login é aberta em uma [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (o navegador do sistema), e o redirecionamento é roteado de volta ao seu aplicativo por meio de um filtro de intent em nível de sistema operacional. Você precisa declarar o esquema do seu URI de redirecionamento com o placeholder de manifesto `logtoRedirectScheme` no arquivo de build do seu aplicativo:
@@ -103,13 +103,13 @@ android {
-Além disso, a v3 impõe o padrão de URI de redirecionamento por meio da correspondência de filtros de intent do Android, portanto um URI de redirecionamento que desvia do padrão nunca é entregue ao seu aplicativo:
+Além disso, a v3 reforça o padrão do URI de redirecionamento por meio da correspondência do filtro de intent do Android, então um URI de redirecionamento que desvie do padrão nunca será entregue ao seu aplicativo:
- O esquema deve ser igual ao placeholder de manifesto `logtoRedirectScheme`.
-- O host deve ser o seu `applicationId`.
+- O host deve ser seu `applicationId`.
- O caminho deve ser `/callback`.
-Mantenha o esquema e o host em letras minúsculas, pois a correspondência de filtros de intent diferencia maiúsculas de minúsculas e os navegadores convertem o esquema para minúsculas.
+Mantenha o esquema e o host em minúsculas, pois a correspondência do filtro de intent diferencia maiúsculas de minúsculas e os navegadores convertem o esquema para minúsculas.
@@ -119,18 +119,18 @@ Mantenha o esquema e o host em letras minúsculas, pois a correspondência de fi
-Para usar [Android App Links](https://developer.android.com/training/app-links) (um URI de redirecionamento `https` em um domínio seu) em vez do esquema personalizado:
+Para usar [Android App Links](https://developer.android.com/training/app-links) (um URI de redirecionamento `https` em um domínio que você possui) em vez do esquema personalizado:
-1. Hospede o arquivo [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) em `https://seu.dominio/.well-known/assetlinks.json`, declarando o ID do seu aplicativo e as impressões digitais SHA-256 dos seus certificados de assinatura. Ao publicar com o Play App Signing, você pode encontrar a impressão digital de lançamento no Play Console em **Configuração** > **Assinatura de app**. O arquivo deve ser servido como `Content-Type: application/json` com HTTP 200 e sem redirecionamentos.
+1. Hospede o arquivo [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) em `https://your.domain/.well-known/assetlinks.json`, declarando seu application ID e as impressões digitais SHA-256 dos seus certificados de assinatura. Ao publicar com Play App Signing, você pode encontrar a impressão digital de release no Play Console em **Configuração** > **Assinatura do app**. O arquivo deve ser servido como `Content-Type: application/json` com HTTP 200 e sem redirecionamentos.
-2. Declare o filtro de intent do App Links na atividade receptora de redirecionamento do SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` no seu arquivo `AndroidManifest.xml`. Se você não usar o esquema personalizado, remova o filtro integrado do SDK com `tools:node="removeAll"`, e o placeholder de manifesto `logtoRedirectScheme` não será mais necessário:
+2. Declare o intent filter de App Links na activity de recebimento de redirecionamento do SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` no seu arquivo `AndroidManifest.xml`. Se você não usar o esquema personalizado, remova o filtro padrão do SDK com `tools:node="removeAll"`, e o placeholder de manifesto `logtoRedirectScheme` não será mais necessário:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ Para usar [Android App Links](https://developer.android.com/training/app-links)
```
-3. Adicione `https://seu.dominio/callback` como URI de redirecionamento (e, se usado para logout, como URI de redirecionamento pós-logout) na página de detalhes do aplicativo no Logto Console, e passe-o para `signIn` / `signOut`.
+3. Adicione `https://your.domain/callback` como um URI de redirecionamento (e, se for usado para logout, um URI de redirecionamento pós-logout) na página de detalhes do aplicativo no Logto Console, e passe-o para `signIn` / `signOut`.
-Lembre-se de que o callback agora é uma URL real no seu domínio, portanto sirva uma página de fallback lá (por exemplo, um botão "Retornar ao app") para navegadores que não iniciam App Links em um redirecionamento de servidor. O botão precisa apenas vincular à URL atual (por exemplo, definindo `href` como `window.location.href`): os parâmetros de autorização estão na query string, e um clique iniciado pelo usuário dá à mesma URL mais uma chance de ser roteada para o seu aplicativo. No Android 12+, um domínio não verificado nunca abre o aplicativo, portanto um `assetlinks.json` com erro falha silenciosamente. Você pode verificar o estado de verificação com `adb shell pm get-app-links `.
+Lembre-se de que o callback agora é uma URL real no seu domínio, então sirva uma página de fallback lá (por exemplo, um botão "Retornar ao app") para navegadores que não abrem App Links em um redirecionamento do servidor. O botão só precisa apontar para a URL atual (por exemplo, definindo `href` para `window.location.href`): os parâmetros de autorização estão na query string, e um clique iniciado pelo usuário dá à mesma URL outra chance de ser roteada para o seu app. No Android 12+ um domínio não verificado nunca abre o app, então um `assetlinks.json` quebrado falha silenciosamente. Você pode verificar o estado da verificação com `adb shell pm get-app-links `.
@@ -153,7 +153,7 @@ Lembre-se de que o callback agora é uma URL real no seu domínio, portanto sirv
-Nenhuma configuração adicional é necessária. A experiência de login abre em uma WebView incorporada, e o SDK intercepta o redirecionamento dentro da WebView.
+Nenhuma configuração adicional é necessária. A experiência de login é aberta em um WebView embutido, e o SDK intercepta o redirecionamento dentro do WebView.
@@ -169,13 +169,13 @@ Nenhuma configuração adicional é necessária. A experiência de login abre em
### Exibir informações do usuário \{#display-user-information}
-Para exibir as informações do usuário, você pode usar o método `logtoClient.getIdTokenClaims()`. Por exemplo, você pode obter informações do usuário em um ViewModel e então exibi-las em sua atividade:
+Para exibir as informações do usuário, você pode usar o método `logtoClient.getIdTokenClaims()`. Por exemplo, você pode obter as informações do usuário em um ViewModel e depois exibi-las em sua activity:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...outros códigos
- // Adicionar um live data para observar as reivindicações do token de ID
+ // Adicione um live data para observar as reivindicações do id token
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -194,7 +194,7 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...outros códigos
- // Suponha que você tenha uma TextView com id `user_info_text_view` em seu layout
+ // Suponha que você tenha um TextView com id `user_info_text_view` no seu layout
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -218,20 +218,20 @@ Para solicitar escopos adicionais, você pode passá-los para o objeto `LogtoCon
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...outras configurações
+ // ...outras configs
// highlight-start
scopes = listOf("email", "phone"), // ou `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
)
```
-Então você pode acessar as reivindicações adicionais no valor de retorno de `logtoClient.getIdTokenClaims()`:
+Então você pode acessar as reivindicações adicionais no valor retornado de `logtoClient.getIdTokenClaims()`:
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// Agora você pode acessar reivindicações adicionais `claims.email`, `claims.phone`, etc.
+// Agora você pode acessar as reivindicações adicionais `claims.email`, `claims.phone`, etc.
```
-
+
-Na v3, `logtoClient.signOut` realiza um logout completo: limpa as credenciais locais, revoga o refresh token e encerra a sessão do Logto abrindo o endpoint de encerramento de sessão no navegador. O navegador então navega de volta para o seu aplicativo por meio do URI de redirecionamento pós-logout. Antes de usá-lo, acesse a página de detalhes do aplicativo no Logto Console, adicione o URI de redirecionamento pós-logout `io.logto.android://io.logto.sample/callback` e clique em "Salvar alterações". O URI de redirecionamento pós-logout segue o mesmo padrão que o URI de redirecionamento, e seu esquema também deve corresponder ao placeholder de manifesto `logtoRedirectScheme`.
+Na v3, `logtoClient.signOut` realiza uma saída completa: limpa as credenciais locais, revoga o token de atualização (refresh token) e encerra a sessão Logto abrindo o endpoint de encerramento de sessão no navegador. O navegador então retorna ao seu app através do post sign-out redirect URI. Antes de usar, acesse a página de detalhes do aplicativo no Logto Console, adicione o post sign-out redirect URI `io.logto.android://io.logto.sample/callback` e clique em "Salvar alterações". O post sign-out redirect URI segue o mesmo padrão do redirect URI, e seu esquema também deve corresponder ao placeholder de manifesto `logtoRedirectScheme`.
-Por exemplo, em um aplicativo Android:
+Por exemplo, em um app Android:
```kotlin title="LogtoModelView.kt"
//...com outros imports
@@ -43,7 +43,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
}
```
-Em seguida, chame os métodos `signIn` e `signOut` na sua atividade:
+Depois, chame os métodos `signIn` e `signOut` em sua activity:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
@@ -64,7 +64,7 @@ class MainActivity : AppCompatActivity() {
}
}
- // Observe o status de autenticação para atualizar a interface do usuário
+ // Observe o status de autenticação para atualizar a UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// O usuário está autenticado
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- Você também pode chamar `logtoClient.signOut(context)` sem um URI de redirecionamento pós-logout. Nenhuma configuração no Console é necessária neste caso: o navegador exibe a página de logout do Logto, e o usuário retorna ao aplicativo dispensando-a manualmente.
-- Se nenhum contexto de interface do usuário estiver disponível, você pode chamar `logtoClient.clearCredentials` para limpar as credenciais locais e revogar o refresh token. Observe que isso mantém a sessão do Logto no navegador, portanto o próximo `signIn` pode autenticar o usuário silenciosamente por meio dessa sessão.
+- Você também pode chamar `logtoClient.signOut(context)` sem um post sign-out redirect URI. Nenhuma configuração no Console é necessária nesse caso: o navegador mostra a página de saída do Logto, e o usuário retorna ao app fechando-a manualmente.
+- Se nenhum contexto de UI estiver disponível, você pode chamar `logtoClient.clearCredentials` para limpar as credenciais locais e revogar o token de atualização (refresh token). Observe que isso mantém a sessão Logto no navegador, então o próximo `signIn` pode autenticar o usuário silenciosamente através dessa sessão.
:::
@@ -92,7 +92,7 @@ class MainActivity : AppCompatActivity() {
-Por exemplo, em um aplicativo Android:
+Por exemplo, em um app Android:
```kotlin title="LogtoModelView.kt"
//...com outros imports
@@ -122,7 +122,7 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
}
```
-Em seguida, chame os métodos `signIn` e `signOut` na sua atividade:
+Depois, chame os métodos `signIn` e `signOut` em sua activity:
```kotlin title="MainActivity.kt"
class MainActivity : AppCompatActivity() {
@@ -143,7 +143,7 @@ class MainActivity : AppCompatActivity() {
}
}
- // Observe o status de autenticação para atualizar a interface do usuário
+ // Observe o status de autenticação para atualizar a UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
// O usuário está autenticado
diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index bb53ae3a949..c4b74062bc2 100644
--- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,15 +2,15 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-O nível mínimo de API Android suportado pelo Logto Android SDK é o nível 24.
+O nível mínimo de API do Android suportado pelo Logto Android SDK é o nível 24.
:::
-O Logto Android SDK vem em duas versões principais:
+O Logto Android SDK está disponível em duas versões principais:
-- **v3 (beta)**: Abre a experiência de login no [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (o navegador do sistema), o que desbloqueia o login com passkey e compartilha a sessão do navegador. Observe que a v3 remove o suporte aos conectores WeChat (Native) e Alipay (Native) ; você pode usar WeChat (Web) e Alipay (Web) em vez disso, que funcionam pelo navegador. Se você depende dos conectores nativos, permaneça na v2.
-- **v2**: Abre a experiência de login em uma WebView incorporada, necessária para os conectores sociais nativos, mas não suporta login com passkey (a WebView não suporta WebAuthn, o padrão subjacente das passkeys).
+- **v3**: Abre a experiência de login em [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (o navegador do sistema), o que permite o login com passkey e compartilha a sessão do navegador. Observe que a v3 remove o suporte para os conectores WeChat (Nativo) e Alipay (Nativo) ; você pode usar WeChat (Web) e Alipay (Web) em vez disso, que funcionam através do navegador. Se você depende dos conectores nativos, permaneça na v2.
+- **v2**: Abre a experiência de login em um WebView incorporado, o que é necessário para os conectores sociais nativos, mas não suporta login com passkey (WebView não suporta WebAuthn, o padrão subjacente das passkeys).
-Este guia abrange ambas as versões. Escolha sua versão nas abas abaixo, e a escolha será mantida sincronizada ao longo deste guia.
+Este guia cobre ambas as versões. Escolha sua versão nas abas abaixo, e a escolha será mantida sincronizada ao longo deste guia.
Antes de instalar o Logto Android SDK, certifique-se de que `mavenCentral()` está adicionado à configuração do seu repositório no arquivo de build do projeto Gradle:
@@ -26,9 +26,9 @@ Adicione o Logto Android SDK às suas dependências:
-
+
-A v3 é lançada como pré-lançamentos `3.0.0-beta` até a GA. Use o pré-lançamento mais recente como versão:
+Use a versão mais recente da v3 como versão:
@@ -36,7 +36,7 @@ A v3 é lançada como pré-lançamentos `3.0.0-beta` até a GA. Use o pré-lanç
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..a6a44538028 100644
--- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,47 +2,49 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+A versão mínima do iOS suportada pelo Logto Swift SDK é iOS 13.
:::
-Logto Swift SDK comes in two major versions:
+O Logto Swift SDK está disponível em duas versões principais:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**: Abre a experiência de login em [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (o navegador do sistema), o que permite o login com passkey e compartilha a sessão do navegador. Observe que a v2 remove os alvos de plugins sociais nativos; conectores sociais ainda funcionam pelo navegador. Se você depende da integração nativa com os SDKs do WeChat ou Alipay, permaneça na v1.
+- **v1**: Abre a experiência de login em um WebView embutido, o que é necessário para os alvos de plugins sociais nativos, mas não suporta login com passkey (WebView não suporta WebAuthn, o padrão subjacente das passkeys).
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+Este guia cobre ambas as versões. Escolha sua versão nas abas abaixo, e a escolha será mantida sincronizada ao longo deste guia.
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+Use a seguinte URL para adicionar o Logto SDK como dependência no Swift Package Manager.
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+Desde o Xcode 11, você pode [importar um pacote Swift diretamente](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) sem nenhuma ferramenta adicional.
-When Xcode asks for the package version, choose the version you want to integrate:
+Quando o Xcode solicitar a versão do pacote, escolha a versão que deseja integrar:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+Use a versão mais recente da v2 como versão. A versão mais recente da v2 é `2.0.0`.
-If you use `Package.swift` directly:
+Se você usar o `Package.swift` diretamente:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+// Adiciona o Logto SDK como dependência a partir da versão 2.0.0
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+Use a versão mais recente da v1 se precisar dos alvos de plugins sociais nativos. A versão mais recente da v1 é `1.2.0`.
-If you use `Package.swift` directly:
+Se você usar o `Package.swift` diretamente:
```swift title="Package.swift"
+// Adiciona o Logto SDK como dependência a partir da versão 1.2.0
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
```
@@ -50,7 +52,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+Não oferecemos suporte ao **Carthage** e **CocoaPods** no momento devido a algumas questões técnicas.
@@ -60,7 +62,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+O Carthage [precisa de um arquivo `xcodeproj` para compilar](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). Tentaremos encontrar uma solução alternativa futuramente.
@@ -72,6 +74,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+O CocoaPods [não suporta dependência local](https://github.com/CocoaPods/CocoaPods/issues/3276) e monorepo, portanto é difícil criar um `.podspec` para este repositório.
diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..b635271e7ec 100644
--- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### Configurar URI de redirecionamento \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+Na v2, a experiência de login é aberta em [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (o navegador do sistema), e o redirecionamento retorna para seu app através do emparelhamento de callback em nível de sistema operacional. Para um URI de redirecionamento com esquema personalizado como `io.logto.app://callback`, registre apenas a parte do esquema (`io.logto.app`) no `Info.plist` do seu app e adicione o URI de redirecionamento completo nos URIs de redirecionamento do seu aplicativo Logto.
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+No Xcode, abra o alvo do seu app, selecione **Info**, expanda **URL Types** e adicione uma entrada com `io.logto.app` em **URL Schemes**. Se editar o `Info.plist` diretamente, adicione:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+Para o fluxo via navegador na v2, não é necessário chamar `LogtoClient.handle(url:)`; essa API de handoff do plugin foi removida com o fluxo de WebView embutido.
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### Usar Universal Links em vez de um esquema personalizado? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+Você também pode usar um URI de redirecionamento HTTPS como `https://example.com/callback`:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. Adicione a capacidade Associated Domains ao seu app.
+2. Configure `webcredentials:example.com` para que o `ASWebAuthenticationSession` possa emparelhar callbacks HTTPS no iOS 17.4 e superior.
+3. Se a mesma URL também deve abrir seu app como um Universal Link fora da sessão de autenticação, configure `applinks:example.com` e hospede um arquivo `apple-app-site-association` válido para o domínio e caminho.
+4. Adicione o URI HTTPS nos URIs de redirecionamento do seu aplicativo Logto.
+5. Passe o mesmo URI para `signInWithBrowser`.
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+No iOS 17.4 e superior, o SDK usa a API de emparelhamento de callback HTTPS do `ASWebAuthenticationSession`, permitindo que redirecionamentos HTTPS completem e fechem a sessão automaticamente. Em versões anteriores do iOS, a solicitação de autorização ainda pode usar o URI de redirecionamento HTTPS, mas a sessão pode não ser fechada automaticamente, a menos que seu app trate o callback do Universal Link. Mantenha um redirecionamento com esquema personalizado como opção de compatibilidade caso precise de conclusão automática em versões antigas do iOS.
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+O URI de redirecionamento no SDK iOS é apenas para uso interno. _NÃO HÁ NECESSIDADE_ de adicionar um [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) até que um conector solicite.
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### Login e logout \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+Na v2, `client.signOut(postLogoutRedirectUri:)` realiza um logout completo: limpa as credenciais locais, revoga o token de atualização (refresh token) e encerra a sessão Logto abrindo o endpoint de finalização de sessão no navegador do sistema. O navegador então retorna para seu app através do URI de redirecionamento pós-logout. Antes de usar, acesse a página de detalhes do aplicativo no Logto Console, adicione o URI de redirecionamento pós-logout `io.logto.app://signed-out` e clique em "Salvar alterações". O URI de redirecionamento pós-logout pode usar o mesmo esquema personalizado registrado para login.
-For example, in a SwiftUI app:
+Por exemplo, em um app SwiftUI:
```swift title="ContentView.swift"
+// Comentários traduzidos abaixo
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // erro ocorrido durante o login
} catch {
- // other errors
+ // outros erros
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- Você também pode chamar `client.signOut()` sem um URI de redirecionamento pós-logout. Nenhuma configuração no Console é necessária neste caso: o navegador mostra a página de logout do Logto, e o usuário retorna ao app fechando-a manualmente.
+- Se não houver contexto de UI disponível, você pode chamar `client.clearCredentials()` para limpar as credenciais locais e revogar o token de atualização (refresh token). Note que isso mantém a sessão Logto no navegador, então o próximo `signInWithBrowser` pode autenticar o usuário automaticamente por essa sessão.
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+Você pode usar `client.signInWithBrowser(redirectUri:)` para autenticar o usuário e `client.signOut()` para realizar o logout.
-For example, in a SwiftUI app:
+Por exemplo, em um app SwiftUI:
```swift title="ContentView.swift"
+// Comentários traduzidos abaixo
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // erro ocorrido durante o login
} catch {
- // other errors
+ // outros erros
}
}
}
diff --git a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index a5ffd76d7c2..36d0d25a57e 100644
--- a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -2,10 +2,10 @@
slug: /quick-starts/android
sidebar_label: Android (Kotlin / Java)
sidebar_custom_props:
- description: คู่มือการเชื่อมต่อกับ Android
+ description: คู่มือการเชื่อมต่อ Android
language: kotlin/java
official_link: https://developer.android.com
-app_type: แอปเนทีฟ
+app_type: Native app
framework: Android
---
@@ -31,7 +31,7 @@ import ConfigApiResources from './api-resources/_config-api-resources.mdx';
import FetchAccessTokenForApiResources from './api-resources/_fetch-access-token-for-api-resources.mdx';
import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-token-for-user.mdx';
-# เพิ่มการยืนยันตัวตนให้กับแอป Android (Kotlin / Java) ของคุณ
+# เพิ่มการยืนยันตัวตนให้กับแอป Android (Kotlin/Java) ของคุณ
คู่มือนี้จะแสดงวิธีการเชื่อมต่อ Logto เข้ากับแอป Android ของคุณ
@@ -39,8 +39,8 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
## ข้อกำหนดเบื้องต้น \{#prerequisites}
-- บัญชี [Logto Cloud](https://cloud.logto.io) หรือ [Logto ที่ติดตั้งเอง](/introduction/set-up-logto-oss)
-- สร้างแอปเนทีฟของ Logto แล้ว
+- บัญชี [Logto Cloud](https://cloud.logto.io) หรือ [Logto แบบโฮสต์เอง](/introduction/set-up-logto-oss)
+- แอปพลิเคชัน Logto แบบ native ที่สร้างไว้แล้ว
- โปรเจกต์แอป Android ที่ใช้ Kotlin
## การติดตั้ง \{#installation}
@@ -65,15 +65,15 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
ใน Android, redirect URI จะมีรูปแบบ: `$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
- `LOGTO_REDIRECT_SCHEME` ควรเป็น custom scheme ในรูปแบบ reverse domain
-- `YOUR_APP_PACKAGE` คือชื่อแพ็กเกจของแอปคุณ
+- `YOUR_APP_PACKAGE` คือชื่อ package ของแอปคุณ
-สมมติว่าคุณใช้ `io.logto.android` เป็น custom `LOGTO_REDIRECT_SCHEME` และ `io.logto.sample` เป็นชื่อแพ็กเกจแอปของคุณ Redirect URI ควรเป็น `io.logto.android://io.logto.sample/callback`
+สมมติว่าคุณใช้ `io.logto.android` เป็น custom `LOGTO_REDIRECT_SCHEME` และ `io.logto.sample` เป็นชื่อ package ของแอป, Redirect URI ที่ได้จะเป็น `io.logto.android://io.logto.sample/callback`
-
+
-ใน v3 ประสบการณ์การลงชื่อเข้าใช้จะเปิดใน [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (เบราว์เซอร์ของระบบ) และการ redirect จะถูกส่งกลับไปยังแอปของคุณผ่าน intent filter ระดับ OS คุณจำเป็นต้องประกาศ scheme ของ redirect URI ด้วย `logtoRedirectScheme` manifest placeholder ในไฟล์ build ของแอปคุณ:
+ใน v3 ประสบการณ์การลงชื่อเข้าใช้จะเปิดใน [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (เบราว์เซอร์ของระบบ) และ redirect จะถูกส่งกลับไปยังแอปของคุณผ่าน intent filter ระดับ OS คุณต้องประกาศ scheme ของ redirect URI ด้วย manifest placeholder `logtoRedirectScheme` ในไฟล์ build ของแอป:
@@ -103,34 +103,34 @@ android {
-นอกจากนี้ v3 บังคับรูปแบบ redirect URI ผ่านการจับคู่ intent filter ของ Android ดังนั้น redirect URI ที่เบี่ยงเบนจากรูปแบบจะไม่ถูกส่งไปยังแอปของคุณ:
+นอกจากนี้ v3 จะบังคับใช้รูปแบบ redirect URI ผ่านการจับคู่ intent filter ของ Android ดังนั้น redirect URI ที่ไม่ตรงตามรูปแบบจะไม่ถูกส่งถึงแอปของคุณ:
-- scheme ต้องเท่ากับ `logtoRedirectScheme` manifest placeholder
+- scheme ต้องตรงกับ manifest placeholder `logtoRedirectScheme`
- host ต้องเป็น `applicationId` ของคุณ
- path ต้องเป็น `/callback`
-ให้ scheme และ host เป็นตัวพิมพ์เล็ก เนื่องจากการจับคู่ intent filter คำนึงถึงตัวพิมพ์เล็กใหญ่ และเบราว์เซอร์จะแปลง scheme เป็นตัวพิมพ์เล็ก
+ควรใช้ตัวพิมพ์เล็กสำหรับ scheme และ host เนื่องจากการจับคู่ intent filter เป็นแบบ case-sensitive และเบราว์เซอร์จะเปลี่ยน scheme เป็นตัวพิมพ์เล็ก
-#### ใช้ App Links แทน custom scheme? \{#use-app-links-instead-of-a-custom-scheme}
+#### ใช้ App Links แทน custom scheme ได้หรือไม่? \{#use-app-links-instead-of-a-custom-scheme}
-หากต้องการใช้ [Android App Links](https://developer.android.com/training/app-links) (redirect URI แบบ `https` บนโดเมนที่คุณเป็นเจ้าของ) แทน custom scheme:
+หากต้องการใช้ [Android App Links](https://developer.android.com/training/app-links) (redirect URI แบบ `https` บนโดเมนของคุณเอง) แทน custom scheme:
-1. โฮสต์ไฟล์ [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) ที่ `https://your.domain/.well-known/assetlinks.json` โดยระบุ application ID และลายนิ้วมือ SHA-256 ของใบรับรองการลงนามของคุณ เมื่อเผยแพร่ด้วย Play App Signing คุณสามารถดูลายนิ้วมือ release ได้ใน Play Console ใต้ **Setup** > **App signing** ไฟล์ต้องให้บริการเป็น `Content-Type: application/json` พร้อม HTTP 200 และไม่มี redirect
+1. โฮสต์ไฟล์ [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) ที่ `https://your.domain/.well-known/assetlinks.json` โดยประกาศ application ID และ SHA-256 fingerprint ของ certificate ที่ใช้เซ็นแอป หากเผยแพร่ผ่าน Play App Signing สามารถดู fingerprint ได้ใน Play Console ที่ **Setup** > **App signing** ไฟล์นี้ต้องให้บริการด้วย `Content-Type: application/json` ตอบกลับ HTTP 200 และไม่มี redirect
-2. ประกาศ App Links intent filter บน activity รับ redirect ของ SDK `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` ในไฟล์ `AndroidManifest.xml` ของคุณ หากคุณไม่ได้ใช้ custom scheme เลย ให้ลบ filter ที่ติดมากับ SDK ด้วย `tools:node="removeAll"` และ `logtoRedirectScheme` manifest placeholder ก็จะไม่จำเป็นอีกต่อไป:
+2. ประกาศ intent filter สำหรับ App Links บน activity `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` ของ SDK ในไฟล์ `AndroidManifest.xml` ของคุณ หากคุณไม่ใช้ custom scheme เลย ให้ลบ filter เดิมของ SDK ด้วย `tools:node="removeAll"` และไม่ต้องใช้ manifest placeholder `logtoRedirectScheme` อีกต่อไป:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ android {
```
-3. เพิ่ม `https://your.domain/callback` เป็น redirect URI (และหากใช้สำหรับการออกจากระบบ ให้เพิ่มเป็น post sign-out redirect URI ด้วย) ในหน้ารายละเอียดแอปของ Logto Console แล้วส่งไปยัง `signIn` / `signOut`
+3. เพิ่ม `https://your.domain/callback` เป็น redirect URI (และถ้าใช้สำหรับ sign-out ให้เพิ่มเป็น post sign-out redirect URI ด้วย) ในหน้า details ของแอปใน Logto Console และส่งค่าไปที่ `signIn` / `signOut`
-โปรดทราบว่า callback ตอนนี้เป็น URL จริงบนโดเมนของคุณ ดังนั้นให้บริการหน้า fallback ที่นั่น (เช่น ปุ่ม "กลับไปยังแอป") สำหรับเบราว์เซอร์ที่ไม่เปิด App Links เมื่อ server redirect ปุ่มนั้นเพียงแค่ต้องลิงก์ไปยัง URL ปัจจุบัน (เช่น กำหนด `href` เป็น `window.location.href`): พารามิเตอร์การอนุมัติอยู่ใน query string และการคลิกของผู้ใช้จะให้ URL เดิมโอกาสอีกครั้งในการถูกส่งไปยังแอปของคุณ บน Android 12+ โดเมนที่ยังไม่ได้ยืนยันจะไม่เปิดแอปเลย ดังนั้น `assetlinks.json` ที่เสียหายจะล้มเหลวโดยไม่มีข้อความแจ้ง คุณสามารถตรวจสอบสถานะการยืนยันด้วย `adb shell pm get-app-links `
+โปรดทราบว่า callback นี้เป็น URL จริงบนโดเมนของคุณ ดังนั้นควรให้บริการ fallback page (เช่น ปุ่ม “กลับสู่แอป”) สำหรับเบราว์เซอร์ที่ไม่เปิด App Links เมื่อ redirect จาก server ปุ่มนี้เพียงแค่ลิงก์ไปยัง URL ปัจจุบัน (เช่น ตั้ง `href` เป็น `window.location.href`) เพราะพารามิเตอร์การอนุญาตอยู่ใน query string และการคลิกโดยผู้ใช้จะให้โอกาส URL นี้ถูกส่งต่อไปยังแอปอีกครั้ง บน Android 12+ หากโดเมนไม่ผ่านการยืนยัน แอปจะไม่ถูกเปิดเลย ดังนั้นหาก `assetlinks.json` ผิดจะไม่มี error แจ้งเตือน สามารถตรวจสอบสถานะการยืนยันได้ด้วย `adb shell pm get-app-links `
@@ -153,13 +153,13 @@ android {
-ไม่จำเป็นต้องตั้งค่าเพิ่มเติม ประสบการณ์การลงชื่อเข้าใช้จะเปิดใน WebView แบบฝัง และ SDK จะดักจับการ redirect ภายใน WebView
+ไม่ต้องตั้งค่าเพิ่มเติม ประสบการณ์การลงชื่อเข้าใช้จะเปิดใน WebView ที่ฝังอยู่ และ SDK จะดักจับ redirect ภายใน WebView
-### ดำเนินการลงชื่อเข้าใช้และออกจากระบบ \{#implement-sign-in-and-sign-out}
+### ดำเนินการ sign-in และ sign-out \{#implement-sign-in-and-sign-out}
@@ -169,13 +169,13 @@ android {
### แสดงข้อมูลผู้ใช้ \{#display-user-information}
-เพื่อแสดงข้อมูลของผู้ใช้ คุณสามารถใช้เมธอด `logtoClient.getIdTokenClaims()` ตัวอย่างเช่น คุณสามารถดึงข้อมูลผู้ใช้ใน ViewModel แล้วนำไปแสดงใน activity ของคุณ:
+หากต้องการแสดงข้อมูลของผู้ใช้ สามารถใช้เมธอด `logtoClient.getIdTokenClaims()` ตัวอย่างเช่น สามารถดึงข้อมูลผู้ใช้ใน ViewModel แล้วนำไปแสดงใน activity ของคุณ:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...โค้ดอื่น ๆ
- // เพิ่ม live data เพื่อสังเกต id token claims
+ // เพิ่ม live data สำหรับสังเกต id token claims
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...with other imports
+//...import อื่น ๆ
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...โค้ดอื่น ๆ
- // สมมติว่าคุณมี TextView ที่ id `user_info_text_view` ใน layout ของคุณ
+ // สมมติว่าคุณมี text View ที่ id `user_info_text_view` ใน layout
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -214,11 +214,11 @@ class MainActivity : AppCompatActivity() {
-หากต้องการขอ scopes เพิ่มเติม คุณสามารถส่ง scopes ไปที่อ็อบเจกต์ `LogtoConfig` ตัวอย่างเช่น:
+หากต้องการขอ scopes เพิ่มเติม สามารถส่ง scopes ไปที่อ็อบเจกต์ `LogtoConfig` ตัวอย่างเช่น:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...การตั้งค่าอื่น ๆ
+ // ...config อื่น ๆ
// highlight-start
scopes = listOf("email", "phone"), // หรือ `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
@@ -248,7 +248,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
}
/>
-### ขอบเขตและการอ้างสิทธิ์ (Scopes and claims) \{#scopes-and-claims}
+### Scopes และ claims \{#scopes-and-claims}
@@ -260,7 +260,7 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### ดึงโทเค็นการเข้าถึงสำหรับทรัพยากร API \{#fetch-access-token-for-the-api-resource}
+### ดึง access token สำหรับ API resource \{#fetch-access-token-for-the-api-resource}
diff --git a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index b7654ffc961..840d6e47642 100644
--- a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -9,11 +9,11 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-
+
-ใน v3 `logtoClient.signOut` จะดำเนินการออกจากระบบอย่างสมบูรณ์: ล้างข้อมูลประจำตัว local เพิกถอน refresh token และสิ้นสุด Logto session โดยการเปิด end session endpoint ในเบราว์เซอร์ จากนั้นเบราว์เซอร์จะนำทางกลับไปยังแอปของคุณผ่าน post sign-out redirect URI ก่อนใช้งาน ให้ไปที่หน้ารายละเอียดแอปของ Logto Console เพิ่ม post sign-out redirect URI `io.logto.android://io.logto.sample/callback` และคลิก "Save changes" post sign-out redirect URI ใช้รูปแบบเดียวกับ redirect URI และ scheme ของมันต้องตรงกับ `logtoRedirectScheme` manifest placeholder ด้วย
+ใน v3, `logtoClient.signOut` จะทำการออกจากระบบอย่างสมบูรณ์: ล้างข้อมูลรับรองในเครื่อง, เพิกถอนโทเค็นรีเฟรช (refresh token), และสิ้นสุดเซสชัน Logto โดยเปิด endpoint สำหรับจบเซสชันในเบราว์เซอร์ จากนั้นเบราว์เซอร์จะนำทางกลับไปยังแอปของคุณผ่าน post sign-out redirect URI ก่อนใช้งาน ให้ไปที่หน้ารายละเอียดแอปพลิเคชันใน Logto Console เพิ่ม post sign-out redirect URI `io.logto.android://io.logto.sample/callback` และคลิก "Save changes" โดย post sign-out redirect URI จะใช้รูปแบบเดียวกับ redirect URI และ scheme ต้องตรงกับ manifest placeholder `logtoRedirectScheme` ด้วย
-ตัวอย่างเช่น ในแอป Android:
+ตัวอย่างในแอป Android:
```kotlin title="LogtoModelView.kt"
//...with other imports
@@ -50,13 +50,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...other codes
- // สมมติว่าคุณมีปุ่มที่มี id "sign_in_button" ใน layout ของคุณ
+ // สมมติว่าคุณมีปุ่ม id "sign_in_button" ใน layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // สมมติว่าคุณมีปุ่มที่มี id "sign_out_button" ใน layout ของคุณ
+ // สมมติว่าคุณมีปุ่ม id "sign_out_button" ใน layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // ตรวจสอบว่าผู้ใช้ได้รับการยืนยันตัวตนหรือไม่
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- คุณยังสามารถเรียก `logtoClient.signOut(context)` โดยไม่มี post sign-out redirect URI ในกรณีนี้ไม่จำเป็นต้องตั้งค่าใน Console: เบราว์เซอร์จะแสดงหน้าออกจากระบบของ Logto และผู้ใช้กลับไปยังแอปโดยปิดด้วยตนเอง
-- หากไม่มี UI context ให้ใช้ คุณสามารถเรียก `logtoClient.clearCredentials` เพื่อล้างข้อมูลประจำตัว local และเพิกถอน refresh token โปรดทราบว่าการทำเช่นนี้จะเก็บ Logto session ไว้ในเบราว์เซอร์ ดังนั้น `signIn` ครั้งต่อไปอาจลงชื่อเข้าใช้ผู้ใช้ซ้ำโดยอัตโนมัติผ่าน session นั้น
+- คุณสามารถเรียก `logtoClient.signOut(context)` โดยไม่ต้องระบุ post sign-out redirect URI ก็ได้ กรณีนี้ไม่ต้องตั้งค่าใน Console: เบราว์เซอร์จะแสดงหน้าลงชื่อออกของ Logto และผู้ใช้จะกลับสู่แอปโดยปิดหน้าดังกล่าวด้วยตนเอง
+- หากไม่มี UI context คุณสามารถเรียก `logtoClient.clearCredentials` เพื่อล้างข้อมูลรับรองในเครื่องและเพิกถอนโทเค็นรีเฟรช (refresh token) ได้ โปรดทราบว่าวิธีนี้จะยังคงเซสชัน Logto ในเบราว์เซอร์ไว้ ดังนั้นการ `signIn` ครั้งถัดไปอาจลงชื่อเข้าใช้โดยอัตโนมัติผ่านเซสชันนั้น
:::
@@ -92,7 +92,7 @@ class MainActivity : AppCompatActivity() {
-ตัวอย่างเช่น ในแอป Android:
+ตัวอย่างในแอป Android:
```kotlin title="LogtoModelView.kt"
//...with other imports
@@ -129,13 +129,13 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...other codes
- // สมมติว่าคุณมีปุ่มที่มี id "sign_in_button" ใน layout ของคุณ
+ // สมมติว่าคุณมีปุ่ม id "sign_in_button" ใน layout
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // สมมติว่าคุณมีปุ่มที่มี id "sign_out_button" ใน layout ของคุณ
+ // สมมติว่าคุณมีปุ่ม id "sign_out_button" ใน layout
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
if (logtoViewModel.authenticated) { // ตรวจสอบว่าผู้ใช้ได้รับการยืนยันตัวตนหรือไม่
diff --git a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index e102c2fc89b..01f1d2dbc00 100644
--- a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -5,14 +5,14 @@ import Tabs from '@theme/Tabs';
ระดับ API ขั้นต่ำของ Android ที่รองรับโดย Logto Android SDK คือระดับ 24
:::
-Logto Android SDK มาในสองเวอร์ชันหลัก:
+Logto Android SDK มีสองเวอร์ชันหลัก:
-- **v3 (beta)**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (เบราว์เซอร์ของระบบ) ซึ่งเปิดใช้งานการลงชื่อเข้าใช้ด้วย passkey และแชร์ session ของเบราว์เซอร์ โปรดทราบว่า v3 ยกเลิกการรองรับ connector WeChat (Native) และ Alipay (Native) คุณสามารถใช้ WeChat (Web) และ Alipay (Web) แทนได้ ซึ่งทำงานผ่านเบราว์เซอร์ หากคุณพึ่งพา connector แบบเนทีฟ ให้ใช้ v2 ต่อไป
-- **v2**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน WebView แบบฝัง ซึ่งจำเป็นสำหรับ social connector แบบเนทีฟ แต่ไม่รองรับ การลงชื่อเข้าใช้ด้วย passkey (WebView ไม่รองรับ WebAuthn ซึ่งเป็นมาตรฐานพื้นฐานของ passkey)
+- **v3**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs) (เบราว์เซอร์ของระบบ) ซึ่งรองรับการลงชื่อเข้าใช้ด้วย passkey และแชร์เซสชันของเบราว์เซอร์ โปรดทราบว่า v3 ได้ยกเลิกการรองรับ WeChat (Native) และ Alipay (Native) connectors; คุณสามารถใช้ WeChat (Web) และ Alipay (Web) แทน ซึ่งทำงานผ่านเบราว์เซอร์ หากคุณต้องพึ่งพาตัวเชื่อมต่อแบบ native ให้ใช้ v2 ต่อไป
+- **v2**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน WebView ที่ฝังอยู่ในแอป ซึ่งจำเป็นสำหรับตัวเชื่อมต่อโซเชียลแบบ native แต่ไม่รองรับ การลงชื่อเข้าใช้ด้วย passkey (WebView ไม่รองรับ WebAuthn ซึ่งเป็นมาตรฐานพื้นฐานของ passkey)
-คู่มือนี้ครอบคลุมทั้งสองเวอร์ชัน เลือกเวอร์ชันของคุณในแท็บด้านล่าง และการเลือกจะถูกซิงค์ตลอดทั้งคู่มือนี้
+คู่มือนี้ครอบคลุมทั้งสองเวอร์ชัน เลือกเวอร์ชันของคุณในแท็บด้านล่าง และตัวเลือกจะถูกซิงค์ตลอดทั้งคู่มือนี้
-ก่อนติดตั้ง Logto Android SDK โปรดตรวจสอบให้แน่ใจว่าได้เพิ่ม `mavenCentral()` ในการตั้งค่าที่เก็บ repository ในไฟล์ build ของโปรเจกต์ Gradle แล้ว:
+ก่อนติดตั้ง Logto Android SDK ให้แน่ใจว่าได้เพิ่ม `mavenCentral()` ในการตั้งค่าที่ repository ของโปรเจกต์ Gradle แล้ว:
```kotlin title="settings.gradle.kts"
dependencyResolutionManagement {
@@ -26,9 +26,9 @@ dependencyResolutionManagement {
-
+
-v3 จะถูกปล่อยเป็น prerelease `3.0.0-beta` จนกว่าจะ GA ใช้ prerelease ล่าสุดเป็น version:
+ใช้เวอร์ชันล่าสุดของ v3:
@@ -36,7 +36,7 @@ v3 จะถูกปล่อยเป็น prerelease `3.0.0-beta` จนก
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,14 +86,14 @@ dependencies {
-เนื่องจาก SDK ต้องการเข้าถึงอินเทอร์เน็ต คุณจำเป็นต้องเพิ่ม permission ต่อไปนี้ในไฟล์ `AndroidManifest.xml` ของคุณ:
+เนื่องจาก SDK ต้องการเข้าถึงอินเทอร์เน็ต คุณต้องเพิ่ม permission ต่อไปนี้ในไฟล์ `AndroidManifest.xml` ของคุณ:
```xml title="AndroidManifest.xml"
-
+
diff --git a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..9712ff2bd91 100644
--- a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,47 +2,49 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+เวอร์ชัน iOS ขั้นต่ำที่รองรับของ Logto Swift SDK คือ iOS 13
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK มีสองเวอร์ชันหลัก:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (เบราว์เซอร์ของระบบ) ซึ่งรองรับการลงชื่อเข้าใช้ด้วย passkey และแชร์เซสชันเบราว์เซอร์ โปรดทราบว่า v2 ได้ลบ native social plugin targets ออกแล้ว; ตัวเชื่อมต่อโซเชียล (social connectors) ยังคงทำงานผ่านเบราว์เซอร์ หากคุณต้องพึ่ง native WeChat หรือ Alipay SDK handoff ให้ใช้ v1 ต่อไป
+- **v1**: เปิดประสบการณ์การลงชื่อเข้าใช้ใน WebView ที่ฝังอยู่ ซึ่งจำเป็นสำหรับ native social plugin targets แต่ไม่รองรับ การลงชื่อเข้าใช้ด้วย passkey (WebView ไม่รองรับ WebAuthn ซึ่งเป็นมาตรฐานพื้นฐานของ passkey)
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+คู่มือนี้ครอบคลุมทั้งสองเวอร์ชัน เลือกเวอร์ชันของคุณในแท็บด้านล่าง และตัวเลือกจะถูกซิงค์ตลอดทั้งคู่มือนี้
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+ใช้ URL ต่อไปนี้เพื่อเพิ่ม Logto SDK เป็น dependency ใน Swift Package Manager
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+ตั้งแต่ Xcode 11 เป็นต้นมา คุณสามารถ [นำเข้า Swift package ได้โดยตรง](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) โดยไม่ต้องใช้เครื่องมือเพิ่มเติม
-When Xcode asks for the package version, choose the version you want to integrate:
+เมื่อ Xcode ถามหาเวอร์ชันของแพ็กเกจ ให้เลือกเวอร์ชันที่คุณต้องการใช้งาน:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+ใช้เวอร์ชัน v2 ล่าสุดเป็นเวอร์ชันอ้างอิง เวอร์ชัน v2 ล่าสุดคือ `2.0.0`
-If you use `Package.swift` directly:
+หากคุณใช้ `Package.swift` โดยตรง:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+// เพิ่ม Logto SDK ด้วยเวอร์ชัน 2.0.0
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+ใช้เวอร์ชัน v1 ล่าสุดหากคุณต้องการ native social plugin targets เวอร์ชัน v1 ล่าสุดคือ `1.2.0`
-If you use `Package.swift` directly:
+หากคุณใช้ `Package.swift` โดยตรง:
```swift title="Package.swift"
+// เพิ่ม Logto SDK ด้วยเวอร์ชัน 1.2.0
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
```
@@ -50,7 +52,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+ขณะนี้เรายังไม่รองรับ **Carthage** และ **CocoaPods** เนื่องจากปัญหาทางเทคนิคบางประการ
@@ -60,7 +62,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [ต้องการไฟล์ `xcodeproj` เพื่อ build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385) เราจะพยายามหาวิธีแก้ไขในภายหลัง
@@ -72,6 +74,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [ไม่รองรับ local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) และ monorepo ดังนั้นจึงยากที่จะสร้าง `.podspec` สำหรับ repo นี้
diff --git a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..39abc5b5da8 100644
--- a/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/th/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### กำหนดค่า redirect URI \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+ใน v2 ประสบการณ์การลงชื่อเข้าใช้จะเปิดใน [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (เบราว์เซอร์ของระบบ) และการเปลี่ยนเส้นทาง (redirect) จะถูกส่งกลับไปยังแอปของคุณผ่านการจับคู่ callback ในระดับ OS สำหรับ redirect URI แบบ custom scheme เช่น `io.logto.app://callback` ให้ลงทะเบียนเฉพาะส่วน scheme (`io.logto.app`) ใน `Info.plist` ของแอปคุณ จากนั้นเพิ่ม redirect URI แบบเต็มใน Redirect URIs ของแอป Logto ของคุณ
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+ใน Xcode ให้เปิด target ของแอปคุณ เลือก **Info** ขยาย **URL Types** และเพิ่มรายการใหม่โดยใส่ `io.logto.app` ใน **URL Schemes** หากคุณแก้ไข `Info.plist` โดยตรง ให้เพิ่ม:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+สำหรับ browser flow ใน v2 คุณไม่จำเป็นต้องเรียก `LogtoClient.handle(url:)` อีกต่อไป; API สำหรับ handoff plugin นั้นถูกถอดออกไปพร้อมกับ flow แบบ embedded WebView
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### ใช้ Universal Links แทน custom scheme ได้ไหม? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+คุณสามารถใช้ redirect URI แบบ HTTPS เช่น `https://example.com/callback` ได้เช่นกัน:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. เพิ่มความสามารถ Associated Domains ให้กับแอปของคุณ
+2. กำหนดค่า `webcredentials:example.com` เพื่อให้ `ASWebAuthenticationSession` สามารถจับคู่ callback แบบ HTTPS บน iOS 17.4 ขึ้นไป
+3. หากต้องการให้ URL เดียวกันเปิดแอปของคุณเป็น Universal Link นอก session การยืนยันตัวตน ให้กำหนดค่า `applinks:example.com` และโฮสต์ไฟล์ `apple-app-site-association` ที่ถูกต้องสำหรับโดเมนและ path นั้น
+4. เพิ่ม HTTPS URI นี้ใน Redirect URIs ของแอป Logto ของคุณ
+5. ส่งค่า URI เดียวกันนี้ไปที่ `signInWithBrowser`
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+บน iOS 17.4 ขึ้นไป SDK จะใช้ API การจับคู่ callback แบบ HTTPS ของ `ASWebAuthenticationSession` ดังนั้น redirect แบบ HTTPS จะเสร็จสมบูรณ์และปิด session ให้อัตโนมัติ สำหรับ iOS เวอร์ชันเก่า คำขอการอนุญาตยังคงใช้ HTTPS redirect URI ได้ แต่ session อาจไม่ปิดเอง เว้นแต่แอปของคุณจะจัดการ callback ของ Universal Link เอง ควรเก็บ redirect แบบ custom scheme ไว้เป็นตัวเลือกเพื่อความเข้ากันได้ หากคุณต้องการให้ flow เสร็จสมบูรณ์อัตโนมัติบน iOS เวอร์ชันเก่า
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+Redirect URI ใน iOS SDK ใช้สำหรับการทำงานภายในเท่านั้น _ไม่จำเป็นต้อง_ เพิ่ม [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) จนกว่าตัวเชื่อมต่อจะร้องขอ
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### การลงชื่อเข้าใช้และออกจากระบบ \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+ใน v2 `client.signOut(postLogoutRedirectUri:)` จะทำการออกจากระบบอย่างสมบูรณ์: ล้างข้อมูลรับรองในเครื่อง, เพิกถอนโทเค็นรีเฟรช (refresh token), และสิ้นสุด session ของ Logto โดยเปิด endpoint สำหรับจบ session ในเบราว์เซอร์ของระบบ จากนั้นเบราว์เซอร์จะนำทางกลับไปยังแอปของคุณผ่าน post sign-out redirect URI ก่อนใช้งาน ให้ไปที่หน้ารายละเอียดแอปใน Logto Console เพิ่ม post sign-out redirect URI `io.logto.app://signed-out` และคลิก "Save changes" โดย post sign-out redirect URI สามารถใช้ custom scheme เดียวกับที่คุณลงทะเบียนสำหรับการลงชื่อเข้าใช้
-For example, in a SwiftUI app:
+ตัวอย่างในแอป SwiftUI:
```swift title="ContentView.swift"
+// โค้ดเหมือนเดิม ไม่ต้องแปล
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- คุณสามารถเรียก `client.signOut()` โดยไม่ต้องระบุ post sign-out redirect URI ก็ได้ กรณีนี้ไม่ต้องตั้งค่าใน Console: เบราว์เซอร์จะแสดงหน้าลงชื่อออกของ Logto และผู้ใช้จะกลับเข้าแอปโดยปิดเบราว์เซอร์เอง
+- หากไม่มี UI context ให้เรียก `client.clearCredentials()` เพื่อล้างข้อมูลรับรองในเครื่องและเพิกถอนโทเค็นรีเฟรช (refresh token) โปรดทราบว่าสิ่งนี้จะคง session ของ Logto ในเบราว์เซอร์ไว้ ดังนั้นการ `signInWithBrowser` ครั้งถัดไปอาจลงชื่อเข้าใช้ผู้ใช้อัตโนมัติผ่าน session เดิม
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+คุณสามารถใช้ `client.signInWithBrowser(redirectUri:)` เพื่อลงชื่อเข้าใช้ผู้ใช้ และ `client.signOut()` เพื่อออกจากระบบ
-For example, in a SwiftUI app:
+ตัวอย่างในแอป SwiftUI:
```swift title="ContentView.swift"
+// โค้ดเหมือนเดิม ไม่ต้องแปล
struct ContentView: View {
@State var isAuthenticated: Bool
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 95b0f44e1c1..1aa8f8799cc 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -5,7 +5,7 @@ sidebar_custom_props:
description: Android 集成指南。
language: kotlin/java
official_link: https://developer.android.com
-app_type: Native app
+app_type: 原生应用
framework: Android
---
@@ -37,10 +37,10 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
-## 前提条件 \{#prerequisites}
+## 前置条件 \{#prerequisites}
-- 一个 [Logto Cloud](https://cloud.logto.io) 账户或一个 [自托管 Logto](/introduction/set-up-logto-oss)。
-- 一个已创建的 Logto 原生应用。
+- 一个 [Logto Cloud](https://cloud.logto.io) 账户或 [自托管 Logto](/introduction/set-up-logto-oss)。
+- 已创建的 Logto 原生应用。
- 一个 Kotlin Android 应用项目。
## 安装 \{#installation}
@@ -62,18 +62,18 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
redirectUri="io.logto.android://io.logto.sample/callback"
/>
-在 Android 中,重定向 URI 遵循模式:`$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
+在 Android 中,重定向 URI 遵循如下模式:`$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
-- `LOGTO_REDIRECT_SCHEME` 应该是一个反向域格式的自定义方案。
+- `LOGTO_REDIRECT_SCHEME` 应为反向域名格式的自定义 scheme。
- `YOUR_APP_PACKAGE` 是你的应用包名。
-假设你将 `io.logto.android` 作为自定义 `LOGTO_REDIRECT_SCHEME`,并且 `io.logto.sample` 是你的应用包名,那么重定向 URI 应为 `io.logto.android://io.logto.sample/callback`。
+假设你将 `io.logto.android` 作为自定义 `LOGTO_REDIRECT_SCHEME`,`io.logto.sample` 作为你的应用包名,则重定向 URI 应为 `io.logto.android://io.logto.sample/callback`。
-
+
-在 v3 中,登录体验在 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系统浏览器)中打开,重定向通过操作系统级别的 intent filter 路由回你的应用。你需要在应用的构建文件中使用 `logtoRedirectScheme` manifest 占位符声明重定向 URI 的方案:
+在 v3 中,登录体验会在 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系统浏览器)中打开,重定向通过操作系统级别的 intent filter 路由回你的应用。你需要在应用的构建文件中用 `logtoRedirectScheme` manifest 占位符声明你的重定向 URI 的 scheme:
@@ -103,34 +103,34 @@ android {
-此外,v3 通过 Android 的 intent filter 匹配强制执行重定向 URI 模式,因此偏离该模式的重定向 URI 永远不会被传递到你的应用:
+此外,v3 通过 Android 的 intent filter 匹配强制执行重定向 URI 模式,因此偏离该模式的重定向 URI 永远不会传递到你的应用:
-- 方案必须等于 `logtoRedirectScheme` manifest 占位符。
-- 主机必须是你的 `applicationId`。
-- 路径必须是 `/callback`。
+- scheme 必须等于 `logtoRedirectScheme` manifest 占位符。
+- host 必须为你的 `applicationId`。
+- path 必须为 `/callback`。
-请保持方案和主机为小写,因为 intent filter 匹配区分大小写,且浏览器会将方案转换为小写。
+请保持 scheme 和 host 为小写,因为 intent filter 匹配区分大小写,且浏览器会将 scheme 转为小写。
-#### 使用 App Links 替代自定义方案? \{#use-app-links-instead-of-a-custom-scheme}
+#### 使用 App Links 替代自定义 scheme?\{#use-app-links-instead-of-a-custom-scheme}
-要使用 [Android App Links](https://developer.android.com/training/app-links)(你所拥有域名上的 `https` 重定向 URI)替代自定义方案:
+如需使用 [Android App Links](https://developer.android.com/training/app-links)(你拥有域名下的 `https` 重定向 URI)替代自定义 scheme:
-1. 在 `https://your.domain/.well-known/assetlinks.json` 托管 [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 文件,声明你的应用 ID 和签名证书的 SHA-256 指纹。使用 Play App Signing 发布时,可以在 Play Console 的**设置** > **应用签名**下找到发布指纹。该文件必须以 `Content-Type: application/json` 和 HTTP 200 且无重定向的方式提供。
+1. 在 `https://your.domain/.well-known/assetlinks.json` 上托管 [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 文件,声明你的 application ID 和签名证书的 SHA-256 指纹。如果使用 Play App Signing 发布,你可以在 Play Console 的 **设置** > **应用签名** 下找到发布指纹。该文件必须以 `Content-Type: application/json`、HTTP 200 且无重定向的方式提供。
-2. 在你的 `AndroidManifest.xml` 文件中,在 SDK 的重定向接收 activity `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` 上声明 App Links intent filter。如果你完全不使用自定义方案,可使用 `tools:node="removeAll"` 删除 SDK 的内置 filter,此时不再需要 `logtoRedirectScheme` manifest 占位符:
+2. 在你的 `AndroidManifest.xml` 文件中,给 SDK 的重定向接收 Activity `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` 声明 App Links intent filter。如果你完全不使用自定义 scheme,可以用 `tools:node="removeAll"` 移除 SDK 内置的 filter,此时 `logtoRedirectScheme` manifest 占位符也不再需要:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ android {
```
-3. 在 Logto Console 的应用详情页中,将 `https://your.domain/callback` 添加为重定向 URI(如果用于登出,也添加为登出后重定向 URI),并将其传递给 `signIn` / `signOut`。
+3. 在 Logto 控制台的应用详情页添加 `https://your.domain/callback` 作为重定向 URI(如用于登出,也作为登出后重定向 URI),并传递给 `signIn` / `signOut`。
-请注意,回调现在是你域名上的真实 URL,因此请在该处为不会在服务器重定向时启动 App Links 的浏览器提供一个备用页面(例如,一个"返回应用"按钮)。该按钮只需链接到当前 URL(例如,将 `href` 设置为 `window.location.href`):授权参数在查询字符串中,用户主动点击可给同一 URL 再次路由到你的应用的机会。在 Android 12+ 中,未经验证的域名永远不会打开应用,因此损坏的 `assetlinks.json` 会静默失败。你可以使用 `adb shell pm get-app-links ` 检查验证状态。
+请注意,回调现在是你域名下的真实 URL,因此需要在该地址提供一个备用页面(例如“返回应用”按钮),以便在浏览器未能通过服务器重定向启动 App Links 时使用。该按钮只需链接到当前 URL(如将 `href` 设为 `window.location.href`):授权参数已在查询字符串中,用户点击可再次尝试路由到你的应用。在 Android 12+ 上,未验证的域名不会打开应用,因此损坏的 `assetlinks.json` 会静默失败。你可以用 `adb shell pm get-app-links ` 检查验证状态。
@@ -153,13 +153,13 @@ android {
-无需额外配置。登录体验在嵌入式 WebView 中打开,SDK 在 WebView 内部拦截重定向。
+无需额外设置。登录体验会在内嵌 WebView 中打开,SDK 会在 WebView 内部拦截重定向。
-### 实现登录和登出 \{#implement-sign-in-and-sign-out}
+### 实现登录与登出 \{#implement-sign-in-and-sign-out}
@@ -167,15 +167,15 @@ android {
## 获取用户信息 \{#get-user-information}
-### 显示用户信息 \{#display-user-information}
+### 展示用户信息 \{#display-user-information}
-要显示用户的信息,你可以使用 `logtoClient.getIdTokenClaims()` 方法。例如,你可以在 ViewModel 中获取用户信息,然后在你的活动中显示它:
+要展示用户信息,你可以使用 `logtoClient.getIdTokenClaims()` 方法。例如,你可以在 ViewModel 中获取用户信息,然后在 Activity 中展示:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...其他代码
- // 添加一个 live data 以观察 id token 声明 (Claims)
+ // 添加 LiveData 以监听 id token claims
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...与其他导入
+//...with other imports
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...其他代码
- // 假设你在布局中有一个 id 为 `user_info_text_view` 的文本视图
+ // 假设你的布局中有一个 id 为 `user_info_text_view` 的 TextView
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -208,13 +208,13 @@ class MainActivity : AppCompatActivity() {
}
```
-### 请求额外的声明 (Claims) \{#request-additional-claims}
+### 请求额外声明 (Claims) \{#request-additional-claims}
-要请求额外的权限 (Scopes),你可以将权限传递给 `LogtoConfig` 对象。例如:
+如需请求额外的权限 (Scopes),你可以将权限传递给 `LogtoConfig` 对象。例如:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
@@ -225,13 +225,13 @@ private val logtoConfig = LogtoConfig(
)
```
-然后你可以在 `logtoClient.getIdTokenClaims()` 的返回值中访问额外的声明 (Claims):
+然后你可以在 `logtoClient.getIdTokenClaims()` 的返回值中访问这些额外的声明 (Claims):
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// 现在你可以访问额外的声明 `claims.email`、`claims.phone` 等。
+// 现在你可以访问额外的声明 claims.email、claims.phone 等
```
}
/>
-### 权限 (Scopes) 和声明 (Claims) \{#scopes-and-claims}
+### 权限 (Scopes) 与声明 (Claims) \{#scopes-and-claims}
-## API 资源和组织 (Organizations) \{#api-resources-and-organizations}
+## API 资源与组织 (Organizations) \{#api-resources-and-organizations}
@@ -260,11 +260,11 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-### 获取 API 资源的访问令牌 \{#fetch-access-token-for-the-api-resource}
+### 获取 API 资源的访问令牌 (Access Token) \{#fetch-access-token-for-the-api-resource}
-### 获取组织令牌 \{#fetch-organization-tokens}
+### 获取组织令牌 (Organization Tokens) \{#fetch-organization-tokens}
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index 75d11326bfc..f5e937257ab 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,13 +5,13 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-你可以使用 `logtoClient.signIn` 来让用户登录,并使用 `logtoClient.signOut` 来让用户登出。
+你可以使用 `logtoClient.signIn` 让用户登录,使用 `logtoClient.signOut` 让用户登出。
-
+
-在 v3 中,`logtoClient.signOut` 执行完整的登出操作:它清除本地凭证、撤销刷新令牌,并通过在浏览器中打开 end session 端点来结束 Logto 会话。浏览器随后通过登出后重定向 URI 导航回你的应用。使用前,请切换到 Logto Console 的应用详情页,添加登出后重定向 URI `io.logto.android://io.logto.sample/callback` 并点击"保存更改"。登出后重定向 URI 遵循与重定向 URI 相同的模式,其方案也必须与 `logtoRedirectScheme` manifest 占位符匹配。
+在 v3 中,`logtoClient.signOut` 会执行完整的登出操作:它会清除本地凭据、撤销刷新令牌 (Refresh token),并通过在浏览器中打开结束会话端点来结束 Logto 会话。随后,浏览器会通过登出后重定向 URI 跳转回你的应用。在使用前,请前往 Logto Console 的应用详情页,添加登出后重定向 URI `io.logto.android://io.logto.sample/callback` 并点击“保存更改”。登出后重定向 URI 的格式与重定向 URI 相同,其 scheme 也必须与 `logtoRedirectScheme` manifest 占位符一致。
例如,在 Android 应用中:
@@ -20,7 +20,7 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...other codes
- // 添加一个 live data 来观察认证状态
+ // 添加一个 live data 用于监听认证 (Authentication) 状态
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -59,19 +59,19 @@ class MainActivity : AppCompatActivity() {
// 假设你的布局中有一个 id 为 "sign_out_button" 的按钮
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 检查用户是否已认证
+ if (logtoViewModel.authenticated) { // 检查用户是否已认证 (Authentication)
logtoViewModel.signOut(this)
}
}
- // 观察认证状态以更新 UI
+ // 监听认证 (Authentication) 状态以更新 UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 用户已认证
+ // 用户已认证 (Authentication)
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 用户未认证
+ // 用户未认证 (Authentication)
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- 你也可以不带登出后重定向 URI 调用 `logtoClient.signOut(context)`。在这种情况下无需 Console 配置:浏览器会显示 Logto 登出页面,用户手动关闭即可返回应用。
-- 如果没有可用的 UI context,你可以调用 `logtoClient.clearCredentials` 来清除本地凭证并撤销刷新令牌。注意,这会保留浏览器中的 Logto 会话,因此下次 `signIn` 可能通过该会话静默地将用户重新登录。
+- 你也可以直接调用 `logtoClient.signOut(context)`,不带登出后重定向 URI。这种情况下无需在 Console 配置:浏览器会显示 Logto 登出页面,用户手动关闭后返回应用。
+- 如果没有 UI 上下文,你可以调用 `logtoClient.clearCredentials` 来清除本地凭据并撤销刷新令牌 (Refresh token)。注意,这会保留浏览器中的 Logto 会话,因此下次 `signIn` 可能会通过该会话自动登录用户。
:::
@@ -99,7 +99,7 @@ class MainActivity : AppCompatActivity() {
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
// ...other codes
- // 添加一个 live data 来观察认证状态
+ // 添加一个 live data 用于监听认证 (Authentication) 状态
private val _authenticated = MutableLiveData(logtoClient.isAuthenticated)
val authenticated: LiveData
get() = _authenticated
@@ -138,19 +138,19 @@ class MainActivity : AppCompatActivity() {
// 假设你的布局中有一个 id 为 "sign_out_button" 的按钮
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 检查用户是否已认证
+ if (logtoViewModel.authenticated) { // 检查用户是否已认证 (Authentication)
logtoViewModel.signOut()
}
}
- // 观察认证状态以更新 UI
+ // 监听认证 (Authentication) 状态以更新 UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 用户已认证
+ // 用户已认证 (Authentication)
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 用户未认证
+ // 用户未认证 (Authentication)
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index c4a298f7e40..bf65bc8867b 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,17 +2,17 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Logto Android SDK 支持的最低 Android API 级别是 24。
+Logto Android SDK 支持的最低 Android API 级别为 24。
:::
Logto Android SDK 有两个主要版本:
-- **v3 (beta)**:在 [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系统浏览器)中打开登录体验,可解锁通行密钥登录并共享浏览器会话。注意,v3 移除了对 WeChat(原生) 和 Alipay(原生) 连接器的支持;你可以改用 WeChat(网页版) 和 Alipay(网页版) ,这些通过浏览器工作。如果你依赖原生连接器,请继续使用 v2。
-- **v2**:在嵌入式 WebView 中打开登录体验,这是原生社交连接器所必需的,但不支持通行密钥登录 (WebView 不支持 WebAuthn,即通行密钥的底层标准)。
+- **v3**:在 [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系统浏览器)中打开登录体验,这样可以实现密钥登录(passkey sign-in)并共享浏览器会话。请注意,v3 移除了对 微信(原生) 和 支付宝(原生) 连接器的支持;你可以改用 微信(Web) 和 支付宝(Web) ,它们通过浏览器工作。如果你依赖原生连接器,请继续使用 v2。
+- **v2**:在嵌入式 WebView 中打开登录体验,这是原生社交连接器所需的,但不支持 密钥登录(passkey sign-in) (WebView 不支持 WebAuthn,即密钥的底层标准)。
-本指南涵盖两个版本。请在下方标签页中选择你的版本,所做选择将在本指南中保持同步。
+本指南涵盖了这两个版本。请在下方标签中选择你的版本,选择将在本指南中保持同步。
-在安装 Logto Android SDK 之前,确保在 Gradle 项目的构建文件中将 `mavenCentral()` 添加到你的仓库配置中:
+在安装 Logto Android SDK 之前,请确保在 Gradle 项目构建文件的仓库配置中添加了 `mavenCentral()`:
```kotlin title="settings.gradle.kts"
dependencyResolutionManagement {
@@ -26,9 +26,9 @@ dependencyResolutionManagement {
-
+
-v3 以 `3.0.0-beta` 预发布版本发布,直至正式版本 (GA) 发布。使用最新的预发布版本作为版本号:
+使用最新的 v3 版本作为依赖版本:
@@ -36,7 +36,7 @@ v3 以 `3.0.0-beta` 预发布版本发布,直至正式版本 (GA) 发布。使
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +46,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -93,7 +93,7 @@ dependencies {
-
+
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..cee861f13be 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,45 +2,45 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+Logto Swift SDK 最低支持的 iOS 版本为 iOS 13。
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK 有两个主要版本:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**:在 [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(系统浏览器)中打开登录体验,这样可以解锁密钥登录,并共享浏览器会话。注意,v2 移除了原生社交插件目标;社交连接器仍然通过浏览器工作。如果你依赖原生微信或支付宝 SDK 跳转,请继续使用 v1。
+- **v1**:在嵌入式 WebView 中打开登录体验,这是原生社交插件目标所需的,但不支持密钥登录 (WebView 不支持 WebAuthn,即密钥的底层标准)。
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+本指南涵盖了两个版本。请在下方标签中选择你的版本,选择将在本指南中保持同步。
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+使用以下 URL 在 Swift Package Manager 中添加 Logto SDK 作为依赖项。
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+自 Xcode 11 起,你可以[直接导入 Swift 包](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app),无需任何额外工具。
-When Xcode asks for the package version, choose the version you want to integrate:
+当 Xcode 询问包版本时,选择你想集成的版本:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+使用最新的 v2 版本作为依赖。最新的 v2 版本为 `2.0.0`。
-If you use `Package.swift` directly:
+如果你直接使用 `Package.swift`:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+如果你需要原生社交插件目标,请使用最新的 v1 版本。最新的 v1 版本为 `1.2.0`。
-If you use `Package.swift` directly:
+如果你直接使用 `Package.swift`:
```swift title="Package.swift"
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
@@ -50,7 +50,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+由于一些技术原因,我们目前不支持 **Carthage** 和 **CocoaPods**。
@@ -60,7 +60,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [需要一个 `xcodeproj` 文件来构建](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385)。我们会尝试后续寻找解决方案。
@@ -72,6 +72,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [不支持本地依赖](https://github.com/CocoaPods/CocoaPods/issues/3276)和 monorepo,因此很难为此仓库创建 `.podspec` 文件。
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..455eae50d54 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,22 +7,23 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### 配置重定向 URI \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+在 v2 中,登录体验会在 [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(系统浏览器)中打开,重定向会通过操作系统级别的回调匹配返回到你的应用。对于像 `io.logto.app://callback` 这样的自定义 scheme 重定向 URI,只需在应用的 `Info.plist` 中注册 scheme 部分(`io.logto.app`),然后将完整的重定向 URI 添加到 Logto 应用的 Redirect URIs 中。
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+在 Xcode 中,打开你的应用 target,选择 **Info**,展开 **URL Types**,并在 **URL Schemes** 中添加一项 `io.logto.app`。如果你直接编辑 `Info.plist`,请添加如下内容:
```xml title="Info.plist"
+// 配置自定义 URL Scheme
CFBundleURLTypes
@@ -38,25 +39,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+对于 v2 的浏览器流程,你无需调用 `LogtoClient.handle(url:)`;该插件交接 API 已随内嵌 WebView 流程被移除。
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### 使用 Universal Links 替代自定义 scheme?\{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+你也可以使用 HTTPS 重定向 URI,例如 `https://example.com/callback`:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. 为你的应用添加 Associated Domains 能力。
+2. 配置 `webcredentials:example.com`,这样 `ASWebAuthenticationSession` 就能在 iOS 17.4 及更高版本上匹配 HTTPS 回调。
+3. 如果同一个 URL 还需要在认证 (Authentication) 会话外以 Universal Link 打开你的应用,配置 `applinks:example.com` 并为该域名和路径托管有效的 `apple-app-site-association` 文件。
+4. 将 HTTPS URI 添加到 Logto 应用的 Redirect URIs。
+5. 将同样的 URI 传递给 `signInWithBrowser`。
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+在 iOS 17.4 及更高版本中,SDK 使用 `ASWebAuthenticationSession` 的 HTTPS 回调匹配 API,因此 HTTPS 重定向可以自动完成并关闭会话。在较旧的 iOS 版本中,授权 (Authorization) 请求仍可使用 HTTPS 重定向 URI,但会话可能不会自动关闭,除非你的应用自行处理 Universal Link 回调。如果你需要在旧版 iOS 上自动完成,建议保留自定义 scheme 重定向作为兼容选项。
@@ -70,26 +71,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+iOS SDK 中的 Redirect URI 仅供内部使用。_无需_ 添加 [自定义 URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app),除非连接器有要求。
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### 登录与登出 \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+在 v2 中,`client.signOut(postLogoutRedirectUri:)` 会执行完整的登出操作:清除本地凭据、撤销刷新令牌 (Refresh token),并通过系统浏览器打开结束会话端点来结束 Logto 会话。浏览器随后会通过登出后重定向 URI 返回你的应用。在使用前,请前往 Logto Console 的应用详情页,添加登出后重定向 URI `io.logto.app://signed-out` 并点击“保存更改”。登出后重定向 URI 可以使用你为登录注册的同一个自定义 scheme。
-For example, in a SwiftUI app:
+例如,在 SwiftUI 应用中:
```swift title="ContentView.swift"
+// 示例:登录与登出流程
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +122,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 登录过程中发生错误
} catch {
- // other errors
+ // 其他错误
}
}
}
@@ -134,8 +136,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- 你也可以直接调用 `client.signOut()`,无需传递登出后重定向 URI。这种情况下无需在 Console 配置:浏览器会显示 Logto 登出页面,用户可手动关闭页面返回应用。
+- 如果没有 UI 上下文,你可以调用 `client.clearCredentials()` 来清除本地凭据并撤销刷新令牌 (Refresh token)。注意,这会保留浏览器中的 Logto 会话,因此下次 `signInWithBrowser` 可能会通过该会话自动登录用户。
:::
@@ -143,11 +145,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+你可以使用 `client.signInWithBrowser(redirectUri:)` 进行用户登录,使用 `client.signOut()` 进行用户登出。
-For example, in a SwiftUI app:
+例如,在 SwiftUI 应用中:
```swift title="ContentView.swift"
+// 示例:登录与登出流程
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +174,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 登录过程中发生错误
} catch {
- // other errors
+ // 其他错误
}
}
}
diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
index 3ac9e549dee..65b534bf77d 100644
--- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
+++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/README.mdx
@@ -33,13 +33,13 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
# 為你的 Android (Kotlin/Java) 應用程式新增驗證 (Authentication)
-本指南將向你展示如何將 Logto 整合到你的 Android 應用程式中。
+本指南將帶你將 Logto 整合進你的 Android 應用程式。
## 先決條件 \{#prerequisites}
-- 一個 [Logto Cloud](https://cloud.logto.io) 帳戶或 [自託管 Logto](/introduction/set-up-logto-oss)。
+- 一個 [Logto Cloud](https://cloud.logto.io) 帳號或 [自行架設 Logto](/introduction/set-up-logto-oss)。
- 已建立的 Logto 原生應用程式。
- 一個 Kotlin Android 應用程式專案。
@@ -47,13 +47,13 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
-## 整合 \{#integration}
+## 整合步驟 \{#integration}
### 初始化 LogtoClient \{#init-logtoclient}
-### 配置重定向 URI \{#configure-redirect-uri}
+### 設定 redirect URI \{#configure-redirect-uri}
@@ -62,18 +62,18 @@ import FetchOrganizationTokenForUser from './api-resources/_fetch-organization-t
redirectUri="io.logto.android://io.logto.sample/callback"
/>
-在 Android 中,重定向 URI 遵循以下模式:`$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
+在 Android 中,redirect URI 遵循此格式:`$(LOGTO_REDIRECT_SCHEME)://$(YOUR_APP_PACKAGE)/callback`:
-- `LOGTO_REDIRECT_SCHEME` 應為反向域格式的自定義方案。
-- `YOUR_APP_PACKAGE` 是你的應用程式包名。
+- `LOGTO_REDIRECT_SCHEME` 應為自訂的反向網域格式 scheme。
+- `YOUR_APP_PACKAGE` 是你的應用程式套件名稱。
-假設你將 `io.logto.android` 作為自定義 `LOGTO_REDIRECT_SCHEME`,而 `io.logto.sample` 是你的應用程式包名,則重定向 URI 應為 `io.logto.android://io.logto.sample/callback`。
+假設你將 `io.logto.android` 作為自訂的 `LOGTO_REDIRECT_SCHEME`,而 `io.logto.sample` 是你的應用程式套件名稱,則 Redirect URI 應為 `io.logto.android://io.logto.sample/callback`。
-
+
-在 v3 中,登入體驗在 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系統瀏覽器)中開啟,重定向透過 OS 層級的 intent filter 路由回你的應用程式。你需要在應用程式的建置檔案中使用 `logtoRedirectScheme` manifest placeholder 宣告重定向 URI 的 scheme:
+在 v3 中,登入體驗會於 [Custom Tab](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系統瀏覽器)中開啟,並透過作業系統層級的 intent filter 將 redirect 導回你的應用程式。你需要在應用程式的 build 檔案中,使用 `logtoRedirectScheme` manifest placeholder 宣告 redirect URI 的 scheme:
@@ -103,34 +103,34 @@ android {
-此外,v3 透過 Android 的 intent filter 比對來強制執行重定向 URI 模式,因此偏離模式的重定向 URI 永遠不會被傳遞到你的應用程式:
+此外,v3 會透過 Android 的 intent filter 檢查強制 redirect URI 格式,因此不符合格式的 redirect URI 不會被傳遞給你的應用程式:
- scheme 必須等於 `logtoRedirectScheme` manifest placeholder。
- host 必須是你的 `applicationId`。
- path 必須是 `/callback`。
-請將 scheme 和 host 保持小寫,因為 intent filter 比對區分大小寫,而瀏覽器會將 scheme 轉為小寫。
+請保持 scheme 與 host 為小寫,因為 intent filter 比對區分大小寫,且瀏覽器會將 scheme 轉為小寫。
-#### 使用 App Links 代替自定義 scheme? \{#use-app-links-instead-of-a-custom-scheme}
+#### 想用 App Links 取代自訂 scheme? \{#use-app-links-instead-of-a-custom-scheme}
-要使用 [Android App Links](https://developer.android.com/training/app-links)(你擁有的網域上的 `https` 重定向 URI)代替自定義 scheme:
+若要使用 [Android App Links](https://developer.android.com/training/app-links)(你擁有網域的 `https` redirect URI)取代自訂 scheme:
-1. 在 `https://your.domain/.well-known/assetlinks.json` 托管 [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 檔案,宣告你的應用程式 ID 和簽名憑證的 SHA-256 指紋。使用 Play App Signing 發布時,可以在 Play Console 的**設定** > **應用程式簽名**下找到發布指紋。該檔案必須以 `Content-Type: application/json` 和 HTTP 200(無重定向)提供。
+1. 在 `https://your.domain/.well-known/assetlinks.json` 主機上放置 [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started) 檔案,聲明你的 application ID 及簽章憑證的 SHA-256 指紋。若使用 Play App Signing 發佈,可於 Play Console 的 **設定** > **App signing** 取得發佈指紋。該檔案必須以 `Content-Type: application/json`、HTTP 200 且無重導方式提供。
-2. 在 `AndroidManifest.xml` 檔案中,為 SDK 的重定向接收者 activity `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` 宣告 App Links intent filter。如果你完全不使用自定義 scheme,可以使用 `tools:node="removeAll"` 移除 SDK 的內建 filter,此時就不再需要 `logtoRedirectScheme` manifest placeholder:
+2. 在你的 `AndroidManifest.xml` 檔案中,於 SDK 的 redirect receiver activity `io.logto.sdk.android.auth.logto.LogtoRedirectReceiverActivity` 宣告 App Links intent filter。若完全不使用自訂 scheme,可用 `tools:node="removeAll"` 移除 SDK 內建 filter,這時 `logtoRedirectScheme` manifest placeholder 也不再需要:
```xml title="AndroidManifest.xml"
-
+
@@ -143,9 +143,9 @@ android {
```
-3. 在 Logto Console 的應用程式詳細資料頁面中,將 `https://your.domain/callback` 新增為重定向 URI(如果用於登出,也新增為登出後重定向 URI),並將其傳遞給 `signIn` / `signOut`。
+3. 在 Logto Console 的應用程式詳細頁新增 `https://your.domain/callback` 為 redirect URI(若用於登出,也需設為 post sign-out redirect URI),並傳遞給 `signIn` / `signOut`。
-請注意,callback 現在是你網域上的真實 URL,因此請在那裡提供一個備用頁面(例如,「返回應用程式」按鈕),供不會在伺服器重定向時啟動 App Links 的瀏覽器使用。按鈕只需連結到當前 URL(例如,將 `href` 設為 `window.location.href`):授權參數在查詢字串中,使用者點擊可讓相同的 URL 再次嘗試路由到你的應用程式。在 Android 12+ 上,未驗證的網域永遠不會開啟應用程式,因此損壞的 `assetlinks.json` 會靜默失敗。你可以使用 `adb shell pm get-app-links ` 檢查驗證狀態。
+請注意,callback 現在是你網域上的真實 URL,因此建議在該處提供備用頁面(例如「返回應用程式」按鈕),以因應瀏覽器於伺服器重導時未啟動 App Links 的情況。該按鈕只需連結至當前 URL(例如將 `href` 設為 `window.location.href`):授權參數已在查詢字串中,使用者點擊可再次嘗試導回你的應用程式。在 Android 12+,未驗證網域不會開啟應用程式,`assetlinks.json` 配置錯誤時會靜默失敗。你可用 `adb shell pm get-app-links ` 檢查驗證狀態。
@@ -153,7 +153,7 @@ android {
-無需額外設定。登入體驗在內嵌的 WebView 中開啟,SDK 會在 WebView 內攔截重定向。
+無需額外設定。登入體驗會在內嵌 WebView 中開啟,SDK 會於 WebView 內攔截 redirect。
@@ -165,17 +165,17 @@ android {
-## 獲取使用者資訊 \{#get-user-information}
+## 取得使用者資訊 \{#get-user-information}
### 顯示使用者資訊 \{#display-user-information}
-要顯示使用者的資訊,你可以使用 `logtoClient.getIdTokenClaims()` 方法。例如,你可以在 ViewModel 中獲取使用者資訊,然後在你的活動中顯示:
+若要顯示使用者資訊,可使用 `logtoClient.getIdTokenClaims()` 方法。例如,你可以在 ViewModel 取得使用者資訊,然後在 activity 中顯示:
```kotlin title="LogtoModelView.kt"
class LogtoViewModel(application: Application) : AndroidViewModel(application) {
- // ...其他代碼
+ // ...其他程式碼
- // 添加一個 live data 來觀察 ID 權杖 (ID token) 宣告 (Claims)
+ // 新增 live data 以觀察 id token claims
private val _idTokenClaims = MutableLiveData()
val idTokenClaims: LiveData
get() = _idTokenClaims
@@ -189,12 +189,12 @@ class LogtoViewModel(application: Application) : AndroidViewModel(application) {
```
```kotlin title="MainActivity.kt"
-//...與其他匯入
+//...與其他 imports
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
- //...其他代碼
+ //...其他程式碼
- // 假設你的佈局中有一個 ID 為 `user_info_text_view` 的文字視圖
+ // 假設你的 layout 有一個 id 為 `user_info_text_view` 的 text View
val userInfoResponseTextView: TextView = findViewById(R.id.user_info_text_view)
logtoViewModel.userInfoResponse.observe(this) { userInfoResponse ->
userInfoResponseTextView.text = if (userInfoResponse !== null) {
@@ -208,30 +208,30 @@ class MainActivity : AppCompatActivity() {
}
```
-### 請求額外的宣告 (Claims) \{#request-additional-claims}
+### 請求額外宣告 (claims) \{#request-additional-claims}
-要請求額外的權限範圍 (Scopes),你可以將權限範圍傳遞給 `LogtoConfig` 物件。例如:
+若要請求額外權限範圍 (scopes),可將 scopes 傳入 `LogtoConfig` 物件。例如:
```kotlin title="LogtoViewModel.kt"
private val logtoConfig = LogtoConfig(
- // ...其他配置
+ // ...其他設定
// highlight-start
scopes = listOf("email", "phone"), // 或 `listOf(UserScope.EMAIL, UserScope.PHONE)`
// highlight-end
)
```
-然後你可以在 `logtoClient.getIdTokenClaims()` 的返回值中訪問額外的宣告 (Claims):
+然後你可以在 `logtoClient.getIdTokenClaims()` 的回傳值中取得額外宣告 (claims):
```kotlin
logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
println("IdTokenClaims:$idTokenClaims")
}
-// 現在你可以訪問額外的宣告 `claims.email`、`claims.phone` 等。
+// 現在你可以存取額外宣告 `claims.email`、`claims.phone` 等
```
>{`logtoClient.fetchUserInfo {_, userInfoResponse ->
println("UserInfoResponse:$userInfoResponse")
}
-// 現在你可以訪問宣告 \`userInfo.custom_data\``}
+// 現在你可以存取宣告 \`userInfo.custom_data\``}
}
/>
@@ -252,22 +252,22 @@ logtoClient.getIdTokenClaims { logtoException, idTokenClaims ->
-## API 資源與組織 \{#api-resources-and-organizations}
+## API 資源 (API resources) 與組織 (Organizations) \{#api-resources-and-organizations}
-### 配置 Logto 客戶端 \{#configure-logto-client}
+### 設定 Logto client \{#configure-logto-client}
-### 獲取 API 資源的存取權杖 (Access token) \{#fetch-access-token-for-the-api-resource}
+### 取得 API 資源的存取權杖 (Access token) \{#fetch-access-token-for-the-api-resource}
-### 獲取組織權杖 (Organization tokens) \{#fetch-organization-tokens}
+### 取得組織權杖 (Organization tokens) \{#fetch-organization-tokens}
-## 進一步閱讀 \{#further-readings}
+## 延伸閱讀 \{#further-readings}
diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
index a891405112b..949ac28968d 100644
--- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_implement-sign-in-and-sign-out.mdx
@@ -5,13 +5,13 @@ import SignInNote from '../../fragments/_sign-in-note.mdx';
-你可以使用 `logtoClient.signIn` 來讓使用者登入,並使用 `logtoClient.signOut` 來讓使用者登出。
+你可以使用 `logtoClient.signIn` 讓使用者登入,並用 `logtoClient.signOut` 讓使用者登出。
-
+
-在 v3 中,`logtoClient.signOut` 執行完整的登出:清除本地憑證、撤銷重新整理權杖,並透過在瀏覽器中開啟結束工作階段端點來結束 Logto 工作階段。瀏覽器然後透過登出後重新導向 URI 導航回你的應用程式。在使用之前,切換到 Logto Console 的應用程式詳細資料頁面,新增登出後重新導向 URI `io.logto.android://io.logto.sample/callback` 並點擊「儲存變更」。登出後重新導向 URI 遵循與重新導向 URI 相同的模式,其 scheme 也必須與 `logtoRedirectScheme` manifest placeholder 匹配。
+在 v3 中,`logtoClient.signOut` 會執行完整的登出流程:清除本地憑證、撤銷重新整理權杖 (refresh token),並在瀏覽器中開啟結束 Logto 工作階段的端點。瀏覽器隨後會透過登出後重新導向 URI 回到你的應用程式。在使用前,請到 Logto Console 的應用程式詳細頁,新增登出後重新導向 URI `io.logto.android://io.logto.sample/callback` 並點擊「儲存變更」。登出後重新導向 URI 的格式與重新導向 URI 相同,且其 scheme 也必須與 `logtoRedirectScheme` manifest placeholder 相符。
例如,在 Android 應用程式中:
@@ -50,16 +50,16 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...other codes
- // 假設你的佈局中有一個 id 為 "sign_in_button" 的按鈕
+ // 假設你的版面有一個 id 為 "sign_in_button" 的按鈕
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // 假設你的佈局中有一個 id 為 "sign_out_button" 的按鈕
+ // 假設你的版面有一個 id 為 "sign_out_button" 的按鈕
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 檢查使用者是否已驗證 (Authenticated)
+ if (logtoViewModel.authenticated) { // 檢查使用者是否已驗證 (Authentication)
logtoViewModel.signOut(this)
}
}
@@ -67,11 +67,11 @@ class MainActivity : AppCompatActivity() {
// 觀察驗證 (Authentication) 狀態以更新 UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 使用者已驗證 (Authenticated)
+ // 使用者已驗證 (Authentication)
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 使用者未驗證 (Authenticated)
+ // 使用者尚未驗證 (Authentication)
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
@@ -83,8 +83,8 @@ class MainActivity : AppCompatActivity() {
:::note
-- 你也可以不帶登出後重新導向 URI 呼叫 `logtoClient.signOut(context)`。這種情況下不需要 Console 配置:瀏覽器會顯示 Logto 登出頁面,使用者透過手動關閉返回應用程式。
-- 如果沒有 UI context 可用,你可以呼叫 `logtoClient.clearCredentials` 來清除本地憑證並撤銷重新整理權杖。請注意,這會保留瀏覽器中的 Logto 工作階段,因此下次 `signIn` 可能會透過該工作階段靜默登入使用者。
+- 你也可以呼叫 `logtoClient.signOut(context)` 而不帶登出後重新導向 URI。這種情況下不需在 Console 設定:瀏覽器會顯示 Logto 登出頁面,使用者手動關閉後即可回到應用程式。
+- 若沒有 UI context,可呼叫 `logtoClient.clearCredentials` 來清除本地憑證並撤銷重新整理權杖 (refresh token)。但這會保留瀏覽器中的 Logto 工作階段,下次 `signIn` 可能會自動讓使用者重新登入。
:::
@@ -129,16 +129,16 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
//...other codes
- // 假設你的佈局中有一個 id 為 "sign_in_button" 的按鈕
+ // 假設你的版面有一個 id 為 "sign_in_button" 的按鈕
val signInButton = findViewById(R.id.sign_in_button)
signInButton.setOnClickListener {
logtoViewModel.signIn(this)
}
- // 假設你的佈局中有一個 id 為 "sign_out_button" 的按鈕
+ // 假設你的版面有一個 id 為 "sign_out_button" 的按鈕
val signOutButton = findViewById(R.id.sign_out_button)
signOutButton.setOnClickListener {
- if (logtoViewModel.authenticated) { // 檢查使用者是否已驗證 (Authenticated)
+ if (logtoViewModel.authenticated) { // 檢查使用者是否已驗證 (Authentication)
logtoViewModel.signOut()
}
}
@@ -146,11 +146,11 @@ class MainActivity : AppCompatActivity() {
// 觀察驗證 (Authentication) 狀態以更新 UI
logtoViewModel.authenticated.observe(this) { authenticated ->
if (authenticated) {
- // 使用者已驗證 (Authenticated)
+ // 使用者已驗證 (Authentication)
signInButton.visibility = View.GONE
signOutButton.visibility = View.VISIBLE
} else {
- // 使用者未驗證 (Authenticated)
+ // 使用者尚未驗證 (Authentication)
signInButton.visibility = View.VISIBLE
signOutButton.visibility = View.GONE
}
diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
index 9d25ac14578..a4d575f10b9 100644
--- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
+++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/android/_installation.mdx
@@ -2,19 +2,20 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-Logto Android SDK 支援的最低 Android API 等級為 24。
+Logto Android SDK 最低支援的 Android API 等級為 24。
:::
-Logto Android SDK 有兩個主要版本:
+Logto Android SDK 主要有兩個版本:
-- **v3 (beta)**:在 [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系統瀏覽器)中開啟登入體驗,解鎖通行金鑰登入並共享瀏覽器工作階段。請注意,v3 移除了對 WeChat(原生) 和 Alipay(原生) 連接器的支援;你可以改用 WeChat(網頁版) 和 Alipay(網頁版) ,它們透過瀏覽器運作。如果你依賴原生連接器,請繼續使用 v2。
-- **v2**:在內嵌的 WebView 中開啟登入體驗,這是原生社交連接器所需的,但不支援通行金鑰登入 (WebView 不支援 WebAuthn,即通行金鑰的底層標準)。
+- **v3**:在 [Chrome Custom Tabs](https://developer.android.com/develop/ui/views/layout/webapps/overview-of-android-custom-tabs)(系統瀏覽器)中開啟登入體驗,支援通行密鑰登入(passkey sign-in)並共用瀏覽器會話。請注意,v3 移除了 WeChat (Native) 和 Alipay (Native) 連接器的支援;你可以改用 WeChat (Web) 和 Alipay (Web) ,這些會透過瀏覽器運作。如果你依賴原生連接器,請繼續使用 v2。
+- **v2**:在嵌入式 WebView 中開啟登入體驗,這是原生社交連接器所需,但不支援 通行密鑰登入 (passkey sign-in) (WebView 不支援 WebAuthn,也就是通行密鑰的底層標準)。
-本指南涵蓋兩個版本。在下方的標籤頁中選擇你的版本,此選擇將在整個指南中保持同步。
+本指南涵蓋兩個版本。請在下方分頁選擇你的版本,選擇將在本指南中同步保留。
-在安裝 Logto Android SDK 之前,請確保在 Gradle 專案的建置檔案中將 `mavenCentral()` 添加到你的倉庫配置中:
+在安裝 Logto Android SDK 前,請確保已在 Gradle 專案的建置檔案中加入 `mavenCentral()` 至你的 repository 設定:
```kotlin title="settings.gradle.kts"
+// 設定 mavenCentral 作為套件來源
dependencyResolutionManagement {
repositories {
mavenCentral()
@@ -22,13 +23,13 @@ dependencyResolutionManagement {
}
```
-將 Logto Android SDK 添加到你的相依項目中:
+將 Logto Android SDK 加入你的相依套件:
-
+
-v3 以 `3.0.0-beta` 預發行版本形式發布直至正式版。請使用最新的預發行版本作為版本號:
+請使用最新的 v3 版本:
@@ -36,7 +37,7 @@ v3 以 `3.0.0-beta` 預發行版本形式發布直至正式版。請使用最新
```kotlin title="build.gradle.kts"
dependencies {
- implementation("io.logto.sdk:android:3.0.0-beta")
+ implementation("io.logto.sdk:android:3.0.0")
}
```
@@ -46,7 +47,7 @@ dependencies {
```groovy title="build.gradle"
dependencies {
- implementation 'io.logto.sdk:android:3.0.0-beta'
+ implementation 'io.logto.sdk:android:3.0.0'
}
```
@@ -86,16 +87,16 @@ dependencies {
-由於 SDK 需要網路存取,你需要在 `AndroidManifest.xml` 檔案中添加以下權限:
+由於 SDK 需要網路存取權限,請在你的 `AndroidManifest.xml` 檔案中加入以下權限設定:
```xml title="AndroidManifest.xml"
-
+
-
+
```
diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
index 8ce7501a204..71753f58182 100644
--- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
+++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_add-sdk.mdx
@@ -2,45 +2,45 @@ import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';
:::note
-The minimum supported iOS version of Logto Swift SDK is iOS 13.
+Logto Swift SDK 最低支援的 iOS 版本為 iOS 13。
:::
-Logto Swift SDK comes in two major versions:
+Logto Swift SDK 主要有兩個版本:
-- **v1**: Opens the sign-in experience in an embedded WebView, which is required by the native social plugin targets, but does not support passkey sign-in (WebView does not support WebAuthn, the underlying standard of passkeys).
-- **v2 (beta)**: Opens the sign-in experience in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), which unlocks passkey sign-in and shares the browser session. Note that v2 removes the native social plugin targets; social connectors still work through the browser. If you depend on the native WeChat or Alipay SDK handoff, stay on v1.
+- **v2**:在 [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(系統瀏覽器)中開啟登入體驗,支援通行密鑰登入(passkey sign-in)並共用瀏覽器會話。注意 v2 移除了原生社交插件目標;社交連接器仍透過瀏覽器運作。如果你依賴原生 WeChat 或 Alipay SDK 的跳轉,請繼續使用 v1。
+- **v1**:在嵌入式 WebView 中開啟登入體驗,這是原生社交插件目標所需,但不支援 通行密鑰登入(passkey sign-in) (WebView 不支援 WebAuthn,即通行密鑰的底層標準)。
-This guide covers both versions. Choose your version in the tabs below, and the choice will be kept in sync throughout this guide.
+本指南涵蓋兩個版本。請在下方分頁選擇你的版本,選擇將在本指南中同步。
-Use the following URL to add Logto SDK as a dependency in Swift Package Manager.
+使用以下 URL 於 Swift Package Manager 新增 Logto SDK 依賴。
```bash
https://github.com/logto-io/swift.git
```
-Since Xcode 11, you can [directly import a Swift package](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) w/o any additional tool.
+自 Xcode 11 起,你可以[直接匯入 Swift 套件](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app),無需額外工具。
-When Xcode asks for the package version, choose the version you want to integrate:
+當 Xcode 詢問套件版本時,請選擇你要整合的版本:
-
+
-v2 is released as `2.0.0-beta.x` prereleases until GA. Use `2.0.0-beta.1` or the latest `2.0.0-beta.x` prerelease as the version. During beta, we recommend selecting the prerelease explicitly instead of relying on a normal version range to pick it automatically.
+請使用最新的 v2 版本。最新 v2 版本為 `2.0.0`。
-If you use `Package.swift` directly:
+如果你直接使用 `Package.swift`:
```swift title="Package.swift"
-.package(url: "https://github.com/logto-io/swift.git", exact: "2.0.0-beta.1")
+.package(url: "https://github.com/logto-io/swift.git", from: "2.0.0")
```
-Use the latest v1 release as the stable line. The latest v1 version is `1.2.0`.
+若你需要原生社交插件目標,請使用最新的 v1 版本。最新 v1 版本為 `1.2.0`。
-If you use `Package.swift` directly:
+如果你直接使用 `Package.swift`:
```swift title="Package.swift"
.package(url: "https://github.com/logto-io/swift.git", from: "1.2.0")
@@ -50,7 +50,7 @@ If you use `Package.swift` directly:
-We do not support **Carthage** and **CocoaPods** at the time due to some technical issues.
+目前因技術限制,**Carthage** 與 **CocoaPods** 尚未支援。
@@ -60,7 +60,7 @@ We do not support **Carthage** and **CocoaPods** at the time due to some technic
-Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385). We will try to find a workaround later.
+Carthage [需要 `xcodeproj` 檔案才能建置](https://github.com/Carthage/Carthage/issues/1226#issuecomment-290931385)。我們將來會嘗試尋找替代方案。
@@ -72,6 +72,6 @@ Carthage [needs a `xcodeproj` file to build](https://github.com/Carthage/Carthag
-CocoaPods [does not support local dependency](https://github.com/CocoaPods/CocoaPods/issues/3276) and monorepo, thus it's hard to create a `.podspec` for this repo.
+CocoaPods [不支援本地依賴](https://github.com/CocoaPods/CocoaPods/issues/3276)與 monorepo,因此很難為此 repo 建立 `.podspec`。
diff --git a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
index d623fd6d539..f66efbf602b 100644
--- a/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
+++ b/i18n/zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/swift/_implement-sign-in-and-sign-out.mdx
@@ -7,20 +7,20 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
-#### Configure redirect URI \{#configure-redirect-uri}
+#### 設定重新導向 URI(Redirect URI) \{#configure-redirect-uri}
-
+
-In v2, the sign-in experience opens in [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) (the system browser), and the redirect is routed back to your app through OS-level callback matching. For a custom scheme redirect URI such as `io.logto.app://callback`, register only the scheme part (`io.logto.app`) in your app's `Info.plist`, then add the full redirect URI to your Logto application's Redirect URIs.
+在 v2 中,登入體驗會在 [`ASWebAuthenticationSession`](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession)(系統瀏覽器)中開啟,並透過作業系統層級的 callback 匹配將重新導向帶回你的應用程式。對於像 `io.logto.app://callback` 這樣的自訂 scheme 重新導向 URI,只需在你的 app 的 `Info.plist` 中註冊 scheme 部分(`io.logto.app`),然後將完整的重新導向 URI 加入 Logto 應用程式的 Redirect URIs。
-In Xcode, open your app target, select **Info**, expand **URL Types**, and add one entry with `io.logto.app` in **URL Schemes**. If you edit `Info.plist` directly, add:
+在 Xcode 中,打開你的 app target,選擇 **Info**,展開 **URL Types**,並在 **URL Schemes** 中新增一筆 `io.logto.app`。如果你直接編輯 `Info.plist`,請加入:
```xml title="Info.plist"
CFBundleURLTypes
@@ -38,25 +38,25 @@ In Xcode, open your app target, select **Info**, expand **URL Types**, and add o
```
-For the browser flow in v2, you do not need to call `LogtoClient.handle(url:)`; that plugin handoff API was removed with the embedded WebView flow.
+在 v2 的瀏覽器流程中,你不需要呼叫 `LogtoClient.handle(url:)`;該 plugin handoff API 已隨內嵌 WebView 流程移除。
-#### Use Universal Links instead of a custom scheme? \{#use-universal-links-instead-of-a-custom-scheme}
+#### 要用 Universal Links 取代自訂 scheme 嗎? \{#use-universal-links-instead-of-a-custom-scheme}
-You can also use an HTTPS redirect URI such as `https://example.com/callback`:
+你也可以使用像 `https://example.com/callback` 這樣的 HTTPS 重新導向 URI:
-1. Add the Associated Domains capability to your app.
-2. Configure `webcredentials:example.com` so `ASWebAuthenticationSession` can match HTTPS callbacks on iOS 17.4 and newer.
-3. If the same URL should also open your app as a Universal Link outside the authentication session, configure `applinks:example.com` and host a valid `apple-app-site-association` file for the domain and path.
-4. Add the HTTPS URI to your Logto application's Redirect URIs.
-5. Pass the same URI to `signInWithBrowser`.
+1. 為你的 app 加入 Associated Domains 能力。
+2. 設定 `webcredentials:example.com`,讓 `ASWebAuthenticationSession` 能在 iOS 17.4 及更新版本上匹配 HTTPS callback。
+3. 如果同一個 URL 也要在驗證會話外以 Universal Link 開啟 app,請設定 `applinks:example.com`,並為該網域與路徑主機一份有效的 `apple-app-site-association` 檔案。
+4. 將 HTTPS URI 加入 Logto 應用程式的 Redirect URIs。
+5. 傳遞相同的 URI 給 `signInWithBrowser`。
-On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callback matching API so HTTPS redirects can automatically complete and dismiss the session. On older iOS versions, the authorization request can still use the HTTPS redirect URI, but the session may not close automatically unless your app handles the Universal Link callback itself. Keep a custom scheme redirect as a compatibility option if you need automatic completion on older iOS versions.
+在 iOS 17.4 及更新版本,SDK 會使用 `ASWebAuthenticationSession` 的 HTTPS callback 匹配 API,因此 HTTPS 重新導向可自動完成並關閉會話。在較舊的 iOS 版本,授權請求仍可使用 HTTPS 重新導向 URI,但會話可能不會自動關閉,除非你的 app 自行處理 Universal Link callback。如果你需要在舊版 iOS 上自動完成,請保留自訂 scheme 重新導向作為相容選項。
@@ -70,26 +70,27 @@ On iOS 17.4 and newer, the SDK uses `ASWebAuthenticationSession`'s HTTPS callbac
/>
:::info
-The Redirect URI in iOS SDK is only for internal use. There's _NO NEED_ to add a [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app) until a connector asks.
+iOS SDK 中的 Redirect URI 僅供內部使用。*不需要*新增 [Custom URL Scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app),除非有連接器要求。
:::
-#### Sign-in and sign-out \{#sign-in-and-sign-out}
+#### 登入與登出 \{#sign-in-and-sign-out}
-
+
-In v2, `client.signOut(postLogoutRedirectUri:)` performs a complete sign-out: it clears the local credentials, revokes the refresh token, and ends the Logto session by opening the end session endpoint in the system browser. The browser then navigates back to your app through the post sign-out redirect URI. Before using it, switch to the application details page of Logto Console, add the post sign-out redirect URI `io.logto.app://signed-out` and click "Save changes". The post sign-out redirect URI can use the same custom scheme you registered for sign-in.
+在 v2 中,`client.signOut(postLogoutRedirectUri:)` 會執行完整登出:清除本地憑證、撤銷重新整理權杖 (refresh token)、並透過系統瀏覽器開啟 end session endpoint 結束 Logto session。瀏覽器會再透過登出後重新導向 URI 導回你的 app。使用前,請先到 Logto Console 的應用程式詳細頁,新增登出後重新導向 URI `io.logto.app://signed-out` 並點擊「儲存變更」。登出後重新導向 URI 可使用你登入時註冊的相同自訂 scheme。
-For example, in a SwiftUI app:
+例如,在 SwiftUI 應用程式中:
```swift title="ContentView.swift"
+// 這裡僅註解與訊息可翻譯,其餘程式碼請保持原樣
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -120,9 +121,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: redirectUri)
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 登入過程發生錯誤
} catch {
- // other errors
+ // 其他錯誤
}
}
}
@@ -134,8 +135,8 @@ struct ContentView: View {
:::note
-- You can also call `client.signOut()` without a post sign-out redirect URI. No Console configuration is needed in this case: the browser shows the Logto sign-out page, and the user returns to the app by dismissing it manually.
-- If no UI context is available, you can call `client.clearCredentials()` to clear the local credentials and revoke the refresh token. Note that this keeps the Logto session in the browser, so the next `signInWithBrowser` may silently sign the user back in through that session.
+- 你也可以呼叫 `client.signOut()` 而不帶登出後重新導向 URI。這種情況下不需在 Console 設定:瀏覽器會顯示 Logto 登出頁面,使用者可手動關閉返回 app。
+- 若沒有 UI context,可呼叫 `client.clearCredentials()` 來清除本地憑證並撤銷重新整理權杖 (refresh token)。注意這會保留瀏覽器中的 Logto session,因此下次 `signInWithBrowser` 可能會自動透過該 session 靜默登入使用者。
:::
@@ -143,11 +144,12 @@ struct ContentView: View {
-You can use `client.signInWithBrowser(redirectUri:)` to sign in the user and `client.signOut()` to sign out the user.
+你可以使用 `client.signInWithBrowser(redirectUri:)` 讓使用者登入,並用 `client.signOut()` 讓使用者登出。
-For example, in a SwiftUI app:
+例如,在 SwiftUI 應用程式中:
```swift title="ContentView.swift"
+// 這裡僅註解與訊息可翻譯,其餘程式碼請保持原樣
struct ContentView: View {
@State var isAuthenticated: Bool
@@ -171,9 +173,9 @@ struct ContentView: View {
try await client.signInWithBrowser(redirectUri: "io.logto://callback")
isAuthenticated = true
} catch let error as LogtoClientErrors.SignIn {
- // error occurred during sign in
+ // 登入過程發生錯誤
} catch {
- // other errors
+ // 其他錯誤
}
}
}