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

feat: email verification #383

Merged
merged 69 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
2e965fc
feat: add models for email validation
seelengxd Oct 31, 2024
775e2e0
feat: send verification email on signup
seelengxd Oct 31, 2024
57d508b
fix(signup): unverify normal user
seelengxd Oct 31, 2024
d24f119
feat(user): expose verified boolean
seelengxd Oct 31, 2024
4623146
feat: email verification frontend
haoyangw Oct 31, 2024
d6cb6b1
Require auth for verify email page
haoyangw Oct 31, 2024
805f592
Merge branch 'seeleng/email-validation-v2' into haoyang/email-validat…
haoyangw Oct 31, 2024
522c866
fix(password-reset): stop requiring auth
seelengxd Oct 31, 2024
231d3d9
feat: add /verify-email endpoint
seelengxd Oct 31, 2024
425db62
feat: add endpoint for resend verification
seelengxd Oct 31, 2024
330307f
feat: add unverified tier
seelengxd Oct 31, 2024
3ecffb2
feat(essay): add columns for rate limit
seelengxd Oct 31, 2024
dddb058
Improve redirect post-login
haoyangw Oct 31, 2024
06b81fb
fix: rate limit essays
seelengxd Oct 31, 2024
1c903cb
Merge branch 'seeleng/email-validation-v2' into haoyang/email-validat…
haoyangw Oct 31, 2024
8ecc937
fix: hacky alembic fix
seelengxd Oct 31, 2024
6ea8e6b
Improve verify email page
haoyangw Oct 31, 2024
a1aad74
Merge branch 'seeleng/email-validation-v2' into haoyang/email-validat…
haoyangw Oct 31, 2024
3b1dbb9
Add new UnverifiedAlert component
haoyangw Oct 31, 2024
aaaf60b
Revert "fix: hacky alembic fix"
seelengxd Oct 31, 2024
41bc153
Display new UnverifiedAlert on navbar
haoyangw Oct 31, 2024
a325cbd
Merge branch 'seeleng/email-validation-v2' into haoyang/email-validat…
haoyangw Oct 31, 2024
baf15b5
Add verify status validation
haoyangw Oct 31, 2024
4102cbc
Format frontend with eslint
haoyangw Oct 31, 2024
4e81b4c
Update client openapi ts
haoyangw Oct 31, 2024
e28668a
Remove unused imports
haoyangw Oct 31, 2024
12db7bc
Improve email verification backend
haoyangw Oct 31, 2024
77eddbb
Implement email verification logic
haoyangw Oct 31, 2024
b9a5f6e
Improve email verification check
haoyangw Oct 31, 2024
6b2225b
Add new query function
haoyangw Oct 31, 2024
e24d51a
Implement backend validation check
haoyangw Oct 31, 2024
36c871e
Implement already verified check on frontend
haoyangw Oct 31, 2024
b23f16e
Improve email verification redirect
haoyangw Oct 31, 2024
3fb9cf0
Add more validation checks on backend
haoyangw Oct 31, 2024
f3c0621
Add validation checks to verify email frontend
haoyangw Oct 31, 2024
47f528e
More validation checks on verify email page
haoyangw Oct 31, 2024
291daba
Style the unverified alert better
haoyangw Oct 31, 2024
32c902b
Improve UnverifiedAlert
haoyangw Oct 31, 2024
b661f52
Improve UnverifiedAlert overlay
haoyangw Oct 31, 2024
1473984
Add more variables/functions to types/billing
haoyangw Oct 31, 2024
fbc3a34
Add new SubscriptionCard component
haoyangw Oct 31, 2024
16ed110
Replace 'Your Tier' section
haoyangw Oct 31, 2024
ae86177
Limit max width of SubscriptionCard
haoyangw Oct 31, 2024
1aea79e
Add TODO comment
haoyangw Oct 31, 2024
95e91f9
Refactor code in SubscriptionCard
haoyangw Oct 31, 2024
76a0f9a
Improve element alignment
haoyangw Oct 31, 2024
9a8d299
Improve element alignment again
haoyangw Oct 31, 2024
3ff0e0a
Add helper function to frontend
haoyangw Oct 31, 2024
ac30fd5
Significantly refactor SubscriptionCard
haoyangw Oct 31, 2024
4f3eb65
Update billing page
haoyangw Oct 31, 2024
b79fae6
Merge branch 'main' into seeleng/email-validation-v2
haoyangw Oct 31, 2024
7b3d003
Augment SubscriptionCard component
haoyangw Oct 31, 2024
f50f7e0
Switch billing page to SubscriptionCard competely
haoyangw Oct 31, 2024
cfc9ca9
Remove hardcoded date from frontend
haoyangw Oct 31, 2024
cba4a78
Refactor component on ask page
haoyangw Oct 31, 2024
11867aa
Implement user unverified alert (1/2)
haoyangw Oct 31, 2024
6103520
Add new billing type const
haoyangw Oct 31, 2024
50e892c
Implement user unverified alert (2/2)
haoyangw Oct 31, 2024
471445f
Improve alignment on feedback page
haoyangw Oct 31, 2024
c6210e3
Remove red background
haoyangw Oct 31, 2024
aaf8b20
Remove redefined backend endpoint
haoyangw Oct 31, 2024
cf30953
Format frontend with eslint
haoyangw Oct 31, 2024
d46c859
Fix compile errors after linting
haoyangw Oct 31, 2024
2980d38
Fix more eslint errors
haoyangw Oct 31, 2024
4bad1c3
Fix more eslint errors
haoyangw Oct 31, 2024
67e6963
Fix even more eslint errors
haoyangw Oct 31, 2024
f5dec21
Fix some more eslint errors
haoyangw Oct 31, 2024
5f489a0
Fix some more eslint errors
haoyangw Oct 31, 2024
1839e9d
Fix some more eslint errors
haoyangw Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new query function
-Add query helper function for completing email verification
haoyangw committed Oct 31, 2024
commit 6b2225b390d3bd78b1f1d82430e0d2af8e7a7a23
16 changes: 16 additions & 0 deletions frontend/queries/user.ts
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ import {

import {
changePasswordAuthChangePasswordPut,
completeEmailVerificationAuthEmailVerificationPut,
getUserAuthSessionGet,
updateProfileProfilePut,
} from "@/client/services.gen";
@@ -75,3 +76,18 @@ export const useChangePassword = () => {
},
});
};

export const useCompleteEmailVerification = () => {
return useMutation({
mutationFn: ({code}: {code: string}) => {
return completeEmailVerificationAuthEmailVerificationPut({
query: {
code
},
});
},
onError: (error) => {
console.error("Error completing email verification: ", error);
}
});
}