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