Skip to content

Commit 62e4056

Browse files
committed
draft: check auth state
1 parent b2e167e commit 62e4056

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

server/api/auth/atproto.get.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ export default defineEventHandler(async event => {
7676
message: 'Handle not provided in query',
7777
})
7878
}
79-
return "this api works"
79+
80+
const redirectUrl = await atclient.authorize(handle, {
81+
scope,
82+
prompt: create ? 'create' : undefined,
83+
})
84+
return redirectUrl
8085
} catch (error) {
8186
const message = error instanceof Error ? error.message : 'Authentication failed.'
8287

0 commit comments

Comments
 (0)