0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

docs: update LogtoClient clientId -> appId (#621)

This commit is contained in:
Gao Sun 2022-04-22 17:24:27 +08:00 committed by GitHub
parent 3e9a99d607
commit 56dc3e30c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 18 deletions

View file

@ -53,10 +53,10 @@ public var isAuthenticated: Bool
Whether the user has been authenticated.
## Methods
### `handle(forClientId:url:)`
### `handle(forAppId:url:)`
```swift
public static func handle(forClientId clientId: String? = nil, url: URL)
public static func handle(forAppId appId: String? = nil, url: URL)
```
Post a notification that tells Logto clients to handle the given URL.
@ -67,7 +67,7 @@ Usually this function need to be called in `onOpenURL(perform:)` in SwiftUI or `
| Name | Description |
| ---- | ----------- |
| forClientId | If the notification is for specific client ID only. When `nil`, all Logto clients will try to handle the notification. |
| forAppId | If the notification is for specific client ID only. When `nil`, all Logto clients will try to handle the notification. |
| url | The URL that needs to be handled. |
### `init(useConfig:socialPlugins:session:)`

View file

@ -7,10 +7,10 @@ public struct NotificationObject
```
## Properties
### `clientId`
### `appId`
```swift
public let clientId: String?
public let appId: String?
```
### `url`

View file

@ -13,10 +13,10 @@ public struct LogtoConfig
public let endpoint: URL
```
### `clientId`
### `appId`
```swift
public let clientId: String
public let appId: String
```
### `resources`
@ -38,12 +38,12 @@ public var scopes: [String]
```
## Methods
### `init(endpoint:clientId:scopes:resources:usingPersistStorage:)`
### `init(endpoint:appId:scopes:resources:usingPersistStorage:)`
```swift
public init(
endpoint: String,
clientId: String,
appId: String,
scopes: [String] = [],
resources: [String] = [],
usingPersistStorage: Bool = true

View file

@ -52,10 +52,10 @@ public var isAuthenticated: Bool
用户是否已经登录。
## 方法
### `handle(forClientId:url:)`
### `handle(forAppId:url:)`
```swift
public static func handle(forClientId clientId: String? = nil, url: URL)
public static func handle(forAppId appId: String? = nil, url: URL)
```
发送一个通知让 Logto 客户端处理该 URL。通常该函数需要在 `onOpenURL(perform:)` (SwiftUI) 或者 `application(_:open:options:)` (AppDelegate) 被调用。详情见集成指南。
@ -64,7 +64,7 @@ public static func handle(forClientId clientId: String? = nil, url: URL)
| 名称 | 描述 |
| ---- | ----------- |
| forClientId | 该通知是否仅供特定的客户端 ID。当值为 `nil` 时,所有的 Logto 客户端会尝试处理该通知。 |
| forAppId | 该通知是否仅供特定的客户端 ID。当值为 `nil` 时,所有的 Logto 客户端会尝试处理该通知。 |
| url | 需要被处理的 URL。 |
### `init(useConfig:socialPlugins:session:)`

View file

@ -7,10 +7,10 @@ public struct NotificationObject
```
## 属性
### `clientId`
### `appId`
```swift
public let clientId: String?
public let appId: String?
```
### `url`

View file

@ -13,10 +13,10 @@ public struct LogtoConfig
public let endpoint: URL
```
### `clientId`
### `appId`
```swift
public let clientId: String
public let appId: String
```
### `resources`
@ -38,12 +38,12 @@ public var scopes: [String]
```
## 方法
### `init(endpoint:clientId:scopes:resources:usingPersistStorage:)`
### `init(endpoint:appId:scopes:resources:usingPersistStorage:)`
```swift
public init(
endpoint: String,
clientId: String,
appId: String,
scopes: [String] = [],
resources: [String] = [],
usingPersistStorage: Bool = true