From 415c1644bcc6ad22756037051ae60fe4757790dc Mon Sep 17 00:00:00 2001 From: Roscoe Rubin-Rottenberg Date: Tue, 14 Jul 2026 00:22:33 -0400 Subject: [PATCH] fix: authorize delegated video uploads --- .../core/auth/data/repositories/aip_scope_policy.dart | 1 + .../data/repositories/auth_repository_impl_test.dart | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/core/auth/data/repositories/aip_scope_policy.dart b/lib/src/core/auth/data/repositories/aip_scope_policy.dart index da2d10a0..21fa95f4 100644 --- a/lib/src/core/auth/data/repositories/aip_scope_policy.dart +++ b/lib/src/core/auth/data/repositories/aip_scope_policy.dart @@ -24,6 +24,7 @@ class AipScopePolicy { 'repo:app.bsky.feed.like', 'repo:app.bsky.feed.repost', 'repo:app.bsky.graph.follow', + 'rpc:com.atproto.repo.uploadBlob?aud=*', 'rpc:com.atproto.moderation.createReport?aud=*', ]); } diff --git a/test/src/core/auth/data/repositories/auth_repository_impl_test.dart b/test/src/core/auth/data/repositories/auth_repository_impl_test.dart index 038b16a3..d0dc7624 100644 --- a/test/src/core/auth/data/repositories/auth_repository_impl_test.dart +++ b/test/src/core/auth/data/repositories/auth_repository_impl_test.dart @@ -722,7 +722,7 @@ void main() { ); expect( registrationBody['scope'] as String, - 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.moderation.createReport?aud=*', + 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.repo.uploadBlob?aud=* rpc:com.atproto.moderation.createReport?aud=*', ); return http.Response( json.encode({ @@ -770,7 +770,7 @@ void main() { expect(authUri.queryParameters['state'], isNotEmpty); expect( authUri.queryParameters['scope'], - 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.moderation.createReport?aud=*', + 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.repo.uploadBlob?aud=* rpc:com.atproto.moderation.createReport?aud=*', ); final callbackUrl = Uri.parse(_redirectUri) @@ -901,7 +901,7 @@ void main() { json.decode(request.body) as Map; expect( registrationBody['scope'] as String, - 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.moderation.createReport?aud=*', + 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.repo.uploadBlob?aud=* rpc:com.atproto.moderation.createReport?aud=*', ); return http.Response( json.encode({ @@ -928,7 +928,7 @@ void main() { expect(registrationCalls, 1); expect( authUri.queryParameters['scope'], - 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.moderation.createReport?aud=*', + 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.repo.uploadBlob?aud=* rpc:com.atproto.moderation.createReport?aud=*', ); final savedSnapshot = AuthSnapshot.fromJsonString( @@ -937,7 +937,7 @@ void main() { expect(savedSnapshot.aipClientRegistration?.clientId, 'client-2'); expect( savedSnapshot.aipClientRegistration?.scope, - 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.moderation.createReport?aud=*', + 'atproto include:so.sprk.authFullApp?aud=did:web:api.sprk.so#sprk_appview include:chat.sprk.authFull?aud=did:web:api.sprk.chat#sprk_chat include:app.bsky.authViewAll?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authCreatePosts?aud=did:web:api.bsky.app#bsky_appview include:app.bsky.authDeleteContent?aud=did:web:api.bsky.app#bsky_appview blob:*/* repo:app.bsky.feed.like repo:app.bsky.feed.repost repo:app.bsky.graph.follow rpc:com.atproto.repo.uploadBlob?aud=* rpc:com.atproto.moderation.createReport?aud=*', ); }, ); -- 2.51.2