[Bug]: Optional-auth queries never send authorization, so `viewer` is always missing even with an active session
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with searchActors(matching:limit:cursor:) and compare its request setup with the optional-auth methods named in the issue: getAuthorFeed, getListFeed, searchStarterPacks, and getLabelerServices. Check how getUserSession() is used to attach authorization while still allowing unauthenticated requests. Done when viewer is populated for followed accounts with an active session and these queries still work without one.
Written by the indexing model from the issue text.
Description
Summary
searchActors(matching:limit:cursor:) always sends its request to self.pdsURL without authorization, even when a user session exists, so viewer is always missing on the returned actors. Other optional-auth methods such as getAuthorFeed, getListFeed, searchStarterPacks, and getLabelerServices have the same problem.
Reproduction Steps
- Sign in with
ATProtoKitso thatgetUserSession()returns a session. - Call
searchActors(matching:)with a query that matches an account the signed-in user follows. - Inspect
vieweron the returned actors.
Expected Results
viewer is populated (e.g. viewer.followingURI for followed accounts).
Actual Results
viewer is nil for every actor.
What operating systems did you experience this bug?
macOS
Operating System Version
macOS Golden Gate 27.2.1
ATProtoKit Version
0.34.1
Additional Context
The lexicons state "Does not require auth," which permits unauthenticated calls but does not preclude authenticated ones.
- Dominant language
- Swift
- Stars
- 226
- Forks
- 40
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MasterJ93/ATProtoKit
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MasterJ93/ATProtoKit#354 ·
-
[Feature Enhancement]: Add `sort` parameter to `getQuotes`Possibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MasterJ93/ATProtoKit#346 · 1 comment ·
-
[Feature Request]: Add `app.bsky.actor.contentVisibilityDeclaration` record supportPossibly taken A pull request linked to this issue is open or already merged. Opennew feature
Difficulty 3/5 1-2 days Newbie friendliness 68/100
MasterJ93/ATProtoKit#350 · 4 comments ·
-
[Feature Enhancement]: Support scoped mutes (`onlyReposts` / `onlyQuoteposts`) in `muteActor`Possibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
MasterJ93/ATProtoKit#348 · 1 comment ·
-
enhancement
Difficulty 4/5 1-2 days Newbie friendliness 52/100
MasterJ93/ATProtoKit#337 · 3 comments ·
All issues in MasterJ93/ATProtoKit
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue help wanted testing
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area:cli documentation good first issue priority:low
Difficulty 1/5 Under an hour Newbie friendliness 94/100
isaaclins/freesnitch#430 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
heysidhant/appvanish#4 ·
-
bug priority:low status:queued
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day