dn-react-router-toolkit 0.1.12 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/apple_auth.d.mts +38 -0
- package/dist/auth/apple_auth.d.ts +38 -0
- package/dist/{auth-kit → auth}/apple_auth.js +31 -18
- package/dist/auth/apple_auth.mjs +63 -0
- package/dist/{auth-kit/repository.d.mts → auth/auth_repository.d.mts} +6 -9
- package/dist/{auth-kit/repository.d.ts → auth/auth_repository.d.ts} +6 -9
- package/dist/{file-kit/repository.js → auth/auth_repository.js} +3 -3
- package/dist/{auth-kit → auth}/auth_service.d.mts +11 -22
- package/dist/{auth-kit → auth}/auth_service.d.ts +11 -22
- package/dist/{auth-kit → auth}/auth_service.js +23 -76
- package/dist/{auth-kit → auth}/auth_service.mjs +23 -76
- package/dist/auth/client/google_login_button.d.mts +7 -0
- package/dist/auth/client/google_login_button.d.ts +7 -0
- package/dist/{auth-kit → auth}/client/google_login_button.js +24 -19
- package/dist/auth/client/google_login_button.mjs +37 -0
- package/dist/auth/client/provider.d.mts +23 -0
- package/dist/auth/client/provider.d.ts +23 -0
- package/dist/auth/client/provider.js +137 -0
- package/dist/auth/client/provider.mjs +101 -0
- package/dist/{auth-kit → auth}/client/redirect_page.js +1 -1
- package/dist/{auth-kit → auth}/client/redirect_page.mjs +1 -1
- package/dist/auth/google_auth.d.mts +33 -0
- package/dist/auth/google_auth.d.ts +33 -0
- package/dist/{auth-kit → auth}/google_auth.js +23 -32
- package/dist/{auth-kit → auth}/google_auth.mjs +22 -31
- package/dist/auth/handlers/find_auth.d.mts +13 -0
- package/dist/auth/handlers/find_auth.d.ts +13 -0
- package/dist/{route/api/auth/route.js → auth/handlers/find_auth.js} +10 -10
- package/dist/{route/api/auth/route.mjs → auth/handlers/find_auth.mjs} +5 -5
- package/dist/auth/handlers/login.d.mts +13 -0
- package/dist/auth/handlers/login.d.ts +13 -0
- package/dist/{route/api/auth/login/route.js → auth/handlers/login.js} +17 -17
- package/dist/{route/api/auth/login/route.mjs → auth/handlers/login.mjs} +12 -12
- package/dist/auth/handlers/login_with_thirdparty.d.mts +15 -0
- package/dist/auth/handlers/login_with_thirdparty.d.ts +15 -0
- package/dist/{route/api/auth/login/[provider]/route.js → auth/handlers/login_with_thirdparty.js} +12 -27
- package/dist/{route/api/auth/login/[provider]/route.mjs → auth/handlers/login_with_thirdparty.mjs} +7 -22
- package/dist/auth/handlers/logout.d.mts +13 -0
- package/dist/auth/handlers/logout.d.ts +13 -0
- package/dist/{route/api/auth/logout/route.js → auth/handlers/logout.js} +15 -11
- package/dist/{route/api/auth/logout/route.mjs → auth/handlers/logout.mjs} +11 -7
- package/dist/auth/handlers/refresh.d.mts +13 -0
- package/dist/auth/handlers/refresh.d.ts +13 -0
- package/dist/{route/api/auth/refresh/route.js → auth/handlers/refresh.js} +12 -12
- package/dist/{route/api/auth/refresh/route.mjs → auth/handlers/refresh.mjs} +7 -7
- package/dist/auth/handlers/signup.d.mts +15 -0
- package/dist/auth/handlers/signup.d.ts +15 -0
- package/dist/auth/handlers/signup.js +135 -0
- package/dist/auth/handlers/signup.mjs +100 -0
- package/dist/auth/handlers/signup_with_thirdparty.d.mts +17 -0
- package/dist/auth/handlers/signup_with_thirdparty.d.ts +17 -0
- package/dist/auth/handlers/signup_with_thirdparty.js +123 -0
- package/dist/auth/handlers/signup_with_thirdparty.mjs +98 -0
- package/dist/auth/handlers/thirdparty_auth_callback.d.mts +16 -0
- package/dist/auth/handlers/thirdparty_auth_callback.d.ts +16 -0
- package/dist/{route/auth/callback/[provider]/route.js → auth/handlers/thirdparty_auth_callback.js} +54 -45
- package/dist/{route/auth/callback/[provider]/route.mjs → auth/handlers/thirdparty_auth_callback.mjs} +49 -40
- package/dist/{auth-kit/jwt.d.mts → auth/jwt_manager.d.mts} +11 -1
- package/dist/{auth-kit/jwt.d.ts → auth/jwt_manager.d.ts} +11 -1
- package/dist/{auth-kit/jwt.js → auth/jwt_manager.js} +25 -11
- package/dist/{auth-kit/jwt.mjs → auth/jwt_manager.mjs} +22 -8
- package/dist/auth/kakao_auth.d.mts +27 -0
- package/dist/auth/kakao_auth.d.ts +27 -0
- package/dist/auth/kakao_auth.js +56 -0
- package/dist/auth/kakao_auth.mjs +31 -0
- package/dist/auth/thirdparty_auth.d.mts +41 -0
- package/dist/auth/thirdparty_auth.d.ts +41 -0
- package/dist/{auth-kit/kakao_auth.js → auth/thirdparty_auth.js} +31 -33
- package/dist/{auth-kit/kakao_auth.mjs → auth/thirdparty_auth.mjs} +26 -28
- package/dist/{auth-kit → auth}/with_auth.d.mts +5 -6
- package/dist/{auth-kit → auth}/with_auth.d.ts +5 -6
- package/dist/{auth-kit → auth}/with_auth.js +26 -10
- package/dist/auth/with_auth.mjs +63 -0
- package/dist/date.d.mts +2 -0
- package/dist/date.d.ts +2 -0
- package/dist/date.js +4 -2
- package/dist/date.mjs +2 -1
- package/dist/{file-kit → file}/cdn.js +1 -1
- package/dist/{file-kit → file}/cdn.mjs +1 -1
- package/dist/{file-kit → file}/client/drop_file_input.js +3 -3
- package/dist/{file-kit → file}/client/drop_file_input.mjs +3 -3
- package/dist/{file-kit → file}/client/file_upload_button.js +1 -1
- package/dist/{file-kit → file}/client/file_upload_button.mjs +1 -1
- package/dist/{file-kit → file}/client/file_uploader.js +3 -3
- package/dist/{file-kit → file}/client/file_uploader.mjs +2 -2
- package/dist/{file-kit → file}/client/format_size.js +1 -1
- package/dist/{file-kit → file}/client/format_size.mjs +1 -1
- package/dist/{file-kit → file}/client/metadata.js +1 -1
- package/dist/{file-kit → file}/client/metadata.mjs +1 -1
- package/dist/{file-kit/repository.d.mts → file/file_repository.d.mts} +4 -4
- package/dist/{file-kit/repository.d.ts → file/file_repository.d.ts} +4 -4
- package/dist/{auth-kit/repository.js → file/file_repository.js} +3 -3
- package/dist/file/file_service.d.mts +32 -0
- package/dist/file/file_service.d.ts +32 -0
- package/dist/{file-kit → file}/file_service.js +27 -21
- package/dist/file/file_service.mjs +41 -0
- package/dist/file/handlers/delete_file.d.mts +17 -0
- package/dist/file/handlers/delete_file.d.ts +17 -0
- package/dist/{route/api/files/[fileId]/route.js → file/handlers/delete_file.js} +15 -15
- package/dist/{route/api/files/[fileId]/route.mjs → file/handlers/delete_file.mjs} +10 -10
- package/dist/file/handlers/upload_file.d.mts +16 -0
- package/dist/file/handlers/upload_file.d.ts +16 -0
- package/dist/{route/api/files/route.js → file/handlers/upload_file.js} +13 -13
- package/dist/{route/api/files/route.mjs → file/handlers/upload_file.mjs} +8 -8
- package/dist/{file-kit → file}/object_storage.d.mts +3 -1
- package/dist/{file-kit → file}/object_storage.d.ts +3 -1
- package/dist/{file-kit → file}/object_storage.js +2 -2
- package/dist/{file-kit → file}/object_storage.mjs +2 -2
- package/dist/{file-kit → file}/responsive_image.d.mts +4 -4
- package/dist/{file-kit → file}/responsive_image.d.ts +4 -4
- package/dist/{file-kit → file}/responsive_image.js +18 -9
- package/dist/{file-kit → file}/responsive_image.mjs +18 -9
- package/dist/{http-kit → http}/index.js +5 -5
- package/dist/{http-kit → http}/index.mjs +1 -1
- package/dist/{http-kit → http}/response.js +1 -1
- package/dist/{http-kit → http}/response.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/dist/route/api.d.mts +15 -25
- package/dist/route/api.d.ts +15 -25
- package/dist/route/api.js +325 -178
- package/dist/route/api.mjs +314 -177
- package/dist/{seo-kit → seo}/seo.js +1 -1
- package/dist/{seo-kit → seo}/seo.mjs +1 -1
- package/package.json +74 -74
- package/dist/auth-kit/apple_auth.d.mts +0 -24
- package/dist/auth-kit/apple_auth.d.ts +0 -24
- package/dist/auth-kit/apple_auth.mjs +0 -50
- package/dist/auth-kit/client/google_login_button.d.mts +0 -9
- package/dist/auth-kit/client/google_login_button.d.ts +0 -9
- package/dist/auth-kit/client/google_login_button.mjs +0 -32
- package/dist/auth-kit/client/logout.d.mts +0 -3
- package/dist/auth-kit/client/logout.d.ts +0 -3
- package/dist/auth-kit/client/logout.js +0 -49
- package/dist/auth-kit/client/logout.mjs +0 -24
- package/dist/auth-kit/google_auth.d.mts +0 -27
- package/dist/auth-kit/google_auth.d.ts +0 -27
- package/dist/auth-kit/kakao_auth.d.mts +0 -24
- package/dist/auth-kit/kakao_auth.d.ts +0 -24
- package/dist/auth-kit/with_auth.mjs +0 -47
- package/dist/file-kit/file_service.d.mts +0 -26
- package/dist/file-kit/file_service.d.ts +0 -26
- package/dist/file-kit/file_service.mjs +0 -35
- package/dist/route/api/auth/login/_provider_/route.d.mts +0 -20
- package/dist/route/api/auth/login/_provider_/route.d.ts +0 -20
- package/dist/route/api/auth/login/route.d.mts +0 -14
- package/dist/route/api/auth/login/route.d.ts +0 -14
- package/dist/route/api/auth/logout/route.d.mts +0 -14
- package/dist/route/api/auth/logout/route.d.ts +0 -14
- package/dist/route/api/auth/refresh/route.d.mts +0 -13
- package/dist/route/api/auth/refresh/route.d.ts +0 -13
- package/dist/route/api/auth/route.d.mts +0 -13
- package/dist/route/api/auth/route.d.ts +0 -13
- package/dist/route/api/files/_fileId_/route.d.mts +0 -17
- package/dist/route/api/files/_fileId_/route.d.ts +0 -17
- package/dist/route/api/files/route.d.mts +0 -16
- package/dist/route/api/files/route.d.ts +0 -16
- package/dist/route/auth/callback/_provider_/route.d.mts +0 -20
- package/dist/route/auth/callback/_provider_/route.d.ts +0 -20
- /package/dist/{auth-kit/repository.mjs → auth/auth_repository.mjs} +0 -0
- /package/dist/{auth-kit → auth}/client/redirect_page.d.mts +0 -0
- /package/dist/{auth-kit → auth}/client/redirect_page.d.ts +0 -0
- /package/dist/{file-kit → file}/cdn.d.mts +0 -0
- /package/dist/{file-kit → file}/cdn.d.ts +0 -0
- /package/dist/{file-kit → file}/client/drop_file_input.d.mts +0 -0
- /package/dist/{file-kit → file}/client/drop_file_input.d.ts +0 -0
- /package/dist/{file-kit → file}/client/file_upload_button.d.mts +0 -0
- /package/dist/{file-kit → file}/client/file_upload_button.d.ts +0 -0
- /package/dist/{file-kit → file}/client/file_uploader.d.mts +0 -0
- /package/dist/{file-kit → file}/client/file_uploader.d.ts +0 -0
- /package/dist/{file-kit → file}/client/format_size.d.mts +0 -0
- /package/dist/{file-kit → file}/client/format_size.d.ts +0 -0
- /package/dist/{file-kit → file}/client/metadata.d.mts +0 -0
- /package/dist/{file-kit → file}/client/metadata.d.ts +0 -0
- /package/dist/{file-kit/repository.mjs → file/file_repository.mjs} +0 -0
- /package/dist/{http-kit → http}/index.d.mts +0 -0
- /package/dist/{http-kit → http}/index.d.ts +0 -0
- /package/dist/{http-kit → http}/response.d.mts +0 -0
- /package/dist/{http-kit → http}/response.d.ts +0 -0
- /package/dist/{seo-kit → seo}/seo.d.mts +0 -0
- /package/dist/{seo-kit → seo}/seo.d.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// src/auth
|
|
1
|
+
// src/auth/auth_service.ts
|
|
2
2
|
import bcryptjs from "bcryptjs";
|
|
3
|
-
import { v4 } from "uuid";
|
|
4
3
|
import { createCookie } from "react-router";
|
|
5
4
|
var ACCESS_TOKEN_KEY = "access_token";
|
|
6
5
|
var REFRESH_TOKEN_KEY = "refresh_token";
|
|
@@ -17,22 +16,22 @@ var REFRESH_TOKEN_COOKIE = createCookie(REFRESH_TOKEN_KEY, {
|
|
|
17
16
|
sameSite: "strict"
|
|
18
17
|
});
|
|
19
18
|
var AuthService = class {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
authRepository;
|
|
20
|
+
jwtManager;
|
|
21
|
+
objectStorage;
|
|
23
22
|
constructor({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
authRepository,
|
|
24
|
+
jwtManager,
|
|
25
|
+
objectStorage
|
|
27
26
|
}) {
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
27
|
+
this.authRepository = authRepository;
|
|
28
|
+
this.jwtManager = jwtManager;
|
|
29
|
+
this.objectStorage = objectStorage;
|
|
31
30
|
}
|
|
32
31
|
async verify(request) {
|
|
33
32
|
const accessToken = await this.getAccessTokenFromRequest(request);
|
|
34
33
|
if (accessToken) {
|
|
35
|
-
return this.
|
|
34
|
+
return this.jwtManager.verifyAccessToken(accessToken);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
async verifyOrRefresh(request) {
|
|
@@ -68,7 +67,7 @@ var AuthService = class {
|
|
|
68
67
|
refreshToken
|
|
69
68
|
);
|
|
70
69
|
await this.getAccessTokenSetCookie(refreshedAccessToken);
|
|
71
|
-
const payload = this.
|
|
70
|
+
const payload = this.jwtManager.decode(refreshedAccessToken);
|
|
72
71
|
if (payload) {
|
|
73
72
|
return payload;
|
|
74
73
|
}
|
|
@@ -81,14 +80,14 @@ var AuthService = class {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
async signIn({ id, password }) {
|
|
84
|
-
const credential = await this.
|
|
83
|
+
const credential = await this.authRepository.findCredentialById(id);
|
|
85
84
|
if (!credential) {
|
|
86
85
|
throw Error("\uC544\uC774\uB514 \uB610\uB294 \uBE44\uBC00\uBC88\uD638\uAC00 \uD2C0\uB838\uC2B5\uB2C8\uB2E4.");
|
|
87
86
|
}
|
|
88
87
|
if (!await bcryptjs.compare(password, credential.password)) {
|
|
89
88
|
throw Error("\uC544\uC774\uB514 \uB610\uB294 \uBE44\uBC00\uBC88\uD638\uAC00 \uD2C0\uB838\uC2B5\uB2C8\uB2E4.");
|
|
90
89
|
}
|
|
91
|
-
const user = await this.
|
|
90
|
+
const user = await this.authRepository.findUserById(credential.userId);
|
|
92
91
|
if (!user) {
|
|
93
92
|
throw Error("\uD68C\uC6D0 \uC815\uBCF4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
|
|
94
93
|
}
|
|
@@ -99,19 +98,19 @@ var AuthService = class {
|
|
|
99
98
|
};
|
|
100
99
|
}
|
|
101
100
|
async issueAccessToken(user) {
|
|
102
|
-
return this.
|
|
101
|
+
return this.jwtManager.signAccessToken({
|
|
103
102
|
userId: user.id,
|
|
104
103
|
role: user.role,
|
|
105
104
|
name: user.name
|
|
106
105
|
});
|
|
107
106
|
}
|
|
108
107
|
async issueTokenPair(user) {
|
|
109
|
-
const refreshToken = await this.
|
|
108
|
+
const refreshToken = await this.jwtManager.signRefreshToken({
|
|
110
109
|
userId: user.id,
|
|
111
110
|
role: user.role,
|
|
112
111
|
name: user.name
|
|
113
112
|
});
|
|
114
|
-
await this.
|
|
113
|
+
await this.authRepository.updateUserRefreshToken(
|
|
115
114
|
user.id,
|
|
116
115
|
await bcryptjs.hash(refreshToken, 10)
|
|
117
116
|
);
|
|
@@ -119,7 +118,7 @@ var AuthService = class {
|
|
|
119
118
|
return { refreshToken, accessToken };
|
|
120
119
|
}
|
|
121
120
|
async refreshAccessToken(refreshToken) {
|
|
122
|
-
const payload = await this.
|
|
121
|
+
const payload = await this.jwtManager.verifyRefreshToken(refreshToken);
|
|
123
122
|
if (!payload) {
|
|
124
123
|
throw new Error("\uD1A0\uD070\uC774 \uC720\uD6A8\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
|
|
125
124
|
}
|
|
@@ -127,7 +126,7 @@ var AuthService = class {
|
|
|
127
126
|
if (typeof userId !== "string") {
|
|
128
127
|
throw new Error("\uD1A0\uD070\uC774 \uC704\uC870\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");
|
|
129
128
|
}
|
|
130
|
-
const user = await this.
|
|
129
|
+
const user = await this.authRepository.findUserById(userId);
|
|
131
130
|
if (!user) {
|
|
132
131
|
throw Error("\uC774\uC6A9\uC790\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");
|
|
133
132
|
}
|
|
@@ -142,78 +141,26 @@ var AuthService = class {
|
|
|
142
141
|
}
|
|
143
142
|
async getAccessTokenSetCookie(accessToken) {
|
|
144
143
|
return ACCESS_TOKEN_COOKIE.serialize(accessToken, {
|
|
145
|
-
expires: accessToken ? this.
|
|
144
|
+
expires: accessToken ? this.jwtManager.getExpirationTime(accessToken) : /* @__PURE__ */ new Date(0)
|
|
146
145
|
});
|
|
147
146
|
}
|
|
148
147
|
async getRefreshTokenSetCookie(refreshToken) {
|
|
149
148
|
return REFRESH_TOKEN_COOKIE.serialize(refreshToken, {
|
|
150
|
-
expires: refreshToken ? this.
|
|
149
|
+
expires: refreshToken ? this.jwtManager.getExpirationTime(refreshToken) : /* @__PURE__ */ new Date(0)
|
|
151
150
|
});
|
|
152
151
|
}
|
|
153
152
|
async findUser(provider, info) {
|
|
154
|
-
const thirdPartyAuth = await this.
|
|
153
|
+
const thirdPartyAuth = await this.authRepository.findThirdPartyAuth(
|
|
155
154
|
provider,
|
|
156
155
|
info.id
|
|
157
156
|
);
|
|
158
157
|
if (thirdPartyAuth) {
|
|
159
|
-
const user = await this.
|
|
158
|
+
const user = await this.authRepository.findUserById(thirdPartyAuth.userId);
|
|
160
159
|
if (user) {
|
|
161
160
|
return user;
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
|
-
async getOrCreateUser(provider, info) {
|
|
166
|
-
const thirdPartyAuth = await this.repository.findThirdPartyAuth(
|
|
167
|
-
provider,
|
|
168
|
-
info.id
|
|
169
|
-
);
|
|
170
|
-
if (thirdPartyAuth) {
|
|
171
|
-
const user = await this.repository.findUserById(thirdPartyAuth.userId);
|
|
172
|
-
if (user) {
|
|
173
|
-
return user;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
const userId = v4();
|
|
177
|
-
const email = info.email;
|
|
178
|
-
const name = info.name || "\uC775\uBA85";
|
|
179
|
-
const picture = info.picture;
|
|
180
|
-
const profileImageId = await this.savePicture(picture) || null;
|
|
181
|
-
const result = await this.repository.createUser({
|
|
182
|
-
id: userId,
|
|
183
|
-
role: "user",
|
|
184
|
-
profileImageId,
|
|
185
|
-
name,
|
|
186
|
-
email
|
|
187
|
-
});
|
|
188
|
-
await this.repository.createThirdPartyAuth({
|
|
189
|
-
id: info.id,
|
|
190
|
-
provider,
|
|
191
|
-
userId
|
|
192
|
-
});
|
|
193
|
-
return result;
|
|
194
|
-
}
|
|
195
|
-
async savePicture(picture) {
|
|
196
|
-
if (!picture) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
const res = await fetch(picture);
|
|
200
|
-
if (!res.ok) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const buffer = await res.arrayBuffer();
|
|
204
|
-
const id = v4();
|
|
205
|
-
const key = `/users/${id}/picture`;
|
|
206
|
-
await this.OBJECT_STORAGE.put(key, Buffer.from(buffer));
|
|
207
|
-
await this.repository.createFile({
|
|
208
|
-
id,
|
|
209
|
-
name: "picture",
|
|
210
|
-
type: "image/*",
|
|
211
|
-
key,
|
|
212
|
-
size: buffer.byteLength,
|
|
213
|
-
metadata: {}
|
|
214
|
-
});
|
|
215
|
-
return id;
|
|
216
|
-
}
|
|
217
164
|
};
|
|
218
165
|
export {
|
|
219
166
|
ACCESS_TOKEN_COOKIE,
|
|
@@ -27,38 +27,43 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/auth
|
|
30
|
+
// src/auth/client/google_login_button.tsx
|
|
31
31
|
var google_login_button_exports = {};
|
|
32
32
|
__export(google_login_button_exports, {
|
|
33
33
|
GoogleLoginButton: () => GoogleLoginButton
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(google_login_button_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_react3 = __toESM(require("react"));
|
|
37
37
|
var import_fc = require("react-icons/fc");
|
|
38
|
+
var import_react_router2 = require("react-router");
|
|
39
|
+
|
|
40
|
+
// src/auth/client/provider.tsx
|
|
41
|
+
var import_react = __toESM(require("react"));
|
|
42
|
+
var import_react2 = require("react");
|
|
38
43
|
var import_react_router = require("react-router");
|
|
44
|
+
var AuthContext = (0, import_react2.createContext)({});
|
|
45
|
+
var useAuth = () => {
|
|
46
|
+
return (0, import_react2.useContext)(AuthContext);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/auth/client/google_login_button.tsx
|
|
39
50
|
function GoogleLoginButton({
|
|
40
|
-
className = "max-w-[300px] w-full"
|
|
41
|
-
GOOGLE_CLIENT_ID,
|
|
42
|
-
GOOGLE_REDIRECT_URI
|
|
51
|
+
className = "max-w-[300px] w-full"
|
|
43
52
|
}) {
|
|
44
|
-
const
|
|
53
|
+
const { loginWithGoogle } = useAuth();
|
|
54
|
+
const [searchParams] = (0, import_react_router2.useSearchParams)();
|
|
45
55
|
const redirectUrl = searchParams.get("redirectUrl") || "";
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const href = new URL("https://accounts.google.com/o/oauth2/v2/auth");
|
|
49
|
-
href.searchParams.append("client_id", googleClientId);
|
|
50
|
-
href.searchParams.append("redirect_uri", googleRedirectUrl);
|
|
51
|
-
href.searchParams.append("response_type", "code");
|
|
52
|
-
href.searchParams.append("scope", "email profile");
|
|
53
|
-
href.searchParams.append("state", redirectUrl);
|
|
54
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className }, /* @__PURE__ */ import_react.default.createElement(
|
|
55
|
-
"a",
|
|
56
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className }, /* @__PURE__ */ import_react3.default.createElement(
|
|
57
|
+
"button",
|
|
56
58
|
{
|
|
57
|
-
|
|
59
|
+
type: "button",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
loginWithGoogle(redirectUrl);
|
|
62
|
+
},
|
|
58
63
|
className: "relative flex items-center border border-neutral-300 px-4 py-3 no-underline hover:no-underline bg-white hover:bg-neutral-100 rounded"
|
|
59
64
|
},
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ import_react3.default.createElement(import_fc.FcGoogle, null),
|
|
66
|
+
/* @__PURE__ */ import_react3.default.createElement("p", { className: "text-[14px] text-black absolute left-0 right-0 text-center" }, "\uAD6C\uAE00\uB85C \uACC4\uC18D\uD558\uAE30")
|
|
62
67
|
));
|
|
63
68
|
}
|
|
64
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/auth/client/google_login_button.tsx
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { FcGoogle } from "react-icons/fc";
|
|
4
|
+
import { useSearchParams } from "react-router";
|
|
5
|
+
|
|
6
|
+
// src/auth/client/provider.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { createContext, useContext } from "react";
|
|
9
|
+
import { useNavigate, useRouteLoaderData } from "react-router";
|
|
10
|
+
var AuthContext = createContext({});
|
|
11
|
+
var useAuth = () => {
|
|
12
|
+
return useContext(AuthContext);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// src/auth/client/google_login_button.tsx
|
|
16
|
+
function GoogleLoginButton({
|
|
17
|
+
className = "max-w-[300px] w-full"
|
|
18
|
+
}) {
|
|
19
|
+
const { loginWithGoogle } = useAuth();
|
|
20
|
+
const [searchParams] = useSearchParams();
|
|
21
|
+
const redirectUrl = searchParams.get("redirectUrl") || "";
|
|
22
|
+
return /* @__PURE__ */ React2.createElement("div", { className }, /* @__PURE__ */ React2.createElement(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
type: "button",
|
|
26
|
+
onClick: () => {
|
|
27
|
+
loginWithGoogle(redirectUrl);
|
|
28
|
+
},
|
|
29
|
+
className: "relative flex items-center border border-neutral-300 px-4 py-3 no-underline hover:no-underline bg-white hover:bg-neutral-100 rounded"
|
|
30
|
+
},
|
|
31
|
+
/* @__PURE__ */ React2.createElement(FcGoogle, null),
|
|
32
|
+
/* @__PURE__ */ React2.createElement("p", { className: "text-[14px] text-black absolute left-0 right-0 text-center" }, "\uAD6C\uAE00\uB85C \uACC4\uC18D\uD558\uAE30")
|
|
33
|
+
));
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
GoogleLoginButton
|
|
37
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type AuthContextValue = {
|
|
4
|
+
auth?: {
|
|
5
|
+
userId: string;
|
|
6
|
+
};
|
|
7
|
+
login: (id: string, password: string) => Promise<void>;
|
|
8
|
+
loginWithGoogle: (redirectUrl?: string) => Promise<void>;
|
|
9
|
+
logout: () => Promise<void>;
|
|
10
|
+
requestResetPassword: (email: string) => Promise<boolean>;
|
|
11
|
+
resetPassword: (token: string, password: string, passwordConfirm: string) => Promise<boolean>;
|
|
12
|
+
};
|
|
13
|
+
declare const AuthContext: React.Context<AuthContextValue>;
|
|
14
|
+
declare const useAuth: () => AuthContextValue;
|
|
15
|
+
declare function AuthProvider({ children, googleAuth }: {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
googleAuth?: {
|
|
18
|
+
googleClientId: string;
|
|
19
|
+
googleRedirectUrl: string;
|
|
20
|
+
};
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { AuthContext, type AuthContextValue, AuthProvider as default, useAuth };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
type AuthContextValue = {
|
|
4
|
+
auth?: {
|
|
5
|
+
userId: string;
|
|
6
|
+
};
|
|
7
|
+
login: (id: string, password: string) => Promise<void>;
|
|
8
|
+
loginWithGoogle: (redirectUrl?: string) => Promise<void>;
|
|
9
|
+
logout: () => Promise<void>;
|
|
10
|
+
requestResetPassword: (email: string) => Promise<boolean>;
|
|
11
|
+
resetPassword: (token: string, password: string, passwordConfirm: string) => Promise<boolean>;
|
|
12
|
+
};
|
|
13
|
+
declare const AuthContext: React.Context<AuthContextValue>;
|
|
14
|
+
declare const useAuth: () => AuthContextValue;
|
|
15
|
+
declare function AuthProvider({ children, googleAuth }: {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
googleAuth?: {
|
|
18
|
+
googleClientId: string;
|
|
19
|
+
googleRedirectUrl: string;
|
|
20
|
+
};
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { AuthContext, type AuthContextValue, AuthProvider as default, useAuth };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/auth/client/provider.tsx
|
|
31
|
+
var provider_exports = {};
|
|
32
|
+
__export(provider_exports, {
|
|
33
|
+
AuthContext: () => AuthContext,
|
|
34
|
+
default: () => AuthProvider,
|
|
35
|
+
useAuth: () => useAuth
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(provider_exports);
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_react2 = require("react");
|
|
40
|
+
var import_react_router = require("react-router");
|
|
41
|
+
var AuthContext = (0, import_react2.createContext)({});
|
|
42
|
+
var useAuth = () => {
|
|
43
|
+
return (0, import_react2.useContext)(AuthContext);
|
|
44
|
+
};
|
|
45
|
+
function AuthProvider({ children, googleAuth }) {
|
|
46
|
+
const data = (0, import_react_router.useRouteLoaderData)("root");
|
|
47
|
+
const auth = data?.AUTH;
|
|
48
|
+
const navigate = (0, import_react_router.useNavigate)();
|
|
49
|
+
const login = async (id, password) => {
|
|
50
|
+
const res = await fetch("/api/auth/login", {
|
|
51
|
+
method: "POST",
|
|
52
|
+
headers: {
|
|
53
|
+
"Content-Type": "application/json"
|
|
54
|
+
},
|
|
55
|
+
body: JSON.stringify({ id, password })
|
|
56
|
+
});
|
|
57
|
+
if (res.ok) {
|
|
58
|
+
navigate("/");
|
|
59
|
+
} else {
|
|
60
|
+
const { message } = await res.json();
|
|
61
|
+
alert(message);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const loginWithGoogle = async (redirectUrl = "/") => {
|
|
65
|
+
if (!googleAuth) {
|
|
66
|
+
alert("\uAD6C\uAE00 \uB85C\uADF8\uC778 \uC124\uC815\uC774 \uB418\uC5B4\uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const { googleClientId, googleRedirectUrl } = googleAuth;
|
|
70
|
+
const href = new URL("https://accounts.google.com/o/oauth2/v2/auth");
|
|
71
|
+
href.searchParams.append("client_id", googleClientId);
|
|
72
|
+
href.searchParams.append("redirect_uri", googleRedirectUrl);
|
|
73
|
+
href.searchParams.append("response_type", "code");
|
|
74
|
+
href.searchParams.append("scope", "email profile");
|
|
75
|
+
href.searchParams.append("state", redirectUrl);
|
|
76
|
+
window.location.href = href.toString();
|
|
77
|
+
};
|
|
78
|
+
const logout = async () => {
|
|
79
|
+
const ok = confirm("\uC815\uB9D0 \uB85C\uADF8\uC544\uC6C3 \uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?");
|
|
80
|
+
if (!ok) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const res = await fetch("/api/auth/logout", {
|
|
84
|
+
method: "POST"
|
|
85
|
+
});
|
|
86
|
+
if (res.ok) {
|
|
87
|
+
navigate("/");
|
|
88
|
+
} else {
|
|
89
|
+
const { message } = await res.json();
|
|
90
|
+
alert(message);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const requestResetPassword = async (email) => {
|
|
94
|
+
const response = await fetch("/api/find-password", {
|
|
95
|
+
method: "POST",
|
|
96
|
+
headers: {
|
|
97
|
+
"Content-Type": "application/json"
|
|
98
|
+
},
|
|
99
|
+
body: JSON.stringify({ email })
|
|
100
|
+
});
|
|
101
|
+
if (!response.ok) {
|
|
102
|
+
const { message } = await response.json();
|
|
103
|
+
alert(message);
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
108
|
+
const resetPassword = async (token, password, passwordConfirm) => {
|
|
109
|
+
const response = await fetch("/api/reset-password", {
|
|
110
|
+
method: "POST",
|
|
111
|
+
headers: {
|
|
112
|
+
"Content-Type": "application/json"
|
|
113
|
+
},
|
|
114
|
+
body: JSON.stringify({ token, password, passwordConfirm })
|
|
115
|
+
});
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
const { message } = await response.json();
|
|
118
|
+
alert(message);
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
};
|
|
123
|
+
const authContextValue = {
|
|
124
|
+
auth,
|
|
125
|
+
login,
|
|
126
|
+
logout,
|
|
127
|
+
loginWithGoogle,
|
|
128
|
+
requestResetPassword,
|
|
129
|
+
resetPassword
|
|
130
|
+
};
|
|
131
|
+
return /* @__PURE__ */ import_react.default.createElement(AuthContext.Provider, { value: authContextValue }, children);
|
|
132
|
+
}
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
AuthContext,
|
|
136
|
+
useAuth
|
|
137
|
+
});
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// src/auth/client/provider.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { useNavigate, useRouteLoaderData } from "react-router";
|
|
5
|
+
var AuthContext = createContext({});
|
|
6
|
+
var useAuth = () => {
|
|
7
|
+
return useContext(AuthContext);
|
|
8
|
+
};
|
|
9
|
+
function AuthProvider({ children, googleAuth }) {
|
|
10
|
+
const data = useRouteLoaderData("root");
|
|
11
|
+
const auth = data?.AUTH;
|
|
12
|
+
const navigate = useNavigate();
|
|
13
|
+
const login = async (id, password) => {
|
|
14
|
+
const res = await fetch("/api/auth/login", {
|
|
15
|
+
method: "POST",
|
|
16
|
+
headers: {
|
|
17
|
+
"Content-Type": "application/json"
|
|
18
|
+
},
|
|
19
|
+
body: JSON.stringify({ id, password })
|
|
20
|
+
});
|
|
21
|
+
if (res.ok) {
|
|
22
|
+
navigate("/");
|
|
23
|
+
} else {
|
|
24
|
+
const { message } = await res.json();
|
|
25
|
+
alert(message);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const loginWithGoogle = async (redirectUrl = "/") => {
|
|
29
|
+
if (!googleAuth) {
|
|
30
|
+
alert("\uAD6C\uAE00 \uB85C\uADF8\uC778 \uC124\uC815\uC774 \uB418\uC5B4\uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const { googleClientId, googleRedirectUrl } = googleAuth;
|
|
34
|
+
const href = new URL("https://accounts.google.com/o/oauth2/v2/auth");
|
|
35
|
+
href.searchParams.append("client_id", googleClientId);
|
|
36
|
+
href.searchParams.append("redirect_uri", googleRedirectUrl);
|
|
37
|
+
href.searchParams.append("response_type", "code");
|
|
38
|
+
href.searchParams.append("scope", "email profile");
|
|
39
|
+
href.searchParams.append("state", redirectUrl);
|
|
40
|
+
window.location.href = href.toString();
|
|
41
|
+
};
|
|
42
|
+
const logout = async () => {
|
|
43
|
+
const ok = confirm("\uC815\uB9D0 \uB85C\uADF8\uC544\uC6C3 \uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?");
|
|
44
|
+
if (!ok) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const res = await fetch("/api/auth/logout", {
|
|
48
|
+
method: "POST"
|
|
49
|
+
});
|
|
50
|
+
if (res.ok) {
|
|
51
|
+
navigate("/");
|
|
52
|
+
} else {
|
|
53
|
+
const { message } = await res.json();
|
|
54
|
+
alert(message);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const requestResetPassword = async (email) => {
|
|
58
|
+
const response = await fetch("/api/find-password", {
|
|
59
|
+
method: "POST",
|
|
60
|
+
headers: {
|
|
61
|
+
"Content-Type": "application/json"
|
|
62
|
+
},
|
|
63
|
+
body: JSON.stringify({ email })
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) {
|
|
66
|
+
const { message } = await response.json();
|
|
67
|
+
alert(message);
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
return true;
|
|
71
|
+
};
|
|
72
|
+
const resetPassword = async (token, password, passwordConfirm) => {
|
|
73
|
+
const response = await fetch("/api/reset-password", {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: {
|
|
76
|
+
"Content-Type": "application/json"
|
|
77
|
+
},
|
|
78
|
+
body: JSON.stringify({ token, password, passwordConfirm })
|
|
79
|
+
});
|
|
80
|
+
if (!response.ok) {
|
|
81
|
+
const { message } = await response.json();
|
|
82
|
+
alert(message);
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
};
|
|
87
|
+
const authContextValue = {
|
|
88
|
+
auth,
|
|
89
|
+
login,
|
|
90
|
+
logout,
|
|
91
|
+
loginWithGoogle,
|
|
92
|
+
requestResetPassword,
|
|
93
|
+
resetPassword
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ React.createElement(AuthContext.Provider, { value: authContextValue }, children);
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
AuthContext,
|
|
99
|
+
AuthProvider as default,
|
|
100
|
+
useAuth
|
|
101
|
+
};
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// src/auth
|
|
30
|
+
// src/auth/client/redirect_page.tsx
|
|
31
31
|
var redirect_page_exports = {};
|
|
32
32
|
__export(redirect_page_exports, {
|
|
33
33
|
RedirectPage: () => RedirectPage
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ThirdpartyAuth, ThirdpartyAuthService } from './thirdparty_auth.mjs';
|
|
2
|
+
import './auth_service.mjs';
|
|
3
|
+
import 'jose';
|
|
4
|
+
import 'react-router';
|
|
5
|
+
import './jwt_manager.mjs';
|
|
6
|
+
import '../file/object_storage.mjs';
|
|
7
|
+
import '@aws-sdk/client-s3';
|
|
8
|
+
import './auth_repository.mjs';
|
|
9
|
+
|
|
10
|
+
declare class GoogleAuth implements ThirdpartyAuth {
|
|
11
|
+
thirdpartyAuth: ThirdpartyAuthService;
|
|
12
|
+
googleClientId: string;
|
|
13
|
+
googleClientSecret: string;
|
|
14
|
+
googleRedirectUri: string;
|
|
15
|
+
constructor({ thirdpartyAuth, googleClientId, googleClientSecret, googleRedirectUri, }: {
|
|
16
|
+
thirdpartyAuth: ThirdpartyAuthService;
|
|
17
|
+
googleClientId: string;
|
|
18
|
+
googleClientSecret: string;
|
|
19
|
+
googleRedirectUri: string;
|
|
20
|
+
});
|
|
21
|
+
login(code: string): Promise<{
|
|
22
|
+
user: {
|
|
23
|
+
id: string;
|
|
24
|
+
role: string;
|
|
25
|
+
name: string;
|
|
26
|
+
refreshToken: string | null;
|
|
27
|
+
};
|
|
28
|
+
accessToken: string;
|
|
29
|
+
refreshToken: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { GoogleAuth };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ThirdpartyAuth, ThirdpartyAuthService } from './thirdparty_auth.js';
|
|
2
|
+
import './auth_service.js';
|
|
3
|
+
import 'jose';
|
|
4
|
+
import 'react-router';
|
|
5
|
+
import './jwt_manager.js';
|
|
6
|
+
import '../file/object_storage.js';
|
|
7
|
+
import '@aws-sdk/client-s3';
|
|
8
|
+
import './auth_repository.js';
|
|
9
|
+
|
|
10
|
+
declare class GoogleAuth implements ThirdpartyAuth {
|
|
11
|
+
thirdpartyAuth: ThirdpartyAuthService;
|
|
12
|
+
googleClientId: string;
|
|
13
|
+
googleClientSecret: string;
|
|
14
|
+
googleRedirectUri: string;
|
|
15
|
+
constructor({ thirdpartyAuth, googleClientId, googleClientSecret, googleRedirectUri, }: {
|
|
16
|
+
thirdpartyAuth: ThirdpartyAuthService;
|
|
17
|
+
googleClientId: string;
|
|
18
|
+
googleClientSecret: string;
|
|
19
|
+
googleRedirectUri: string;
|
|
20
|
+
});
|
|
21
|
+
login(code: string): Promise<{
|
|
22
|
+
user: {
|
|
23
|
+
id: string;
|
|
24
|
+
role: string;
|
|
25
|
+
name: string;
|
|
26
|
+
refreshToken: string | null;
|
|
27
|
+
};
|
|
28
|
+
accessToken: string;
|
|
29
|
+
refreshToken: string;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { GoogleAuth };
|