removed sound fixed dev stripe#30
Conversation
|
Visit the preview URL for this PR (updated for commit a0d1657): https://whatsanalyze-wrapped--pr-30-ru3652jk.web.app (expires Tue, 30 Dec 2025 13:00:14 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0bd15b540c352926caab0be20dfab09d7e234037 |
| .map((o) => o.trim()); | ||
|
|
||
| // Always allow the main app domain | ||
| allowed.push("https://whatsanalyze-wrapped.web.app"); |
There was a problem hiding this comment.
mhm sinnvoller wäre es die domain in das .env.whatsanalyze-wrapped file mit aufzunehmen oder?
There was a problem hiding this comment.
Da stehen sie ja bereits drin aber damit hat es nicht funktioniert. Ideen?
There was a problem hiding this comment.
Firebase deploy wird automatisch ausgeführt Beil pull request oder muss ich das local machen?
There was a problem hiding this comment.
mein vorgehen beim debuggen wäre so:
damit kannst du lokla so tun als wäre der request von wo anders her, und somit kannst du genau die domäne testen:
curl -X GET https://us-central1-whatsanalyze-wrapped-prod.cloudfunctions.net/createCheckoutSession
-H "Origin: https://whatsanalyze-wrapped--pr-21-ti2uynz7.web.app"
-H "Content-Type: application/json"
-d '{"data":{}}'
du musst nur die url nach get anpassen auf das wo die functions lokal laufen und den origin auf das was halt dev zeigt.
dann solltest du sehen dass es lokal failed. Ich würde dann in dem code snippet wo du die änderungen gemacht hast mal loggen was denn eigentlich in den allowed origin steht, also was da ankommt. vermutlich ist die logik davor etwas falsch
Firebase deploy wird automatisch ausgeführt Beil pull request oder muss ich das local machen?
es wird nur das FE deployed die functions müssen alle manuell deployed werden. habe das nicht mit aufgenommen, weil das ja immer so ewig läuft und wir da in zukunft vermutlich nie mehr was ändern
|
|
||
| export const createCheckoutSession = onCall( | ||
| {secrets: [stripeSecretKey]}, | ||
| {secrets: [stripeSecretKey], cors: true}, |
There was a problem hiding this comment.
ich glaube das brauchen wir nicht, das hat ja bis jetzt immer funktioniert
|
|
||
| export const createCustomerPortal = onCall( | ||
| {secrets: [stripeSecretKey]}, | ||
| {secrets: [stripeSecretKey], cors: true}, |
| // strip redirects them with a sessionid; with this endpoint here we can retrieve the customer info and use it to login | ||
| export const getCheckoutSession = onCall( | ||
| {secrets: [stripeSecretKey]}, | ||
| {secrets: [stripeSecretKey], cors: true}, |
No description provided.