fustuk.
WWasp-lang
•Created by fustuk. on 9/26/2024 in #đŸ™‹questions
Custom session token
Hey, I somehow need to issue a new token instead of using google/disc/email auth, is there a way to do that somehow? I couldnt find anything in the docs for some reason
22 replies
WWasp-lang
•Created by fustuk. on 9/16/2024 in #đŸ™‹questions
Backend public?
Is there a way that I can make my api accessible from localhost while its on prod?
The current frontend and api are hosted already and working, but I want to also access it from localhost(for now) and other domains later on.
57 replies
WWasp-lang
•Created by fustuk. on 9/11/2024 in #đŸ™‹questions
Zero length key (google auth) ??
7 replies
WWasp-lang
•Created by fustuk. on 9/9/2024 in #đŸ™‹questions
Are there any future plans of implementing something like Clerk's organizations?
8 replies
WWasp-lang
•Created by fustuk. on 9/2/2024 in #đŸ™‹questions
SendGrid 403 Error
I have updated this part in main.wasp
I didnt do anything else, I have a custom endpoint that sends emails properly, but when I try to register a user via email I get 403
27 replies
WWasp-lang
•Created by fustuk. on 8/28/2024 in #đŸ™‹questions
Serve /public files in prod (build)
Hello, I have a weird scenario in which I download a file on my API, save it in /public so the frontend can access it, and then I spin remotion to render the video in the background.
Issue is I keep getting errors saying
Error: ENOENT: no such file or directory, open '/app/public/0b985bfc-3d43-49d6-8d4c-7cc4bff1e24e.mp4'
Some of the code used for this:
48 replies
WWasp-lang
•Created by fustuk. on 8/28/2024 in #đŸ™‹questions
Dark theme by default?
Hey, I was wondering how to make 'dark' as default theme
I thought that this is is where its getting set initially but after changing
useLocalStorage('color-theme', 'dark');
it is still the same6 replies
WWasp-lang
•Created by fustuk. on 8/21/2024 in #đŸ™‹questions
CORS on custom API endpoint
This is what I have in api.ts file
import { MiddlewareConfigFn } from "wasp/server";
import { FooBar } from "wasp/server/api"; // This type is generated by Wasp based on the
nothing seems to fix it, any ideas?
api
declaration above.
export const apiMiddleware: MiddlewareConfigFn = (config) => {
return config;
};
export const fooBar: FooBar = (req, res, context) => {
res.set("Access-Control-Allow-Origin", ""); // Example of modifying headers to override Wasp default CORS middleware.
res.json({ msg: Hello, ${context.user ? "registered user" : "stranger"}!
});
};
// export const fooBar = (req: any, res: {
// set: (arg0: string, arg1: string) => void;
// json: (arg0: { msg: string; }) => void;
// }, context: { user: any; }) => {
// console.log("Hello from fooBar!");
// console.log("User:", context.user);
// res.set("Access-Control-Allow-Origin", ""); // Example of modifying headers to override Wasp default CORS middleware.
// res.json({ msg: Hello, ${context.user ? "registered user" : "stranger"}!
});
// };
And in main.wasp
api fooBar {
fn: import { fooBar } from "@src/api",
httpRoute: (GET, "/foo/bar"),
auth: true,
middlewareConfigFn: import { apiMiddleware } from "@src/api"
}
I get CORS when hitting it for some reason, as you can see I tried using it with auth,without auth with res.set("Access-Control-Allow-Origin", "*");nothing seems to fix it, any ideas?
17 replies
WWasp-lang
•Created by fustuk. on 8/19/2024 in #đŸ™‹questions
User Subsctiption plan change?
I couldnt find anything in the docs regarding this, how can a user change or cancel his subscription plan ?
Is this integrated or do I have to build it myself
4 replies