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
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- SyntaxError: Unexpected end of JSON inpu...
I am trying to create a fcm push notification service using appwrite functions with its REST API to invoke that function from my client side app and getting thi...
- Experiencing inconsistent "500 general_u...
I am developing a task management app that uses Appwrite auth. My project is hosted on Appwrite cloud and I've created basic server-side authentication followin...