signinwith 1.0.6 → 1.0.8

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/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5,7 +5,7 @@ export const verifySigninGoogle = async (config, verificationData) => {
5
5
  return payload.email ? { success: true, email: payload.email } : { success: false, error: 'Email not found' };
6
6
  };
7
7
 
8
- export const verifySigninMeta = async (config, verificationData) => {
8
+ export const verifySigninFacebook = async (config, verificationData) => {
9
9
  const res = await fetch(`https://graph.facebook.com/me?fields=email&access_token=${verificationData.accessToken}`);
10
10
  const profile = await res.json();
11
11
  return profile.email ? { success: true, email: profile.email } : { success: false, error: 'Email not available from Facebook' };
@@ -37,7 +37,7 @@ export const verifySigninDiscord = async (config, verificationData) => {
37
37
  export default async function verifySignin (services, service, verificationData) {
38
38
  try {
39
39
  if (services.google && service === 'google') return await verifySigninGoogle(services.google, verificationData);
40
- if (services.meta && service === 'meta') return await verifySigninMeta(services.meta, verificationData);
40
+ if (services.facebook && service === 'facebook') return await verifySigninFacebook(services.facebook, verificationData);
41
41
  if (services.apple && service === 'apple') return await verifySigninApple(services.apple, verificationData);
42
42
  if (services.discord && service === 'discord') return await verifySigninDiscord(services.discord, verificationData);
43
43
  return { success: false, error: 'Unsupported service' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signinwith",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Simple and straightforward library for sign in / sign up with thirdparty oAuth services like Google, Meta, Apple, Discord...",
5
5
  "main": "index.js",
6
6
  "scripts": {