@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.
- package/package.json +1 -1
- package/utils/index.ts +6 -5
package/package.json
CHANGED
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:
|
|
108
|
-
clientSecret:
|
|
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:
|
|
114
|
-
clientSecret:
|
|
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
|
+
|