Wasp-lang

W

Wasp-lang

Join the community to ask questions about Wasp-lang and get answers from other members.

Join

Modify data in `onBeforeSignup` hook

Pretty much the title. Is this possible? My signup flow requires a key linked to a third party service, and the goal was to gather data via that service's API before inserting it into the database. I've got properties on my User model that I don't include in my auth flow for obvious reasons - what's the go here? Is there a good option here besides making the data optional and inserting it in an onAfterSignupHook instead? I presume I'll need to hit the api twice if so - once in onBeforeSignup to verify, and once again in onAfterSignup to add additional properties....

Can't make onAfterLogin work

Hello, I updated wasp because I need this specific hook in my project but I really can't make it work. Here is my app/src/auth/hooks.ts file:...

NextJS usePathname equivalent

Gday devs, I'm currently using client.rootComponent in a similar fashion to NextJS's layout.tsx however was there an alternative to usePathname()? Or do I need to patch together my own? Obviously window.location.pathname exists but it won't trigger a re-render upon navigation. Couldn't find anything in gh issues or on the docs, so reaching out here. Cheers!...

Integration of Alternative Payment Gateway

Hello everyone! If I wanted to integrate a payment gateway other than Stripe or Lemon Squeezy, what path should I take? Is there any example of a different integration? As I am new to the development world, I would appreciate any guidance you can provide. Thank you very much!...

Does wasp support preceeding route param eg. "/:lang/dashboard" ?

I want to have pages in different languages so i would like to set up the following routes: /:lang/dashboard /:lang/account ......

In saas project starter, why store uploadUrl in database

Here is a snippet from the Prisma file of https://wasp-lang.dev/blog/2024/01/30/open-saas-free-open-source-starter-react-nodejs Why does uploadUrl get stored? It expires after an hour, so seems like a waste of storage space. ``` model File {...

Refresh token is null

Hey! I am using the SaaS template with Google login. I would like to retrieve the refresh token in the onAfterLogin hook so that I can later authenticate to other Google libraries. Unfortunately, the refresh token seems to always be null, what am I doing wrong? Am I missing a configuration?

how do i fix this

❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /projects/studyguided/main.wasp @ 30:14-19 Type error: Expected type: entity (declaration type)...

How do i fix this error

❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /projects/studyguided/main.wasp @ 10:17-22 Type error: Expected type: entity (declaration type)...

Can you put a next.js app in wasp

Can you take a next.js app and put it directly into wasp with no issues. If so, how should it be done?

Go-live issue

Hello everyone, iI'm trying to go in PROD with my wasp/nodejs/react/flask/postgreSQL web application with Digital Ocean but in my site datanext.app i see just the favicon and the tab description, but all the page was completely blank. Please see my step bellow:...

Is there a way to control timezone for dates ?

It looks like prisma is automatically converting timezones between the user's timezone and UTC when storig datetime on the database. Is there a way to add a more fine grained control, such as allowing users to specify their timezone and have all the dates reflect that whiule still being saved in UTC? I've been banging my head on it for a few hours today with no avail, and I was wondering if there is some wasp / prisma magic I need to be aware of. I'm using the OpenSaaS template

Meta tag in head

@kapa.ai How would I add a meta tag to the head of the document in the web-app?

CORS issue on authentication

I have a server set up with the API running on port 448 (https). I'm getting this error: Access to XMLHttpRequest at 'https://thehatchery.io:448/auth/me' from origin 'https://thehatchery.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource....

How can I protect a page?

I created a form. After stripe payemnt the user is successfully sent to the form. Unfortunately anyone with the URL can access the form. I want users who have made a stripe payment to be able to access the form and submit one time. Can anyone point me in the right direction? TY in advance, Kelly

Making sure www.<mysite>.com redirects to https://<mysite>.com?

@kapa.ai
This isn't really a wasp question as such (although it is a wasp app). I noticed my website only works with https:// in front and the www doesn't redirect after I deployed it on fly.io. What should I check to repair this?...

What environment vars need to be set in order to deploy for production

Hi what environment variables need to be set in order to deploy for production? e.g: plausible? sendgrid? google analytics?...

How do i implement the stripe webhook in production

in the guide it tells how to implement stripe webhook in development, but how do i get this for production, opensaas.

Payments gateway

Hi , I would like to inquire about the possibility of integrating with any other payment gateway. Will the method be complicated?...

Hide Loged User Navigation Bar in Onboarding Page

Heyy @kapa.ai I created an onboarding page, that is when the user comes from the register, I want to hide the navigation bar only for this page, I'm working with the SaaS template