Skip to content

Commit 9b84356

Browse files
authored
Merge pull request #44 from teacoder-team/dev
Dev
2 parents 7736543 + 9465ba6 commit 9b84356

20 files changed

Lines changed: 269 additions & 113 deletions

bun.lockb

1.29 KB
Binary file not shown.

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const config: NextConfig = {
2424
API_URL: process.env['API_URL'],
2525
STORAGE_URL: process.env['STORAGE_URL'],
2626
TURNSTILE_SITE_KEY: process.env['TURNSTILE_SITE_KEY'],
27+
FPJS_API_KEY: process.env['FPJS_API_KEY'],
2728
YANDEX_METRIKA_ID: process.env['YANDEX_METRIKA_ID'],
2829
GOOGLE_ANALYTICS_ID: process.env['GOOGLE_ANALYTICS_ID']
2930
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"generate": "orval --config ./orval.config.ts"
1818
},
1919
"dependencies": {
20+
"@fingerprintjs/fingerprintjs-pro-react": "^2.7.1",
2021
"@hookform/resolvers": "^3.10.0",
2122
"@kinescope/react-kinescope-player": "^0.5.3",
2223
"@next/third-parties": "15.2.4",

src/api/generated/createUserRequest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ export interface CreateUserRequest {
1919
password: string;
2020
/** Captcha verification code */
2121
captcha: string;
22+
/** Fingerprint visitor ID */
23+
visitorId?: string;
24+
/** Fingerprint request ID */
25+
requestId?: string;
2226
}

src/api/generated/index.ts

Lines changed: 66 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,67 +6,69 @@
66
* OpenAPI spec version: 1.0.0
77
*/
88

9-
export * from './accountResponse';
10-
export * from './activeRestrictionResponse';
11-
export * from './changeEmailRequest';
12-
export * from './changePasswordRequest';
13-
export * from './courseResponse';
14-
export * from './coursesResponse';
15-
export * from './createCourseRequest';
16-
export * from './createCourseResponse';
17-
export * from './createLessonRequest';
18-
export * from './createLessonResponse';
19-
export * from './createProgressRequest';
20-
export * from './createProgressResponse';
21-
export * from './createRestrictionRequest';
22-
export * from './createRestrictionRequestReason';
23-
export * from './createUserRequest';
24-
export * from './createUserResponse';
25-
export * from './generateDownloadLinkResponse';
26-
export * from './heleketPaymentConvertResponse';
27-
export * from './heleketPaymentConvertResponseCommission';
28-
export * from './heleketPaymentWebhookResponse';
29-
export * from './heleketPaymentWebhookResponseAdditionalData';
30-
export * from './heleketPaymentWebhookResponseFrom';
31-
export * from './heleketPaymentWebhookResponseMerchantAmount';
32-
export * from './heleketPaymentWebhookResponsePaymentAmount';
33-
export * from './heleketPaymentWebhookResponseStatus';
34-
export * from './heleketPaymentWebhookResponseTransferId';
35-
export * from './heleketPaymentWebhookResponseTxid';
36-
export * from './heleketPaymentWebhookResponseType';
37-
export * from './heleketPaymentWebhookResponseWalletAddressUuid';
38-
export * from './initPaymentRequest';
39-
export * from './initPaymentRequestMethod';
40-
export * from './initPaymentResponse';
41-
export * from './lastLessonResponse';
42-
export * from './leaderResponse';
43-
export * from './lessonResponse';
44-
export * from './loginMfaResponse';
45-
export * from './loginRequest';
46-
export * from './loginSessionResponse';
47-
export * from './meProgressResponse';
48-
export * from './meProgressResponseLastLesson';
49-
export * from './meStatisticsResponse';
50-
export * from './mfaControllerVerifyBody';
51-
export * from './mfaStatusResponse';
52-
export * from './passkeyResponse';
53-
export * from './passwordResetRequest';
54-
export * from './patchUserRequest';
55-
export * from './paymentMethodResponse';
56-
export * from './paymentMethodResponseId';
57-
export * from './progressResponse';
58-
export * from './registrationsResponse';
59-
export * from './sendPasswordResetRequest';
60-
export * from './sessionControllerLogin200';
61-
export * from './sessionControllerLoginAdmin200';
62-
export * from './sessionResponse';
63-
export * from './ssoConnectResponse';
64-
export * from './ssoControllerCallbackParams';
65-
export * from './ssoStatusResponse';
66-
export * from './statisticsResponse';
67-
export * from './telegramAuthRequest';
68-
export * from './telegramAuthResponse';
69-
export * from './totpDisableRequest';
70-
export * from './totpEnableRequest';
71-
export * from './totpGenerateSecretResponse';
72-
export * from './userResponse';
9+
export * from './accountResponse'
10+
export * from './activeRestrictionResponse'
11+
export * from './changeEmailRequest'
12+
export * from './changePasswordRequest'
13+
export * from './courseResponse'
14+
export * from './coursesResponse'
15+
export * from './createCourseRequest'
16+
export * from './createCourseResponse'
17+
export * from './createLessonRequest'
18+
export * from './createLessonResponse'
19+
export * from './createProgressRequest'
20+
export * from './createProgressResponse'
21+
export * from './createRestrictionRequest'
22+
export * from './createRestrictionRequestReason'
23+
export * from './createUserRequest'
24+
export * from './createUserResponse'
25+
export * from './generateDownloadLinkResponse'
26+
export * from './heleketPaymentConvertResponse'
27+
export * from './heleketPaymentConvertResponseCommission'
28+
export * from './heleketPaymentWebhookResponse'
29+
export * from './heleketPaymentWebhookResponseAdditionalData'
30+
export * from './heleketPaymentWebhookResponseFrom'
31+
export * from './heleketPaymentWebhookResponseMerchantAmount'
32+
export * from './heleketPaymentWebhookResponsePaymentAmount'
33+
export * from './heleketPaymentWebhookResponseStatus'
34+
export * from './heleketPaymentWebhookResponseTransferId'
35+
export * from './heleketPaymentWebhookResponseTxid'
36+
export * from './heleketPaymentWebhookResponseType'
37+
export * from './heleketPaymentWebhookResponseWalletAddressUuid'
38+
export * from './initPaymentRequest'
39+
export * from './initPaymentRequestMethod'
40+
export * from './initPaymentResponse'
41+
export * from './lastLessonResponse'
42+
export * from './leaderResponse'
43+
export * from './lessonResponse'
44+
export * from './loginMfaResponse'
45+
export * from './loginRequest'
46+
export * from './loginSessionResponse'
47+
export * from './meProgressResponse'
48+
export * from './meProgressResponseLastLesson'
49+
export * from './meStatisticsResponse'
50+
export * from './mfaControllerVerifyBody'
51+
export * from './mfaStatusResponse'
52+
export * from './passkeyResponse'
53+
export * from './passwordResetRequest'
54+
export * from './patchUserRequest'
55+
export * from './paymentMethodResponse'
56+
export * from './paymentMethodResponseId'
57+
export * from './progressResponse'
58+
export * from './registrationsResponse'
59+
export * from './sendPasswordResetRequest'
60+
export * from './sessionControllerLogin200'
61+
export * from './sessionControllerLoginAdmin200'
62+
export * from './sessionResponse'
63+
export * from './ssoConnectResponse'
64+
export * from './ssoControllerCallbackParams'
65+
export * from './ssoLoginRequest'
66+
export * from './ssoLoginResponse'
67+
export * from './ssoStatusResponse'
68+
export * from './statisticsResponse'
69+
export * from './telegramAuthRequest'
70+
export * from './telegramAuthResponse'
71+
export * from './totpDisableRequest'
72+
export * from './totpEnableRequest'
73+
export * from './totpGenerateSecretResponse'
74+
export * from './userResponse'

src/api/generated/loginRequest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ export interface LoginRequest {
1717
password: string;
1818
/** Captcha verification code */
1919
captcha: string;
20+
/** Fingerprint visitor ID */
21+
visitorId?: string;
22+
/** Fingerprint request ID */
23+
requestId?: string;
2024
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Generated by orval v7.4.1 🍺
3+
* Do not edit manually.
4+
* TeaCoder API
5+
* API for Teacoder educational platform
6+
* OpenAPI spec version: 1.0.0
7+
*/
8+
9+
export interface SsoLoginRequest {
10+
/** Visitor fingerprint ID */
11+
visitorId: string;
12+
/** Request ID for fingerprint tracking */
13+
requestId: string;
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Generated by orval v7.4.1 🍺
3+
* Do not edit manually.
4+
* TeaCoder API
5+
* API for Teacoder educational platform
6+
* OpenAPI spec version: 1.0.0
7+
*/
8+
9+
export interface SsoLoginResponse {
10+
/** The URL for authorization via the external provider (e.g., Google, GitHub) */
11+
url: string;
12+
}

src/api/generated/telegramAuthRequest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ export interface TelegramAuthRequest {
2121
auth_date: number;
2222
/** Hash for validating the data integrity */
2323
hash: string;
24+
/** Visitor fingerprint ID */
25+
visitorId: string;
26+
/** Request ID for fingerprint tracking */
27+
requestId: string;
2428
}

src/api/requests/sso.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type {
22
SsoConnectResponse,
3+
SsoLoginRequest,
34
SsoStatusResponse,
45
TelegramAuthRequest,
56
TelegramAuthResponse
@@ -14,9 +15,9 @@ export const fetchSsoStatus = async () =>
1415
export const getAvailableSsoProviders = async () =>
1516
await api.get<string[]>('/auth/sso/available').then(res => res.data)
1617

17-
export const getAuthUrl = async (provider: string) =>
18+
export const getAuthUrl = async (provider: string, data: SsoLoginRequest) =>
1819
await instance
19-
.post<SsoConnectResponse>(`/auth/sso/login/${provider}`)
20+
.post<SsoConnectResponse>(`/auth/sso/login/${provider}`, data)
2021
.then(response => response.data)
2122

2223
export const getConnectUrl = async (provider: string) =>

0 commit comments

Comments
 (0)