
When I try to login with facebook in react js using appwrite in that case I will login successfully but I did not render on the home screen.

Can you share the createOAuth2Session
function code?

What's in the URL? Sometimes there's an error message/description in there

also, usually, the problem is something is misconfigured between Appwrite and Facebook

const handleFacebookLogin = (e) => { e.preventDefault();
try {
account.createOAuth2Session(
"facebook",
"http://localhost:3000/home",
"http://localhost:3000/login"
);
} catch (error) {
console.log("Facebook Error", error);
}
};

In which URL ? When I click on facebook button it will render on the facebook login then I put the credentials & click on login it says something went wrong I have check the redirect URL & also changing that redirect URL but I have face the same error

The url of the Facebook page with the error. Maybe the URLs of one of the pages during the redirect might have an error message as well

https://www.facebook.com/v2.8/dialog/oauth?client_id=812104193879303&redirect_uri={OUR_Appwrite_URL}/v1/account/sessions/oauth2/callback/facebook/64a665b80151f63b223b& scope=email&state={"success":"http:localhost:3000home","failure":"http:localhost:3000login"}&ret=login&fbapp_pres=0&logger_id =fe08f713-e343-4bac-88ce-4ca9fb41f422&tp=unspecified&cbt=1689826929333&ext=1689830550&hash=AebV7yKObpzJ0RvsUgE
I have remove the actual domain
Above URL is the when I put the facebook credentials then it render on this URL & also saying something went wrong

not that helpful 😕

what about the url of this page?

could you try to replace the scope with openid instead of email?
Recommended threads
- how many Teams can be created?
I am creating an app where I will let users create groups. This could mean there will be many groups created by user, to isolate those groups properly I am thin...
- React native app login via Safari
Hi! I deployed for debug my React Native app in web, chrome everythink works well but in safari on mac and ios I cant login. I found this one error in safari co...
- Invalid credentials after migration
Hi everyone! After migrating our self-hosted Appwrite 1.3.1 to another server (staging, so a different domain), we are now getting 'Invalid credentials' when ...
