react-facebook-login icon indicating copy to clipboard operation
react-facebook-login copied to clipboard

Why does it not return an authenticated state after successful log in?

Open dalegacusan opened this issue 2 years ago • 2 comments

After successfully logging in, the callback for onSuccess is not called.

When you click the login with facebook button again, it now calls the onSuccess callback.

Basically you need to click the login button 2 times to show that you're authenticated


I'm developing in localhost:3000 with HTTPS=true set in package.json

import React, { useEffect } from 'react';
import { ButtonProps } from '@mantine/core';
import FacebookLogin from '@greatsumini/react-facebook-login';

export function FacebookButton(props: ButtonProps<'button'>) {
  return (
    <FacebookLogin
      appId=''
      onSuccess={(response) => {
        console.log('Login Success!', response);
      }}
      onFail={(error) => {
        console.log('Login Failed!', error);
      }}
      onProfileSuccess={(response) => {
        console.log('Get Profile Success!', response);
      }}
    />
  );
}

dalegacusan avatar Jun 12 '22 06:06 dalegacusan

@dalegacusan Could you provide a minimal repository which reproduces this issue?

greatSumini avatar Jun 13 '22 09:06 greatSumini

image I have the same problem and get this error for first-time login.

eabdollahian avatar Apr 20 '23 09:04 eabdollahian