Vinny (@Wasp)
Explore posts from serversWWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
yeah thats what I did manually in the example repo above. it would be cool to be able to save a property straight to the user entity, but if not, then a related entity with the oauth uniqueRequestId did the trick. I was able to relate the two entities in the
onAfterSignup
hook using that ID.22 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
FYI @miho -- trying to add signup field customization for both
email & password
and google
auth methods is a pain. For email and password I could have just used a custom signup field in defineUserSignupFields
and customized the signupForm
But with google auth, I had to use the beforeOauthRedirect
hook, create a new userType
record, then use the onAfterSignup
hook to assign that userType
to the newly created user. It would be cool if we could just pass in one property to the SignupForm
and have that property be passed to ALL auth methods, e.g.
22 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
there are a lot of ways you could get around this. For example, it's most likely that users will be of "fan"
userType
so you could just default it to that, and put something in account settings that allows them to change their userType
to creator. So its only creators that need to do the extra step.
or, don't use social auth and only use email & password and just use a custom signup field, which is a lot easier than creating all these custom sign up actions and hooks: https://wasp-lang.dev/docs/auth/overview#signup-fields-customization22 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
here is an example. It's quite a lot of work to get it set up using both email and google becasue you have to customize both processes. Honestly, I would go with option 1. above because it could save you a lot of headached in the future, but here is option 2. anyway: https://github.com/vincanger/custom-auth-open-saas/tree/master/src/auth
You'll notice:
- a custom signup action
- custom signup form (for email and password login)
- a custom google signup button
These custom components will assign the
userType
you set in your url query param http://localhost:3000/signup?userType=creator
or it defaults to userType=fan
You still have to:
- implement the email verification step in customSignup.ts
- fix the signup page styles
- redirect the users to the proper dashboards based on user.userType.type
(you might have to create a custom query to get this type -- see schema.prisma
)22 replies
WWasp
•Created by Briston on 12/15/2024 in #đŸ™‹questions
Google analytics is not getting installed in my index.html after using npm run build?
Make sure to replace the
G-1234567890
with your actual analytics number35 replies
WWasp
•Created by Briston on 12/15/2024 in #đŸ™‹questions
Google analytics is not getting installed in my index.html after using npm run build?
@Briston it looks like kapa is confusing Astro with Wasp.
In Open SaaS, it gives an example of how you can use google analytics scripts via a cookie consent banner (e.g. if they click accept, it loads the script, if they decline, it doesn't load it). Here is the example in the Open SaaS template, as well as a guide from the docs t: Cookie Consent.
Or you can add the script directly to
head
like this:
35 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
Any luck?
22 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
2. You create two urls, one for the creators and one for the fans, e.g.
-
https://yourapp.com/login?isCreator=1
for creators
- https://yourapp.com/login?isCreator=0
for fans
Then in your SignupPage, you do the following:
Then you use the Auth Hooks to deal with it: https://wasp-lang.dev/docs/auth/auth-hooks
I can help you out more with this later if you're interested22 replies
WWasp
•Created by Vinny (@Wasp) on 12/11/2024 in #đŸ™‹questions
Creating two log in flows for Creators and Fans
ok @santi_matero the bot gave an ok suggestion but I see it didn't get everything right.
Here are some options for you to consider:
1. Add some extra properties to the
User
:
After they go through the sign up process, isSignupComplete
will be false.
Check for that on the homepage and redirect them to a CompleteSignupPage
with a form that allows the choose if they want to continue as a "creator" or "fan".
from there on, you redirect users to either the creator or fan dashboard pages22 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
I have no experience deploying to a VPS but it definitely sounds like something is going wrong in your Build process. @miho is the most experienced with deploying to VPS, so I'll let him take over from here.
81 replies
WWasp
•Created by Obaydah on 12/9/2024 in #đŸ™‹questions
Error when running migrate-dev
yep, I just pushed the updated changes to the remote repo so you can
1. ammemd your package.json to include the explicit react-dom and react-router-dom versions:
or
2. you can just pull a fresh saas template if you haven't starte coding (much) yet:
wasp new -t saas
20 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
I did have to update my package.json to include react-dom and react-router-dom explicit versions, but I don't think this is the issue affecting you:
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
no issues deploying lemon squeezy test keys and checking out after deploying to fly.io (cc: @martinsos @miho )
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
Haha. Ok tomorrow I’m gonna try out deploying the app with lemon squeezy test keys and see if I run into similar issues @martinsos
81 replies
WWasp
•Created by Lucas on 12/6/2024 in #đŸ™‹questions
Allow Guest Subscription Before Account Registration in OpenSaaS
Ohh this is a great idea, miho. Check it out @Lucas đŸ‘†
18 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
But seems odd that you're having this issue. Could it be something to do with node versions or something on your server. @martinsos might know more than me on this topic.
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
But I don't know, to be honest. With Stripe you can deploy an app with test keys
81 replies
WWasp
•Created by Killshot on 12/9/2024 in #đŸ™‹questions
LemonSqueezy webhooks not working after deployment (VPS)
That sounds possible!
81 replies