Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: Auth issue #298

Merged
merged 48 commits into from
Nov 4, 2023
Merged

Hotfix: Auth issue #298

merged 48 commits into from
Nov 4, 2023

Conversation

BraydenRoyston
Copy link
Contributor

Sarah encountered an authentication issue on prod when trying to use the application which resulted from the following CORS error:

login:1 Access to XMLHttpRequest at 'https://focusonnature.herokuapp.com/auth/login' from origin 'https://focusonnature.web.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Hotfix for this includes setting withCredentials to false.

dhmi19 and others added 30 commits January 8, 2023 17:21
* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Rebase

* Address PR comments, organize code to remove duplication

* Lint

* Lint

* Add visited verification on review summary page.

* Add new dependency after resolving merge conflict.

* Address comments
* Add and implement EditCardHeader

* Edit styles in additional question groups to support responsiveness

* Add additional info edit card and edit prop names for consistency

* Make all styles consistent.

* Lint

* Add error validation on save
* Add image upload to camp creation

* aspect ratio fixes

* Add error handling so that when a user tries to click next, errors are shown (if any).

Co-authored-by: twilkhoo <[email protected]>
* Fix: camp creation validator logic

* Add EDLP logic

* Fix merge conflict error with the VStack

Co-authored-by: twilkhoo <[email protected]>
Co-authored-by: Tejas Wilkhoo <[email protected]>
* update 'updateCamperByids' to allow moving between sessions

* very rough draft of full implementation

* remove console.log + added deleteActionCleanUp to reset the selected camper

* yarn fix + fix unimported components + remove console.log

* yarn for backend

* add check to find earliest and latest session date

* Lint

* Fix cancel button logic

* Lint + var rename

* styling changes + change html to chakra comps

Co-authored-by: twilkhoo <[email protected]>
* fix: session date ordering, hide completed sessions

* more ordering

* ordering and loading states
* Commit all changes

* Close before processing for deleting a camp also.
* rebasing 'change routes to load waitlist registration + implement waitlist registration pages'

* fix age display

* remove generic footer + edit & use waitlist footer + shrink page top padding

* revert changes to formatSessionInfo back to what was in dev

* fix failed checkout url redirect bug
…EmergencyContactQuestionsto EditCamperCard/ContactCard components) (#254)

* Commit all changes

* Remove spacer to make styles consistent

* Lint.
* Commit changes

* Address changes
…#259)

* add check to ensure that at least one multiple choice option has text

* lint

* remove console.log

* Add error handling for whitespace options and require at least two options for multiple choice

---------

Co-authored-by: twilkhoo <[email protected]>
* Commit changes

* Lint

* Add notFound comment.

* Lint.
* added adding waitlist campers call to the frontend

* use error message from backend api for registering waitlist camper

* run lint

* err msg change + variable name change

* Add "and" and period.

---------

Co-authored-by: twilkhoo <[email protected]>
* Commit all changes.

* Change type of setRequireEdlp to use React.Dispatch.
* Commit all changes.

* Fix clicking a camper twice.
* Add a temp comment to track status before updating deps.

* Update react-scripts to v5 and test.

* Try using a legacy openssl flag to work around the conflicting hash error.
…or/volunteer editing (#267)

* Commit all changes.

* Create another endpoint for when we want to create new camp sessions.

* Consolidate changes into one endpoint.
* fix: prevent duplicates in multiple choice

* refactor: use enum for option error handling

* style: more descriptive names and clean up eslint warnings
* added error message when trying to move to next page with no dates selected in session camp card

* fix: frontend lint fixes

* fix: PR Feeback

---------

Co-authored-by: Derrick Yang <[email protected]>
* feat: added two email verification tests

* feat: initial code for deep email validation check

* fix: removed deep-email-validator logic

* fix: removed deep-email-validator imports

* bug: removed unneeded dependencies and package bug
derrick-yyang and others added 18 commits July 1, 2023 15:53
* feat: WIP, homepage of CamperCancellationRefund flow

* feat: WIP rough in refund page and component

* feat: WIP design layout of cancellation card

* feat: add RefundDTO

* feat: add refund dummy endpoint

* fix: lint

* fix: CSS

* feat: WIP hooked up backend

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: syntax fix to use map function for refund card

* feat: WIP, added information according to backend data onto CamperRefundInfoCards

* fix: added start/end time

Co-authored-by: Nathan Souphanthong <[email protected]>

* fix: WIP EDLP Time and grouping sessions based on name

Co-authored-by: Nathan Souphanthong <[email protected]>

* feat: Added EDLP Time calculation

* fix: unneeded syntax

* fix: remove console log

* fix: formatting for multiplace instances

* fix: vstack width

* feat: disabled state for when first session is < 30 days

* fix: lint

* feat: added refundCode to URL

* fix: PR feedback

---------

Co-authored-by: Nathan <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Nathan Souphanthong <[email protected]>
 * feature: unique refund link generation

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
* Setup Stripe webhooks

---------

Co-authored-by: Nathan <[email protected]>
* fix: sorted session dates in registration emails

* bug: fixed linting issue with return
* feat: batch process camper cancellations
* Add discount amount to confirmation email (Nathan/Tina)

---------

Co-authored-by: Tina <[email protected]>
* fix: Code readibility and frontend fixes

Co-authored-by: Catherine Xie <[email protected]>

* fix: removed error

* fix: Added total refund at the bottom

* fix: Remove EDLP if it's 0$

* fix: WIP redirect when given wrong refund code

* fix: error handled gracefully from API

* feat: Added spinner styling when loading:

* fix: linting

* fix: textStyle for dynamic page sizing

* fix: button sizing for dynamic page size

* fix: linting

* fix: lint

* fix: Linting

* fix: Address PR Comments

* fix: Address PR Comments

* fix: Removed any warning by adding type

* fix: linting fix

* fix: linting fix

* fix: deleted unexpected console statement

---------

Co-authored-by: Derrick Yang <[email protected]>
* feat: add regex check to validate email

* fix: use existing checkEmail function
* feat: Added endpoint to retrieve discount info from stripe checkout session chargeId

* feat: Added frontend code to display refund amount, if any

* feat: Added error banner if cards are disabled

* feat: Refactored code so total refund changes based on selected cards

* feat: Added disable logic for button in the footer

* fix: linting

* fix: PR feedback - fixed negative discount total refund

* fix: PR feedback - distribute discount to be proportional to selected refund cards

* fix: linting

---------

Co-authored-by: Catherine Xie <[email protected]>
* feat: add validation for non-negative EDLP amount

* fix: lint
* feat: batch process camper cancellations

* feat: factor out Stripe refund creation

* refactor: use Promise all instead of await in loop

* feat: added new field "refundStatus" to camper obj

* fix: add refundstatus field for camp+camperservice

* fix: add refundStatus in more objects

* fix: changed variable names and refund status

* chore: changed "Not Refunded" status to "Paid"

* feat: added new field paymentintentid to camper

* fix: edit camper object with paymentintentid

* fix: included paymentintentid in cancellation func

* brayden/webhook integration

* fix: remove paymentintent, change cancel flow

* fix: fixed stripe api bug

* fix: patched refundstatus not updating in db

* fix: linting fixes

---------

Co-authored-by: Tina <[email protected]>
Co-authored-by: William Tran <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>
* fix: add empty dep array so useEffect is only called once

* Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added functionality to request refund so it calls a dummy endpoint

Co-authored-by: Catherine Xie <[email protected]>

* feat: Added loading for requestRefund button

* fix: lint

* fix: margin adjustment

* chore: lint

---------

Co-authored-by: Catherine Xie <[email protected]>
Co-authored-by: Brayden Royston <[email protected]>
Co-authored-by: BraydenRoyston <[email protected]>
* feat: add refund confirmation page

---------

Co-authored-by: BraydenRoyston <[email protected]>
@BraydenRoyston BraydenRoyston merged commit a6b9328 into main Nov 4, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.