Skip to content

feat: add student account verification endpoint#167

Merged
pimterry merged 3 commits intohttptoolkit:mainfrom
Tiebe:main
Apr 24, 2026
Merged

feat: add student account verification endpoint#167
pimterry merged 3 commits intohttptoolkit:mainfrom
Tiebe:main

Conversation

@Tiebe
Copy link
Copy Markdown
Contributor

@Tiebe Tiebe commented Apr 11, 2026

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!

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
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 11, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Member

@pimterry pimterry left a comment

Choose a reason for hiding this comment

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

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?

Comment thread api/src/functions/request-student-account.ts Outdated
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 22, 2026

@Tiebe
Copy link
Copy Markdown
Contributor Author

Tiebe commented Apr 22, 2026

@pimterry Thanks for your review!

I used educhk for the library. It is not hugely popular, but it is one of the only ones still getting updates, and should be easy to replace if that ever stops. Is that fine?

I also added a basic test and added a student-account provider!

@Tiebe Tiebe requested a review from pimterry April 22, 2026 12:50
@socket-security
Copy link
Copy Markdown

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.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm typescript

License: LicenseRef-W3C-Community-Final-Specification-Agreement - The applicable license policy does not permit this license (5) (package/ThirdPartyNoticeText.txt)

From: ui/package-lock.jsonnpm/typescript@4.9.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/typescript@4.9.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@pimterry pimterry merged commit fdaff80 into httptoolkit:main Apr 24, 2026
3 checks passed
@pimterry
Copy link
Copy Markdown
Member

Great stuff, thanks @Tiebe! I've merged it. I'll find some time to review the frontend as soon as I can 🙏

@pimterry
Copy link
Copy Markdown
Member

Did add one tweak here just to guard against signups with active paying accounts, but otherwise all good.

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.

3 participants