Arnab
WWasp-lang
•Created by Arnab on 7/10/2024 in #đŸ™‹questions
useAuth.ts
ok thank you. In wasp there's the useAuth.ts (https://github.com/wasp-lang/wasp/blob/24920c0bf5bc4dfee43dd3cf68db7f24723f6c92/waspc/data/Generator/templates/sdk/wasp/auth/useAuth.ts#L15).
I can't seem to find the same file in opensaas. Which file would I edit the role to be guest or paid-user?
11 replies
WWasp-lang
•Created by Arnab on 7/10/2024 in #đŸ™‹questions
useAuth.ts
In the browser console I keep getting errors (in guest mode) "useAuth.ts:20
GET http://localhost:3001/auth/me 401 (Unauthorized)"
GET http://localhost:3001/auth/me 401 (Unauthorized)"
11 replies
WWasp-lang
•Created by Arnab on 7/10/2024 in #đŸ™‹questions
useAuth.ts
Opensaas doesn't have a useAuth. So I created one. It seems to be working, but I'm worried I messed something up with this
useAuth.tsx:
import { useQuery } from '@tanstack/react-query';
import axios from 'axios';
const getMe = async () => {
const response = await axios.get('/auth/me');
return response.data;
};
export const useAuth = () => {
return useQuery(['getMe'], getMe, {
retry: false,
onError: (error) => {
console.error('Error fetching user data:', error);
}
});
};
11 replies
WWasp-lang
•Created by Arnab on 7/10/2024 in #đŸ™‹questions
useAuth.ts
Thanks for the help!
So I'm trying to give a potential user the ability to try the software before trying it. The goal would be convert them to a free registered user, then later paid.
I'd like to add blocks to how many times a user can use the free service (cookies?). If it's easy enough merge the guest user with a registered user (if it's a pain no need).
It's a similar flow to this page: https://gptzero.me/
The difference is their limiter is the number of characters. I'd be limiting the number of images the user can generate.
11 replies
WWasp-lang
•Created by Arnab on 6/12/2024 in #đŸ™‹questions
Remove email sign in/ up
That’s right. Yup got it! Thank you
6 replies
WWasp-lang
•Created by Arnab on 6/8/2024 in #đŸ™‹questions
Prisma Studio for a deployed app
@miho are there docs to use Prisma Studio?
I'm uploading to a s3 bucket. I need a way to correlate and track which user is uploading files, so I can response with a (staged) image.
So far I setup an email notification from AWS when there is a new uploaded image. Is there a better way more simple way to do this?
7 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
I also suggested to miho to record a video of deploying on youtube. I think videos on youtube would be super helpful in general. I'm happy to do a quick video and share. Lmk
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
Also make sure your port secret is 8080
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
Yes, @miho helped fix the issue.
The issue I ran into was with one of the secrets. The EMAIL_PASSWORD secret I had set via terminal and forgot the "". I'd go to fly.io and set it directly on their dashboard.
Also you can add a "console.log (emailUsername, emailPassword)" after line 35 for logs in actions.ts.
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
@miho still free in 10 min?
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
Thanks for the help
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
Awesome! Talk soon
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
I'm in EDT. I think 2pm CEST is 8am EST. I can do 1:30pm CEST if needed.
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
Also in the oAuth do I keep it on testing or prod? If it's on prod doesn't it need a custom domain?
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
I've been trying to fix this issue for a few weeks. I'd really apprecaite the help.
65 replies
WWasp-lang
•Created by Arnab on 5/19/2024 in #đŸ™‹questions
deployment issues
@martinsos I see that you may be online to help?
65 replies