react-facebook-login
react-facebook-login copied to clipboard
Why does it not return an authenticated state after successful log in?
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 Could you provide a minimal repository which reproduces this issue?
I have the same problem and get this error for first-time login.