@insureco/bio 0.3.0 → 0.4.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.
@@ -0,0 +1,43 @@
1
+ // src/errors.ts
2
+ var BioError = class extends Error {
3
+ /** HTTP status code (if from an API response) */
4
+ statusCode;
5
+ /** Machine-readable error code (e.g. 'invalid_grant', 'token_expired') */
6
+ code;
7
+ /** Additional error details from the API */
8
+ details;
9
+ constructor(message, code, statusCode, details) {
10
+ super(message);
11
+ this.name = "BioError";
12
+ this.code = code;
13
+ this.statusCode = statusCode;
14
+ this.details = details;
15
+ }
16
+ };
17
+
18
+ // src/utils.ts
19
+ function retryDelay(attempt) {
20
+ const baseDelay = Math.min(1e3 * 2 ** attempt, 5e3);
21
+ return baseDelay * (0.5 + Math.random() * 0.5);
22
+ }
23
+ function sleep(ms) {
24
+ return new Promise((resolve) => setTimeout(resolve, ms));
25
+ }
26
+ async function parseJsonResponse(response) {
27
+ try {
28
+ return await response.json();
29
+ } catch {
30
+ throw new BioError(
31
+ `Bio-ID returned ${response.status} with non-JSON body`,
32
+ "parse_error",
33
+ response.status
34
+ );
35
+ }
36
+ }
37
+
38
+ export {
39
+ BioError,
40
+ retryDelay,
41
+ sleep,
42
+ parseJsonResponse
43
+ };
package/dist/index.d.mts CHANGED
@@ -1,267 +1,5 @@
1
- /** Configuration for BioAuth (OAuth flow client) */
2
- interface BioAuthConfig {
3
- /** OAuth client ID (env: BIO_CLIENT_ID) */
4
- clientId: string;
5
- /** OAuth client secret (env: BIO_CLIENT_SECRET) */
6
- clientSecret: string;
7
- /** Bio-ID issuer URL (env: BIO_ID_URL, default: https://bio.tawa.pro) */
8
- issuer?: string;
9
- /** Number of retry attempts on transient failures (default: 2) */
10
- retries?: number;
11
- /** Request timeout in milliseconds (default: 10000) */
12
- timeoutMs?: number;
13
- }
14
- /** Configuration for BioAdmin (admin API client) */
15
- interface BioAdminConfig {
16
- /** Bio-ID base URL (env: BIO_ID_URL, default: https://bio.tawa.pro) */
17
- baseUrl?: string;
18
- /** Internal API key for service-to-service auth (env: INTERNAL_API_KEY) */
19
- internalKey?: string;
20
- /** Async function returning a Bearer token (alternative to internalKey) */
21
- accessTokenFn?: () => Promise<string>;
22
- /** Number of retry attempts on transient failures (default: 2) */
23
- retries?: number;
24
- /** Request timeout in milliseconds (default: 10000) */
25
- timeoutMs?: number;
26
- }
27
- /** Options for building an authorization URL */
28
- interface AuthorizeOptions {
29
- /** Callback URL where Bio-ID redirects after authorization */
30
- redirectUri: string;
31
- /** OAuth scopes to request (default: ['openid', 'profile', 'email']) */
32
- scopes?: string[];
33
- /** CSRF state parameter (auto-generated if not provided) */
34
- state?: string;
35
- /** Optional org slug to pre-select during authorization (for multi-org users) */
36
- organization?: string;
37
- }
38
- /** Result from getAuthorizationUrl() */
39
- interface AuthorizeResult {
40
- /** Full authorization URL to redirect the user to */
41
- url: string;
42
- /** State parameter (for CSRF validation on callback) */
43
- state: string;
44
- /** PKCE code verifier (store securely, send during token exchange) */
45
- codeVerifier: string;
46
- /** PKCE code challenge (included in the URL) */
47
- codeChallenge: string;
48
- }
49
- /** Response from the /api/oauth/token endpoint */
50
- interface TokenResponse {
51
- access_token: string;
52
- token_type: 'Bearer';
53
- expires_in: number;
54
- refresh_token?: string;
55
- scope: string;
56
- id_token?: string;
57
- }
58
- /** Response from the /api/auth/introspect endpoint */
59
- interface IntrospectResult {
60
- active: boolean;
61
- user?: {
62
- id: string;
63
- email: string;
64
- name: string;
65
- org: string;
66
- roles: string[];
67
- };
68
- tokenType?: 'client_credentials';
69
- clientId?: string;
70
- scopes?: string[];
71
- orgId?: string;
72
- orgSlug?: string;
73
- organizationName?: string;
74
- }
75
- /** Decoded access token payload (user auth) */
76
- interface BioTokenPayload {
77
- iss: string;
78
- sub: string;
79
- aud: string;
80
- exp: number;
81
- iat: number;
82
- bioId: string;
83
- email: string;
84
- name: string;
85
- userType: string;
86
- roles: string[];
87
- permissions: string[];
88
- orgId?: string;
89
- orgSlug?: string;
90
- /** Org-specific role slugs within the user's active org (from OrgMembership) */
91
- orgRoles?: string[];
92
- /** Job title at the active org (from OrgMembership.jobTitle) */
93
- orgTitle?: string;
94
- /** Additional modules granted by the org specifically (from OrgMembership.enabled_modules) */
95
- orgModules?: string[];
96
- client_id: string;
97
- scope: string;
98
- enabled_modules?: string[];
99
- onboarding?: {
100
- platform: boolean;
101
- modules: Record<string, {
102
- completed: string[];
103
- due: string[];
104
- }>;
105
- };
106
- }
107
- /** Decoded client credentials token payload (service-to-service) */
108
- interface BioClientTokenPayload {
109
- iss: string;
110
- exp: number;
111
- iat: number;
112
- client_id: string;
113
- scope: string;
114
- token_type: 'client_credentials';
115
- orgId?: string;
116
- orgSlug?: string;
117
- }
118
- /** Options for local JWT verification (HS256) */
119
- interface VerifyOptions {
120
- /** Expected issuer (default: config issuer) */
121
- issuer?: string;
122
- /** Expected audience (client_id) */
123
- audience?: string;
124
- }
125
- /** Options for JWKS-based JWT verification (RS256) */
126
- interface JWKSVerifyOptions {
127
- /** JWKS endpoint URL (default: https://bio.tawa.pro/.well-known/jwks.json) */
128
- jwksUri?: string;
129
- /** Expected issuer — defaults to accepting bio.insureco.io, bio.tawa.insureco.io, and bio.tawa.pro */
130
- issuer?: string;
131
- /** Expected audience (client_id) */
132
- audience?: string;
133
- }
134
- /** User profile from /api/oauth/userinfo or admin API */
135
- interface BioUser {
136
- sub: string;
137
- bioId: string;
138
- email: string;
139
- emailVerified: boolean;
140
- name: string;
141
- firstName?: string;
142
- lastName?: string;
143
- userType: string;
144
- roles: string[];
145
- permissions: string[];
146
- status: string;
147
- orgId?: string;
148
- orgSlug?: string;
149
- organizationId?: string;
150
- organizationName?: string;
151
- departmentId?: string;
152
- departmentName?: string;
153
- managerId?: string;
154
- enabledModules?: string[];
155
- jobTitle?: string;
156
- phoneHome?: string;
157
- phoneWork?: string;
158
- phoneCell?: string;
159
- phone?: string;
160
- addressHome?: BioAddress;
161
- addressWork?: BioAddress;
162
- messaging?: BioMessaging;
163
- preferences?: Record<string, unknown>;
164
- lastLoginAt?: number;
165
- }
166
- interface BioAddress {
167
- street?: string;
168
- city?: string;
169
- state?: string;
170
- zip?: string;
171
- country?: string;
172
- }
173
- interface BioMessaging {
174
- slack?: string;
175
- teams?: string;
176
- skype?: string;
177
- whatsapp?: string;
178
- }
179
- /** Filters for listing users */
180
- interface UserFilters {
181
- search?: string;
182
- status?: string;
183
- userType?: string;
184
- organizationId?: string;
185
- page?: number;
186
- limit?: number;
187
- }
188
- /** Data for updating a user */
189
- interface UpdateUserData {
190
- firstName?: string;
191
- lastName?: string;
192
- displayName?: string;
193
- roles?: string[];
194
- status?: string;
195
- userType?: string;
196
- departmentId?: string;
197
- jobTitle?: string;
198
- permissions?: string[];
199
- enabled_modules?: string[];
200
- }
201
- /** Department from admin API */
202
- interface BioDepartment {
203
- id: string;
204
- name: string;
205
- description?: string;
206
- organizationId: string;
207
- headId?: string;
208
- parentId?: string;
209
- memberCount?: number;
210
- }
211
- /** Data for creating a department */
212
- interface CreateDepartmentData {
213
- name: string;
214
- description?: string;
215
- headId?: string;
216
- parentId?: string;
217
- }
218
- /** Role from admin API */
219
- interface BioRole {
220
- id: string;
221
- name: string;
222
- description?: string;
223
- permissions: string[];
224
- isSystem?: boolean;
225
- }
226
- /** Data for creating a role */
227
- interface CreateRoleData {
228
- name: string;
229
- description?: string;
230
- permissions: string[];
231
- }
232
- /** OAuth client from admin API */
233
- interface BioOAuthClient {
234
- clientId: string;
235
- name: string;
236
- description?: string;
237
- redirectUris: string[];
238
- allowedScopes: string[];
239
- allowedGrantTypes: string[];
240
- isActive: boolean;
241
- orgId?: string;
242
- orgSlug?: string;
243
- accessTokenTtl?: number;
244
- refreshTokenTtl?: number;
245
- }
246
- /** Data for creating an OAuth client */
247
- interface CreateClientData {
248
- name: string;
249
- description?: string;
250
- redirectUris: string[];
251
- allowedScopes?: string[];
252
- allowedGrantTypes?: string[];
253
- }
254
- /** Admin API response wrapper */
255
- interface AdminResponse<T> {
256
- success: boolean;
257
- data?: T;
258
- error?: string;
259
- meta?: {
260
- total: number;
261
- page: number;
262
- limit: number;
263
- };
264
- }
1
+ import { B as BioAuthConfig, A as AuthorizeOptions, a as AuthorizeResult, T as TokenResponse, b as BioUser, I as IntrospectResult, c as BioAdminConfig, U as UserFilters, d as UpdateUserData, e as BioDepartment, C as CreateDepartmentData, f as BioRole, g as CreateRoleData, h as BioOAuthClient, i as CreateClientData, j as BioTokenPayload, V as VerifyOptions, J as JWKSVerifyOptions } from './types-Dkb-drHZ.mjs';
2
+ export { k as AdminResponse, l as BioAddress, m as BioClientTokenPayload, n as BioMessaging, o as BioUsersConfig, O as OrgMember, p as OrgMemberFilters, q as OrgMembersResult } from './types-Dkb-drHZ.mjs';
265
3
 
266
4
  /**
267
5
  * OAuth flow client for Bio-ID SSO.
@@ -416,4 +154,4 @@ declare function isTokenExpired(token: string, bufferSeconds?: number): boolean;
416
154
  */
417
155
  declare function verifyTokenJWKS(token: string, options?: JWKSVerifyOptions): Promise<BioTokenPayload>;
418
156
 
419
- export { type AdminResponse, type AuthorizeOptions, type AuthorizeResult, type BioAddress, BioAdmin, type BioAdminConfig, BioAuth, type BioAuthConfig, type BioClientTokenPayload, type BioDepartment, BioError, type BioMessaging, type BioOAuthClient, type BioRole, type BioTokenPayload, type BioUser, type CreateClientData, type CreateDepartmentData, type CreateRoleData, type IntrospectResult, type JWKSVerifyOptions, type TokenResponse, type UpdateUserData, type UserFilters, type VerifyOptions, decodeToken, generatePKCE, isTokenExpired, verifyToken, verifyTokenJWKS };
157
+ export { AuthorizeOptions, AuthorizeResult, BioAdmin, BioAdminConfig, BioAuth, BioAuthConfig, BioDepartment, BioError, BioOAuthClient, BioRole, BioTokenPayload, BioUser, CreateClientData, CreateDepartmentData, CreateRoleData, IntrospectResult, JWKSVerifyOptions, TokenResponse, UpdateUserData, UserFilters, VerifyOptions, decodeToken, generatePKCE, isTokenExpired, verifyToken, verifyTokenJWKS };
package/dist/index.d.ts CHANGED
@@ -1,267 +1,5 @@
1
- /** Configuration for BioAuth (OAuth flow client) */
2
- interface BioAuthConfig {
3
- /** OAuth client ID (env: BIO_CLIENT_ID) */
4
- clientId: string;
5
- /** OAuth client secret (env: BIO_CLIENT_SECRET) */
6
- clientSecret: string;
7
- /** Bio-ID issuer URL (env: BIO_ID_URL, default: https://bio.tawa.pro) */
8
- issuer?: string;
9
- /** Number of retry attempts on transient failures (default: 2) */
10
- retries?: number;
11
- /** Request timeout in milliseconds (default: 10000) */
12
- timeoutMs?: number;
13
- }
14
- /** Configuration for BioAdmin (admin API client) */
15
- interface BioAdminConfig {
16
- /** Bio-ID base URL (env: BIO_ID_URL, default: https://bio.tawa.pro) */
17
- baseUrl?: string;
18
- /** Internal API key for service-to-service auth (env: INTERNAL_API_KEY) */
19
- internalKey?: string;
20
- /** Async function returning a Bearer token (alternative to internalKey) */
21
- accessTokenFn?: () => Promise<string>;
22
- /** Number of retry attempts on transient failures (default: 2) */
23
- retries?: number;
24
- /** Request timeout in milliseconds (default: 10000) */
25
- timeoutMs?: number;
26
- }
27
- /** Options for building an authorization URL */
28
- interface AuthorizeOptions {
29
- /** Callback URL where Bio-ID redirects after authorization */
30
- redirectUri: string;
31
- /** OAuth scopes to request (default: ['openid', 'profile', 'email']) */
32
- scopes?: string[];
33
- /** CSRF state parameter (auto-generated if not provided) */
34
- state?: string;
35
- /** Optional org slug to pre-select during authorization (for multi-org users) */
36
- organization?: string;
37
- }
38
- /** Result from getAuthorizationUrl() */
39
- interface AuthorizeResult {
40
- /** Full authorization URL to redirect the user to */
41
- url: string;
42
- /** State parameter (for CSRF validation on callback) */
43
- state: string;
44
- /** PKCE code verifier (store securely, send during token exchange) */
45
- codeVerifier: string;
46
- /** PKCE code challenge (included in the URL) */
47
- codeChallenge: string;
48
- }
49
- /** Response from the /api/oauth/token endpoint */
50
- interface TokenResponse {
51
- access_token: string;
52
- token_type: 'Bearer';
53
- expires_in: number;
54
- refresh_token?: string;
55
- scope: string;
56
- id_token?: string;
57
- }
58
- /** Response from the /api/auth/introspect endpoint */
59
- interface IntrospectResult {
60
- active: boolean;
61
- user?: {
62
- id: string;
63
- email: string;
64
- name: string;
65
- org: string;
66
- roles: string[];
67
- };
68
- tokenType?: 'client_credentials';
69
- clientId?: string;
70
- scopes?: string[];
71
- orgId?: string;
72
- orgSlug?: string;
73
- organizationName?: string;
74
- }
75
- /** Decoded access token payload (user auth) */
76
- interface BioTokenPayload {
77
- iss: string;
78
- sub: string;
79
- aud: string;
80
- exp: number;
81
- iat: number;
82
- bioId: string;
83
- email: string;
84
- name: string;
85
- userType: string;
86
- roles: string[];
87
- permissions: string[];
88
- orgId?: string;
89
- orgSlug?: string;
90
- /** Org-specific role slugs within the user's active org (from OrgMembership) */
91
- orgRoles?: string[];
92
- /** Job title at the active org (from OrgMembership.jobTitle) */
93
- orgTitle?: string;
94
- /** Additional modules granted by the org specifically (from OrgMembership.enabled_modules) */
95
- orgModules?: string[];
96
- client_id: string;
97
- scope: string;
98
- enabled_modules?: string[];
99
- onboarding?: {
100
- platform: boolean;
101
- modules: Record<string, {
102
- completed: string[];
103
- due: string[];
104
- }>;
105
- };
106
- }
107
- /** Decoded client credentials token payload (service-to-service) */
108
- interface BioClientTokenPayload {
109
- iss: string;
110
- exp: number;
111
- iat: number;
112
- client_id: string;
113
- scope: string;
114
- token_type: 'client_credentials';
115
- orgId?: string;
116
- orgSlug?: string;
117
- }
118
- /** Options for local JWT verification (HS256) */
119
- interface VerifyOptions {
120
- /** Expected issuer (default: config issuer) */
121
- issuer?: string;
122
- /** Expected audience (client_id) */
123
- audience?: string;
124
- }
125
- /** Options for JWKS-based JWT verification (RS256) */
126
- interface JWKSVerifyOptions {
127
- /** JWKS endpoint URL (default: https://bio.tawa.pro/.well-known/jwks.json) */
128
- jwksUri?: string;
129
- /** Expected issuer — defaults to accepting bio.insureco.io, bio.tawa.insureco.io, and bio.tawa.pro */
130
- issuer?: string;
131
- /** Expected audience (client_id) */
132
- audience?: string;
133
- }
134
- /** User profile from /api/oauth/userinfo or admin API */
135
- interface BioUser {
136
- sub: string;
137
- bioId: string;
138
- email: string;
139
- emailVerified: boolean;
140
- name: string;
141
- firstName?: string;
142
- lastName?: string;
143
- userType: string;
144
- roles: string[];
145
- permissions: string[];
146
- status: string;
147
- orgId?: string;
148
- orgSlug?: string;
149
- organizationId?: string;
150
- organizationName?: string;
151
- departmentId?: string;
152
- departmentName?: string;
153
- managerId?: string;
154
- enabledModules?: string[];
155
- jobTitle?: string;
156
- phoneHome?: string;
157
- phoneWork?: string;
158
- phoneCell?: string;
159
- phone?: string;
160
- addressHome?: BioAddress;
161
- addressWork?: BioAddress;
162
- messaging?: BioMessaging;
163
- preferences?: Record<string, unknown>;
164
- lastLoginAt?: number;
165
- }
166
- interface BioAddress {
167
- street?: string;
168
- city?: string;
169
- state?: string;
170
- zip?: string;
171
- country?: string;
172
- }
173
- interface BioMessaging {
174
- slack?: string;
175
- teams?: string;
176
- skype?: string;
177
- whatsapp?: string;
178
- }
179
- /** Filters for listing users */
180
- interface UserFilters {
181
- search?: string;
182
- status?: string;
183
- userType?: string;
184
- organizationId?: string;
185
- page?: number;
186
- limit?: number;
187
- }
188
- /** Data for updating a user */
189
- interface UpdateUserData {
190
- firstName?: string;
191
- lastName?: string;
192
- displayName?: string;
193
- roles?: string[];
194
- status?: string;
195
- userType?: string;
196
- departmentId?: string;
197
- jobTitle?: string;
198
- permissions?: string[];
199
- enabled_modules?: string[];
200
- }
201
- /** Department from admin API */
202
- interface BioDepartment {
203
- id: string;
204
- name: string;
205
- description?: string;
206
- organizationId: string;
207
- headId?: string;
208
- parentId?: string;
209
- memberCount?: number;
210
- }
211
- /** Data for creating a department */
212
- interface CreateDepartmentData {
213
- name: string;
214
- description?: string;
215
- headId?: string;
216
- parentId?: string;
217
- }
218
- /** Role from admin API */
219
- interface BioRole {
220
- id: string;
221
- name: string;
222
- description?: string;
223
- permissions: string[];
224
- isSystem?: boolean;
225
- }
226
- /** Data for creating a role */
227
- interface CreateRoleData {
228
- name: string;
229
- description?: string;
230
- permissions: string[];
231
- }
232
- /** OAuth client from admin API */
233
- interface BioOAuthClient {
234
- clientId: string;
235
- name: string;
236
- description?: string;
237
- redirectUris: string[];
238
- allowedScopes: string[];
239
- allowedGrantTypes: string[];
240
- isActive: boolean;
241
- orgId?: string;
242
- orgSlug?: string;
243
- accessTokenTtl?: number;
244
- refreshTokenTtl?: number;
245
- }
246
- /** Data for creating an OAuth client */
247
- interface CreateClientData {
248
- name: string;
249
- description?: string;
250
- redirectUris: string[];
251
- allowedScopes?: string[];
252
- allowedGrantTypes?: string[];
253
- }
254
- /** Admin API response wrapper */
255
- interface AdminResponse<T> {
256
- success: boolean;
257
- data?: T;
258
- error?: string;
259
- meta?: {
260
- total: number;
261
- page: number;
262
- limit: number;
263
- };
264
- }
1
+ import { B as BioAuthConfig, A as AuthorizeOptions, a as AuthorizeResult, T as TokenResponse, b as BioUser, I as IntrospectResult, c as BioAdminConfig, U as UserFilters, d as UpdateUserData, e as BioDepartment, C as CreateDepartmentData, f as BioRole, g as CreateRoleData, h as BioOAuthClient, i as CreateClientData, j as BioTokenPayload, V as VerifyOptions, J as JWKSVerifyOptions } from './types-Dkb-drHZ.js';
2
+ export { k as AdminResponse, l as BioAddress, m as BioClientTokenPayload, n as BioMessaging, o as BioUsersConfig, O as OrgMember, p as OrgMemberFilters, q as OrgMembersResult } from './types-Dkb-drHZ.js';
265
3
 
266
4
  /**
267
5
  * OAuth flow client for Bio-ID SSO.
@@ -416,4 +154,4 @@ declare function isTokenExpired(token: string, bufferSeconds?: number): boolean;
416
154
  */
417
155
  declare function verifyTokenJWKS(token: string, options?: JWKSVerifyOptions): Promise<BioTokenPayload>;
418
156
 
419
- export { type AdminResponse, type AuthorizeOptions, type AuthorizeResult, type BioAddress, BioAdmin, type BioAdminConfig, BioAuth, type BioAuthConfig, type BioClientTokenPayload, type BioDepartment, BioError, type BioMessaging, type BioOAuthClient, type BioRole, type BioTokenPayload, type BioUser, type CreateClientData, type CreateDepartmentData, type CreateRoleData, type IntrospectResult, type JWKSVerifyOptions, type TokenResponse, type UpdateUserData, type UserFilters, type VerifyOptions, decodeToken, generatePKCE, isTokenExpired, verifyToken, verifyTokenJWKS };
157
+ export { AuthorizeOptions, AuthorizeResult, BioAdmin, BioAdminConfig, BioAuth, BioAuthConfig, BioDepartment, BioError, BioOAuthClient, BioRole, BioTokenPayload, BioUser, CreateClientData, CreateDepartmentData, CreateRoleData, IntrospectResult, JWKSVerifyOptions, TokenResponse, UpdateUserData, UserFilters, VerifyOptions, decodeToken, generatePKCE, isTokenExpired, verifyToken, verifyTokenJWKS };
package/dist/index.mjs CHANGED
@@ -1,23 +1,13 @@
1
+ import {
2
+ BioError,
3
+ parseJsonResponse,
4
+ retryDelay,
5
+ sleep
6
+ } from "./chunk-NK5VXXWF.mjs";
7
+
1
8
  // src/auth.ts
2
9
  import crypto2 from "crypto";
3
10
 
4
- // src/errors.ts
5
- var BioError = class extends Error {
6
- /** HTTP status code (if from an API response) */
7
- statusCode;
8
- /** Machine-readable error code (e.g. 'invalid_grant', 'token_expired') */
9
- code;
10
- /** Additional error details from the API */
11
- details;
12
- constructor(message, code, statusCode, details) {
13
- super(message);
14
- this.name = "BioError";
15
- this.code = code;
16
- this.statusCode = statusCode;
17
- this.details = details;
18
- }
19
- };
20
-
21
11
  // src/pkce.ts
22
12
  import crypto from "crypto";
23
13
  function generatePKCE() {
@@ -26,26 +16,6 @@ function generatePKCE() {
26
16
  return { codeVerifier, codeChallenge };
27
17
  }
28
18
 
29
- // src/utils.ts
30
- function retryDelay(attempt) {
31
- const baseDelay = Math.min(1e3 * 2 ** attempt, 5e3);
32
- return baseDelay * (0.5 + Math.random() * 0.5);
33
- }
34
- function sleep(ms) {
35
- return new Promise((resolve) => setTimeout(resolve, ms));
36
- }
37
- async function parseJsonResponse(response) {
38
- try {
39
- return await response.json();
40
- } catch {
41
- throw new BioError(
42
- `Bio-ID returned ${response.status} with non-JSON body`,
43
- "parse_error",
44
- response.status
45
- );
46
- }
47
- }
48
-
49
19
  // src/auth.ts
50
20
  var DEFAULT_ISSUER = "https://bio.tawa.pro";
51
21
  var DEFAULT_SCOPES = ["openid", "profile", "email"];