feat: add student account verification endpoint#167
feat: add student account verification endpoint#167pimterry merged 3 commits intohttptoolkit:mainfrom
Conversation
Add academic email verification using JetBrains SWOT data (git submodule). Students with .edu/.ac.uk/etc emails get HTTP Toolkit Pro free for 1 year, renewable when less than 2 months remain. - Add swot.ts module that reads SWOT repo data for domain verification - Add POST /request-student-account authenticated endpoint - Register route and CORS in server.ts
pimterry
left a comment
There was a problem hiding this comment.
Thanks @Tiebe! The general approach looks great, I've just left one comment on the code, but there's a few things we need to do:
- We need a test for this (at least just one OK + one rejection example)
- It would be better to do this with an npm dependency if we can, instead of vendoring the code directly and managing that ourselves. Looks like there are a few options for that, can you take a look and see if you can find one that might work and is actively maintained?
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Great stuff, thanks @Tiebe! I've merged it. I'll find some time to review the frontend as soon as I can 🙏 |
|
Did add one tweak here just to guard against signups with active paying accounts, but otherwise all good. |
Add academic email verification using JetBrains swot data. Students can get HTTP Toolkit Pro for free, renewable every year.
I added a git submodule for the JetBrains swot data, and translated the Kotlin logic for verifying whether a email is academic or not to TypeScript.
Also added a new endpoint at
/request-student-account, for verifying and giving a user the subscription status.Relevant issue: httptoolkit/httptoolkit#189
Other PR: httptoolkit/httptoolkit-website#123
Let me know if you want any changes!