@zodic/shared 0.0.132 → 0.0.133

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 +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.132",
3
+ "version": "0.0.133",
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> = (c) => ({
104
+ export const providers: (c: AuthCtx) => Record<Provider, ProviderInfo> = () => ({
105
105
  google: {
106
- serverUrl: 'https://accounts.google.com/o/oauth2/v2/auth',
107
- clientId: c.env.GOOGLE_OAUTH_CLIENT_ID!,
108
- clientSecret: c.env.GOOGLE_OAUTH_CLIENT_SECRET!,
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!,
109
109
  resourceUrl: 'https://www.googleapis.com/oauth2/v2/userinfo',
110
110
  },
111
111
  facebook: {
112
- serverUrl: 'https://www.facebook.com/v13.0/dialog/oauth',
113
- clientId: c.env.FACEBOOK_OAUTH_CLIENT_ID!,
114
- clientSecret: c.env.FACEBOOK_OAUTH_CLIENT_SECRET!,
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!,
115
115
  resourceUrl: 'https://graph.facebook.com/me?fields=id,name,email,picture',
116
116
  },
117
117
  });