Skip to content

Commit 3f0794f

Browse files
committed
Update Getting Started article
1 parent 759974e commit 3f0794f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/ATProtoKit/ATProtoKit.docc/Getting Started with ATProtoKit.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@ ATProtoKit is designed to make it easy for you to interact with the AT Protocol
1919
In order to log in, you need to create a session. To get started, create a new ``ATProtocolConfiguration`` instance:
2020

2121
```swift
22-
let config = ATProtocolConfiguration(handle: "lucy.bsky.social", appPassword: "g8DBhaj-948uBho-Zh6c8Wl")
22+
let config = ATProtocolConfiguration()
2323
```
24-
25-
> Important: Do not use the password you typically use for signing into Bluesky: only use a specific App Password that's in use for this instance of ATProtoKit only. To generate an App Password, go to the Bluesky website, then go to Settings > Advanced > App Passwords and follow the instructions.
2624

2725
Then, you can create a session with the ``ATProtocolConfiguration/authenticate(with:password:)`` method:
2826

2927
```swift
3028
Task {
31-
try await config.authenticate()
29+
try await config.authenticate(with: "lucy.bsky.social", password: "hunter2")
3230
}
3331
```
3432

33+
> Important: Do not use the password you typically use for signing into Bluesky: only use a specific App Password that's in use for this instance of ATProtoKit only. To generate an App Password, go to the Bluesky website, then go to Settings > Advanced > App Passwords and follow the instructions.
34+
3535
You can use a `do-catch` block to create the ``UserSession`` object (if the session was successfully created) or handle the error (if an error occured):
3636

3737
```swift
38-
let config = ATProtocolConfiguration(handle: "lucy.bsky.social", appPassword: "hunter2")
38+
let config = ATProtocolConfiguration()
3939

4040
Task {
4141
do {
42-
try await config.authenticate()
42+
try await config.authenticate(with: "lucy.bsky.social", password: "hunter2")
4343

4444
// Handle the success.
4545
} catch {

0 commit comments

Comments
 (0)