tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
add oauth scopes
awarm.space
1 month ago
8ae93e16
9b47b512
+4
-2
2 changed files
expand all
collapse all
unified
split
app
api
oauth
[route]
oauth-metadata.ts
route.ts
+2
-1
app/api/oauth/[route]/oauth-metadata.ts
···
7
7
? "http://localhost:3000"
8
8
: "https://leaflet.pub";
9
9
10
10
-
const scope = "atproto transition:generic transition:email";
10
10
+
const scope =
11
11
+
"atproto transition:generic transition:email include:pub.leaflet.authFullPermissions include:site.standard.authFull include:app.bsky.authCreatePosts";
11
12
const localconfig: OAuthClientMetadataInput = {
12
13
client_id: `http://localhost/?redirect_uri=${encodeURI(`http://127.0.0.1:3000/api/oauth/callback`)}&scope=${encodeURIComponent(scope)}`,
13
14
client_name: `Leaflet`,
+2
-1
app/api/oauth/[route]/route.ts
···
42
42
const ac = new AbortController();
43
43
44
44
const url = await client.authorize(handle || "https://bsky.social", {
45
45
-
scope: "atproto transition:generic transition:email",
45
45
+
scope:
46
46
+
"atproto transition:email include:pub.leaflet.authFullPermissions include:site.standard.authFull include:app.bsky.authCreatePosts",
46
47
signal: ac.signal,
47
48
state: JSON.stringify(state),
48
49
});