
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
- Function gives unauthorized error when w...
I am on free tier. I have function that has three attributes: 1. A stand alone attribute (required) 2. A many to one relationship attribute 3. A many to man...
- Problem with login using Retool
I am using the Appwrite rest api to create an email session from Retool. My next api call is to create JWT. The call is failing because Retool is a closed envir...
- Appwrite sites 404
Hello ! When I add a subdomain to a deployed website, it gives me a 404 error on said domain thus making the SSL processus not working and im not able to acces...
