Login button problems

Hello,

I am creating a login button and using netlify API for my github pages site but it doesn’t work. I get “Failed to load settings from /.netlify/identity”

What am I doing wrong? Inside my head I have:

Here is my js for the button :

if (window.netlifyIdentity) { window.netlifyIdentity.init({ APIConfig: { api_url: 'https://annarichman.netlify.app/.netlify/identity' } }); } // 2. Logic for when Anna logs in window.netlifyIdentity.on("login", user => { window.netlifyIdentity.close(); // Redirect to the admin dashboard window.location.href = "/admin/"; }); // 3. Make the button work const loginBtn = document.querySelector('.login-btn'); if (loginBtn) { loginBtn.addEventListener('click', () => { window.netlifyIdentity.open(); }); } What am I doing wrong? I have the github stuff right on the netlify settings too I think....I did all the Oauth stuff...

in head

sorry i dont know why nothing i post is working.

UPDATE:

Okay I stopped using netlify and I am trying to use supabase. This is all a login system without an actual backend right? Because I always use github pages to deploy my websites.

edit : also after logging in trying to get to the admin page but it doesn’t work. I have a folder called admin and my index.html is made.

window.location.href = “./admin/”

anything wrong with the above code?