···
import * as Profile from '#/lexicon/types/app/bsky/actor/profile'
import * as Status from '#/lexicon/types/xyz/statusphere/status'
import { env } from '#/env'
-
import { formHandler, handler } from '#/lib/http'
import { page } from '#/lib/view'
import { home } from '#/pages/home'
import { login } from '#/pages/login'
···
'/oauth-client-metadata.json',
-
handler(async (req: Request, res: Response) => {
res.json(ctx.oauthClient.clientMetadata)
···
'/.well-known/jwks.json',
-
handler(async (req: Request, res: Response) => {
res.json(ctx.oauthClient.jwks)
···
-
handler(async (req: Request, res: Response) => {
res.type('html').send(page(login({})))
···
-
formHandler(async (req: Request, res: Response) => {
const handle = req.body?.handle
if (typeof handle !== 'string' || !isValidHandle(handle)) {
···
-
formHandler(async (req: Request, res: Response) => {
const session = await getIronSession<Session>(req, res, {
password: env.COOKIE_SECRET,
···
-
formHandler(async (req: Request, res: Response) => {
// If the user is signed in, get an agent which communicates with their server
const agent = await getSessionAgent(req, res, ctx)
···
import * as Profile from '#/lexicon/types/app/bsky/actor/profile'
import * as Status from '#/lexicon/types/xyz/statusphere/status'
import { env } from '#/env'
+
import { handler } from '#/lib/http'
import { page } from '#/lib/view'
import { home } from '#/pages/home'
import { login } from '#/pages/login'
···
'/oauth-client-metadata.json',
+
handler((req: Request, res: Response) => {
res.json(ctx.oauthClient.clientMetadata)
···
'/.well-known/jwks.json',
+
handler((req: Request, res: Response) => {
res.json(ctx.oauthClient.jwks)
···
+
handler((req: Request, res: Response) => {
res.type('html').send(page(login({})))
···
+
express.urlencoded({ extended: true }),
+
handler(async (req: Request, res: Response) => {
const handle = req.body?.handle
if (typeof handle !== 'string' || !isValidHandle(handle)) {
···
+
handler(async (req: Request, res: Response) => {
const session = await getIronSession<Session>(req, res, {
password: env.COOKIE_SECRET,
···
+
express.urlencoded({ extended: true }),
+
handler(async (req: Request, res: Response) => {
// If the user is signed in, get an agent which communicates with their server
const agent = await getSessionAgent(req, res, ctx)