stripe integration testing on local gets me 403 using gmail

stripe integration testing on local gets me 403 on email , I havent tried deploying it yet
13 Replies
kapa.ai
kapa.ai6mo ago
Hi @haarismian. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, it seems like you might be encountering a similar issue to what was discussed in the Discord support thread about Stripe testing issues. A community member was getting a 401 error when testing Stripe locally. They discovered that there's a mandatory check for email, and if it's not present, it throws a 401 error. The solution they found was to remove this check for development. However, you're getting a 403 error, not a 401. This might be a different issue. A 403 error usually means "Forbidden" and is often due to a lack of permissions. It's possible that the email you're using doesn't have the necessary permissions for the Stripe API. If you're using the OpenSaaS project, make sure you've followed all the directions in the Stripe testing guide (https://docs.opensaas.sh/guides/stripe-testing/). Also, ensure that you have the Stripe CLI running when testing. If you're still encountering issues, it might be helpful to open a support thread on the Wasp Discord or GitHub to get more specific help. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
haarismian
haarismianOP6mo ago
@kapa.ai do I need to set secrets and start every time I deploy?
kapa.ai
kapa.ai6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Based on the provided knowledge sources, you only need to set up secrets once per Wasp app for each deployment platform. For example, if you're deploying to Heroku, you would set up your secrets using the heroku config:set command:
heroku config:set --app <app-name> JWT_SECRET=<random_string_at_least_32_characters_long>
heroku config:set --app <app-name> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed>
heroku config:set --app <app-name> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
heroku config:set --app <app-name> JWT_SECRET=<random_string_at_least_32_characters_long>
heroku config:set --app <app-name> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed>
heroku config:set --app <app-name> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
(Source: Wasp Docs - Set Up a Heroku App (https://wasp-lang.dev/docs/advanced/deployment/manually#set-up-a-heroku-app)) Similarly, if you're deploying to Fly.io, you would use the flyctl secrets set command:
flyctl secrets set PORT=8080
flyctl secrets set JWT_SECRET=<random_string_at_least_32_characters_long>
flyctl secrets set WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed>
flyctl secrets set WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
flyctl secrets set PORT=8080
flyctl secrets set JWT_SECRET=<random_string_at_least_32_characters_long>
flyctl secrets set WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed>
flyctl secrets set WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
(Source: Wasp Docs - Set Up a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#set-up-a-flyio-app)) Once these secrets are set, they should persist across deployments. However, if you need to change these secrets or add new ones, you would need to set them again. Remember, you should never store secrets in client-side environment variables, as they are public and readable by anyone (Wasp Docs - Defining Env Vars in Production (https://wasp-lang.dev/docs/project/env-vars#defining-env-vars-in-production)). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
haarismian
haarismianOP6mo ago
@kapa.ai how do I set multiple secrets at once
MEE6
MEE66mo ago
Wohooo @haarismian, you just became a Waspeteer level 1!
kapa.ai
kapa.ai6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- You can set multiple secrets at once by providing them all in the same command, separated by spaces. Here's how you can do it for both Heroku and Fly.io: For Heroku:
heroku config:set --app <app-name> JWT_SECRET=<random_string_at_least_32_characters_long> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
heroku config:set --app <app-name> JWT_SECRET=<random_string_at_least_32_characters_long> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
(Source: Wasp Docs - Set Up a Heroku App (https://wasp-lang.dev/docs/advanced/deployment/manually#set-up-a-heroku-app)) For Fly.io:
flyctl secrets set PORT=8080 JWT_SECRET=<random_string_at_least_32_characters_long> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
flyctl secrets set PORT=8080 JWT_SECRET=<random_string_at_least_32_characters_long> WASP_WEB_CLIENT_URL=<url_of_where_client_will_be_deployed> WASP_SERVER_URL=<url_of_where_server_will_be_deployed>
(Source: Wasp Docs - Set Up a Fly.io App (https://wasp-lang.dev/docs/advanced/deployment/manually#set-up-a-flyio-app)) Just replace the placeholders with your actual values. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
haarismian
haarismianOP6mo ago
@kapa.ai Cannot find module 'wasp/client/router' or its corresponding type declarations
kapa.ai
kapa.ai6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message "Cannot find module 'wasp/client/router' or its corresponding type declarations" typically indicates that the Wasp compiler hasn't been run or there's an issue with the Wasp project setup. Here are a few steps you can take to resolve this issue: 1. Check your Wasp version: Ensure you have the correct version of Wasp installed. You can check this by running wasp version in your terminal. 2. Run the Wasp compiler: The Wasp compiler needs to be run to generate the SDK, which includes the wasp/client/router module. You can do this by running wasp start in your terminal. 3. Clean and reinstall: If the above steps don't work, you might need to clean your Wasp project and reinstall dependencies. You can do this by running wasp clean followed by wasp start in your terminal. If you're still encountering issues, it might be helpful to open a support thread on the Wasp Discord or GitHub to get more specific help. Sources: - Discord support thread: Hey! Any ideas on some solutions to these errors? (https://discord.com/channels/686873244791210014/1215750573278629958) - Discord support thread: nothing shows up in localhost:3000 after wasp start (https://discord.com/channels/686873244791210014/1213958217537814640) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
haarismian
haarismianOP6mo ago
@kapa.ai useAuth.ts:20

GET http://localhost:3001/auth/me 401 (Unauthorized)
kapa.ai
kapa.ai6mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The GET <http://localhost:3001/auth/me> 401 (Unauthorized) error message typically indicates that the useAuth() hook is trying to fetch user data, but the user is not authenticated. This is a standard behavior of the Wasp authentication system and it's not something to worry about. In Wasp, the useAuth() hook is used to fetch user data. If a user is not logged in, the API will return a 401 Unauthorized error. This is just the API's way of saying "hey, the user is not logged in", and as a result, the user object is not set in the useAuth hook. This is a normal behavior and it doesn't indicate a problem with your code. If you're seeing this error in your browser console and it's causing confusion, you might want to consider implementing a method to check if a user is logged in without causing a 401 error. This could be a feature to suggest to the Wasp team for future development. Sources: - Discord support thread: useAuth() usage > Answers (https://discord.com/channels/686873244791210014/1216511333176971366) - Github Issue (closed): Discuss how we use authentication > Original post (https://github.com/wasp-lang/wasp/issues/566) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos6mo ago
@haarismian is this the same problem with sengrid that you mentioned, with 403, in another question?
haarismian
haarismianOP6mo ago
hey @martinsos it is not the exact same, but kapa's responses have helped me progress and resolve the issues, thank you, if you are part of the team making wasp/opensaas, really appreciate your work.
martinsos
martinsos6mo ago
Awesome, thanks a lot! Anything we can do on our side to help with the challenges you hit here?
Want results from more Discord servers?
Add your server