Skip to content

Conversation

@evan10s
Copy link
Member

@evan10s evan10s commented Aug 12, 2020

Adds support for Help Scout dynamic custom apps as well as Beacons on the frontend

⚠️ I upgraded us to TypeScript 3.9.7. You'll need to upgrade your local version of the package if running registration locally

Dynamic app example:
image

Once we review this and get it merged, I will cherry-pick it into a new PR for master so this is a mainline registration feature.

@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev August 12, 2020 04:50 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev August 12, 2020 04:55 Inactive
Copy link
Member

@Stephanie-A Stephanie-A left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited!!!

Copy link
Member

@ehsanmasdar ehsanmasdar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, Helpscout seems cool! Was scrolling through the code and then figured I'd leave a few comments.

}

function createListBlock(title: string, content: string | string[] | Express.Multer.File | null) {
return `<li class="c-sb-list-item">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just happened to be scrolling through - I think this could lead to a XSS if you're not careful about the fields that are being included. You probably want to use some sort of templating library to construct this in a safe way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I will look into this. Help Scout asks you to send them basically the string HTML to display but I'm 99% certain they automatically filter what's displayed. But never hurts to be careful on our end too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed now that this uses Handlebars

return `<span class="badge ${type}">${text}</span>`;
}

async function helpScoutUserInfoHandler(request: express.Request, response: express.Response) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a scary function because if the auth checks pass it can query information about any user. For purposes of monitoring it (and also improving general data privacy posture) I'd consider logging accesses somewhere and having it notify y'all when it is used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. Would it be worthwhile to directly validate the signature in the function vs. middleware to prevent it from accidentally being open to the world? I wonder if we could also restrict it to be called by Help Scout IP addresses 🤔

Copy link
Member

@petschekr petschekr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things and questions

@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 15, 2020 06:01 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 16, 2020 01:36 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 16, 2020 05:00 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 19, 2020 20:46 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 19, 2020 21:33 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 19, 2020 22:36 Inactive
@hackgt-beekeeper hackgt-beekeeper bot temporarily deployed to reg-hs-dev September 19, 2020 23:35 Inactive
@evan10s evan10s merged commit 2d06c1b into hackgt7-dev Sep 20, 2020
@evan10s evan10s deleted the evan/hackgt7-hs-app branch September 20, 2020 03:21
evan10s added a commit that referenced this pull request Sep 20, 2020
* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
evan10s added a commit that referenced this pull request Sep 23, 2020
* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
# Conflicts:
#	package-lock.json
#	server/config/questions.json
evan10s added a commit that referenced this pull request Oct 1, 2020
* Add new Help Scout integration and Beacon functionality (#304)

* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

* Add staff, partner, and confirmation branches

* Fix questions

* Add HackGT 7 sponsor acceptance functionality (#311)

* Add sponsor branch auto-accept/reject capabilities

* Add console.log to verify sponsor email domain/email email allowlist

* Add HackGT 7 sponsor allowlist secrets

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>

* Fix duplicate branch

* Add staff/partner confirmation branches

* Add additional branch descriptions for the branch selection page

* Fix typo

* Fix partner branch name

* Clean up some more stuff

* Use list of choices for address state question

* Clean up sponsor data sharing agreement text

* Remove t-shirt question from mentor confirmation

* more fixes

* Add GM to sponsor list

* Fix typo

* Allow other on sponsor list

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
evan10s added a commit that referenced this pull request Dec 29, 2020
* Add new Help Scout integration and Beacon functionality (#304) (#308)

* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
# Conflicts:
#	package-lock.json
#	server/config/questions.json

* Fix compile errors

* Finishing touches

* clarify

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
rahulrajus pushed a commit that referenced this pull request Jul 22, 2021
* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
rahulrajus pushed a commit that referenced this pull request Jul 22, 2021
* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
rahulrajus pushed a commit that referenced this pull request Jul 22, 2021
* Add new Help Scout integration and Beacon functionality (#304)

* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

* Add staff, partner, and confirmation branches

* Fix questions

* Add HackGT 7 sponsor acceptance functionality (#311)

* Add sponsor branch auto-accept/reject capabilities

* Add console.log to verify sponsor email domain/email email allowlist

* Add HackGT 7 sponsor allowlist secrets

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>

* Fix duplicate branch

* Add staff/partner confirmation branches

* Add additional branch descriptions for the branch selection page

* Fix typo

* Fix partner branch name

* Clean up some more stuff

* Use list of choices for address state question

* Clean up sponsor data sharing agreement text

* Remove t-shirt question from mentor confirmation

* more fixes

* Add GM to sponsor list

* Fix typo

* Allow other on sponsor list

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
rahulrajus pushed a commit that referenced this pull request Jul 22, 2021
* Add new Help Scout integration and Beacon functionality (#304) (#308)

* Added very basic initial functionality

* Implemented hmac hash checking (maybe?)

* Basic hello world to test signature validation in test deploy

* Add Help Scout secret

* Add more debugging

* Updated to latest version of typescript, fixed Help Scout signature validation

* Pushing some more changes to see how they look

* Make time zone questions required

* Testing some more

* Make timezone questions required

* Fix punctuation in dates

* Lots of Help Scout integration UI element improvements

* Finishing touches for Help Scout integration

* Help Scout Beacon support improvements

* Add info about Help Scout integration/Beacon to README

* Apparently you can't define secrets in both deployment.yaml and a Beehive yaml

* Remove package script that doesn't work

* Upgraded packages, including Handlebars

* Re-implemented Help Scout templates using Handlebars

* Show selected application/confirmation questions in Help Scout

* Cleanup Help Scout API security

* Remove extra lines

* A few final fixes and tweaks

* Make time zone questions required

* test file questions help scout view

* Fix file helpscout download URL

* actually fix help scout file links

* Remove some console.logs

* minor fixes

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
Co-authored-by: Stephanie A <almeidasmail@gmail.com>
# Conflicts:
#	package-lock.json
#	server/config/questions.json

* Fix compile errors

* Finishing touches

* clarify

Co-authored-by: Evan Strat <evan10s@users.noreply.github.com>
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.

5 participants