Back

Should I get errors in browser console as early as directing to localhost?

  • 0
  • Web
Los Feliz
15 Oct, 2024, 21:18

I follow the steps in https://www.appwrite.io/blog/post/set-up-google-auth-appwrite-react one by one. I do not get any errors during the process. That being said, as soon as I run the application and go to my localhost, I see the errors in the screenshot. The errors come from these lines which are copy-paste from the tutorial:

TypeScript
export const getUser = async () => {
    try {
        return await account.get()
    } catch (error) {
        console.error(error)
    }
}

When I click on the login button and enter my credentials, I get the Appwrite loading screen with this path https://cloud.appwrite.io/console/auth/oauth2/success?[project id]...... with 401 Unauthorized error in the browser console.

I am lost as I do not take any liberty in the steps as I take. I will appriciate any guidance.

TL;DR
The developer is experiencing 401 Unauthorized errors in the browser console when signing in and using Appwrite. The issue might be related to the authentication process. Double-check the authentication setup, ensure correct configurations, and verify the project ID.
Los Feliz
15 Oct, 2024, 21:24

When I check the Users tab of the Auth section, I see the email address that I used for logging in added to the Users list So the login credentials were recognized by Appwrite. It is my UI and the browser console that give me errors.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more