@zodic/shared 0.0.127 → 0.0.129

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.127",
3
+ "version": "0.0.129",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -315,8 +315,7 @@ export type ControlNetConfig =
315
315
  preprocessorId: 19; // Edge to Image
316
316
  weight: number;
317
317
  };
318
-
319
- export type AstroKVData = {
318
+ type AstroKVData = {
320
319
  birthChart: {
321
320
  wheelUrl: string;
322
321
  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
  }