@zodic/shared 0.0.133 → 0.0.134

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/index.ts +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.133",
3
+ "version": "0.0.134",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/utils/index.ts CHANGED
@@ -101,17 +101,17 @@ export const verifyToken = async (
101
101
  }
102
102
  };
103
103
 
104
- export const providers: (c: AuthCtx) => Record<Provider, ProviderInfo> = () => ({
104
+ export const providers: (c: AuthCtx) => Record<Provider, ProviderInfo> = (c) => ({
105
105
  google: {
106
106
  serverUrl: 'https://accounts.google.com/.well-known/openid-configuration', // ✅ Correct Discovery URL
107
- clientId: process.env.GOOGLE_OAUTH_CLIENT_ID!,
108
- clientSecret: process.env.GOOGLE_OAUTH_CLIENT_SECRET!,
107
+ clientId: c.env.GOOGLE_OAUTH_CLIENT_ID!,
108
+ clientSecret: c.env.GOOGLE_OAUTH_CLIENT_SECRET!,
109
109
  resourceUrl: 'https://www.googleapis.com/oauth2/v2/userinfo',
110
110
  },
111
111
  facebook: {
112
112
  serverUrl: 'https://www.facebook.com/.well-known/openid-configuration', // ✅ Facebook equivalent
113
- clientId: process.env.FACEBOOK_OAUTH_CLIENT_ID!,
114
- clientSecret: process.env.FACEBOOK_OAUTH_CLIENT_SECRET!,
113
+ clientId: c.env.FACEBOOK_OAUTH_CLIENT_ID!,
114
+ clientSecret: c.env.FACEBOOK_OAUTH_CLIENT_SECRET!,
115
115
  resourceUrl: 'https://graph.facebook.com/me?fields=id,name,email,picture',
116
116
  },
117
117
  });
@@ -119,3 +119,4 @@ export const providers: (c: AuthCtx) => Record<Provider, ProviderInfo> = () => (
119
119
  export function normalizeName(name: string): string {
120
120
  return name.toLowerCase().replace(/\s+/g, '-');
121
121
  }
122
+