import { json } from "@sveltejs/kit";
import metadata from "../../lib/oauth-client-metadata.json";

export const GET = ({ url }) => {
	const origin = url.origin;

	return json({
		...metadata,
		client_id: `${origin}/oauth-client-metadata.json`,
		client_uri: origin,
		redirect_uris: [`${origin}/oauth/callback`]
	});
};
