@zodic/shared 0.0.128 → 0.0.130
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/package.json +1 -1
- package/types/scopes/generic.ts +3 -2
- package/utils/index.ts +16 -1
package/package.json
CHANGED
package/types/scopes/generic.ts
CHANGED
|
@@ -269,6 +269,7 @@ export interface OAuthCompleteBody {
|
|
|
269
269
|
instagramUsername?: string | null;
|
|
270
270
|
tiktokUsername?: string | null;
|
|
271
271
|
birthLocation: string;
|
|
272
|
+
language: Languages;
|
|
272
273
|
}
|
|
273
274
|
|
|
274
275
|
export interface SignupBody {
|
|
@@ -283,6 +284,7 @@ export interface SignupBody {
|
|
|
283
284
|
birthDate: string; // Expected format: "YYYY-MM-DD"
|
|
284
285
|
birthTime?: string | null; // Optional, format: "HH:mm" or null
|
|
285
286
|
birthLocation: string;
|
|
287
|
+
language: Languages;
|
|
286
288
|
}
|
|
287
289
|
|
|
288
290
|
export interface JWK {
|
|
@@ -315,8 +317,7 @@ export type ControlNetConfig =
|
|
|
315
317
|
preprocessorId: 19; // Edge to Image
|
|
316
318
|
weight: number;
|
|
317
319
|
};
|
|
318
|
-
|
|
319
|
-
export type AstroKVData = {
|
|
320
|
+
type AstroKVData = {
|
|
320
321
|
birthChart: {
|
|
321
322
|
wheelUrl: string;
|
|
322
323
|
planets: {
|
package/utils/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jwtVerify } from 'jose';
|
|
2
|
-
import { AuthCtx, JWKS } from '../types';
|
|
2
|
+
import { AuthCtx, JWKS, Provider, ProviderInfo } from '../types';
|
|
3
3
|
|
|
4
4
|
const base64UrlDecode = (input: string) => {
|
|
5
5
|
const base64 = input.replace(/-/g, '+').replace(/_/g, '/');
|
|
@@ -101,6 +101,21 @@ export const verifyToken = async (
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
+
export const providers: (c: AuthCtx) => Record<Provider, ProviderInfo> = () => ({
|
|
105
|
+
google: {
|
|
106
|
+
serverUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
|
|
107
|
+
clientId: process.env.GOOGLE_OAUTH_CLIENT_ID!,
|
|
108
|
+
clientSecret: process.env.GOOGLE_OAUTH_CLIENT_SECRET!,
|
|
109
|
+
resourceUrl: 'https://www.googleapis.com/oauth2/v2/userinfo',
|
|
110
|
+
},
|
|
111
|
+
facebook: {
|
|
112
|
+
serverUrl: 'https://www.facebook.com/v13.0/dialog/oauth',
|
|
113
|
+
clientId: process.env.FACEBOOK_OAUTH_CLIENT_ID!,
|
|
114
|
+
clientSecret: process.env.FACEBOOK_OAUTH_CLIENT_SECRET!,
|
|
115
|
+
resourceUrl: 'https://graph.facebook.com/me?fields=id,name,email,picture',
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
|
|
104
119
|
export function normalizeName(name: string): string {
|
|
105
120
|
return name.toLowerCase().replace(/\s+/g, '-');
|
|
106
121
|
}
|