From c90243619bfeb3b110bf0489461ead1566a4b31b Mon Sep 17 00:00:00 2001 From: Kuba Suder Date: Thu, 23 Jul 2026 02:09:09 +0200 Subject: [PATCH] read scopes in oauth.ts from the json --- src/api/oauth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/oauth.ts b/src/api/oauth.ts index 8a410a7..41e2ab7 100644 --- a/src/api/oauth.ts +++ b/src/api/oauth.ts @@ -4,6 +4,7 @@ import type { ResolveActorOptions, ResolvedActor } from '@atcute/identity-resolv import type { ActorIdentifier, Did } from '@atcute/lexicons'; import { appView, slingshotAPI } from '../api'; import { pdsEndpointForDID } from './identity'; +import oauthClientMetadata from '../../oauth-client-metadata.json'; export let isOAuthAvailable = false; @@ -25,7 +26,7 @@ class IdentityResolver { export async function startAuthentication(actor: string) { let authorizationURL = await oauth.createAuthorizationUrl({ target: { type: 'account', identifier: actor as ActorIdentifier }, - scope: 'atproto transition:generic' + scope: oauthClientMetadata.scope }); window.location.assign(authorizationURL); @@ -49,7 +50,7 @@ function initialize() { let redirectURI = `http://${location.host}/?callback`; let params = new URLSearchParams({ - scope: "atproto transition:generic", + scope: oauthClientMetadata.scope, redirect_uri: redirectURI }); -- 2.51.2