mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 00:18:19 +01:00
fix(api): 🐛 Fix missing FormData acceptance for registration route
This commit is contained in:
parent
3b704b4c8c
commit
df84572148
|
|
@ -1,4 +1,4 @@
|
|||
import { apiRoute, applyConfig, auth } from "@/api";
|
||||
import { apiRoute, applyConfig, auth, jsonOrForm } from "@/api";
|
||||
import { tempmailDomains } from "@/tempmail";
|
||||
import { createRoute } from "@hono/zod-openapi";
|
||||
import { and, eq, isNull } from "drizzle-orm";
|
||||
|
|
@ -42,7 +42,10 @@ const route = createRoute({
|
|||
path: "/api/v1/accounts",
|
||||
summary: "Create account",
|
||||
description: "Register a new account",
|
||||
middleware: [auth(meta.auth, meta.permissions, meta.challenge)],
|
||||
middleware: [
|
||||
auth(meta.auth, meta.permissions, meta.challenge),
|
||||
jsonOrForm(),
|
||||
],
|
||||
request: {
|
||||
body: {
|
||||
content: {
|
||||
|
|
|
|||
|
|
@ -314,8 +314,7 @@ description = "A Versia Server instance"
|
|||
# URL to your instance banner
|
||||
# banner = ""
|
||||
|
||||
# Used for federation.
|
||||
# Use the "generate-keys" CLI command to generate these keys
|
||||
# Used for federation. If left empty or missing, the server will generate one for you.
|
||||
[instance.keys]
|
||||
public = ""
|
||||
private = ""
|
||||
|
|
@ -414,10 +413,10 @@ forced = false
|
|||
# Overriden by the signups.registration setting
|
||||
allow_registration = true
|
||||
|
||||
[plugins.config."@versia/openid".keys]
|
||||
# Use the "generate-keys" CLI command to generate these keys
|
||||
public = ""
|
||||
private = ""
|
||||
# [plugins.config."@versia/openid".keys]
|
||||
# Run Versia Server with those values missing to generate a new key
|
||||
# public = ""
|
||||
# private = ""
|
||||
|
||||
# The provider MUST support OpenID Connect with .well-known discovery
|
||||
# Most notably, GitHub does not support this
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Hooks, Plugin } from "@versia/kit";
|
||||
import { User } from "@versia/kit/db";
|
||||
import chalk from "chalk";
|
||||
import { z } from "zod";
|
||||
import { User } from "@versia/kit/db";
|
||||
import authorizeRoute from "./routes/authorize.ts";
|
||||
import jwksRoute from "./routes/jwks.ts";
|
||||
import ssoLoginCallbackRoute from "./routes/oauth/callback.ts";
|
||||
|
|
|
|||
Loading…
Reference in a new issue