You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better-Auth has been brilliant, but I hate the fact that I have two openAPI schemas / Scalar instances in the project. Since there is no easy way to merge it, and the inbuilt openAPI and scalar options in config file don't really accept Scalar configuration option, I found this workaround to serve the merged API specs.
It's still rudimentary and I did it quickly. Will be cleaning it up soon.
`import { defineEventHandler, getRequestURL, setResponseHeader } from "h3";
import { auth } from "../utils/auth";
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Better-Auth has been brilliant, but I hate the fact that I have two openAPI schemas / Scalar instances in the project. Since there is no easy way to merge it, and the inbuilt
openAPIandscalaroptions in config file don't really accept Scalar configuration option, I found this workaround to serve the merged API specs.It's still rudimentary and I did it quickly. Will be cleaning it up soon.
`import { defineEventHandler, getRequestURL, setResponseHeader } from "h3";
import { auth } from "../utils/auth";
export default defineEventHandler(async (event) => {
const url = getRequestURL(event);
const baseUrl =
${url.protocol}//${url.host};Beta Was this translation helpful? Give feedback.
All reactions