Auto-redirect doesn't work
PierW opened this issue · comments
On production (netlify) there is a problem with the redirect after the login in admin area.
I tried to insert this in homepage... it's works fine but just on local:
<script> if (window.netlifyIdentity) { window.netlifyIdentity.on("init", user => { if (!user) { window.netlifyIdentity.on("login", () => { document.location.href = "/admin/"; }); } }); } </script>
in production I still have to press the button: "Login with Netlify Identity"
Hi, this is indeed annoying and I think it may be related to an issue with gotrue-js not updating the user token on first load.
Add to that the various UX concerns with the Netlify Identity Widget, I'm not sure what we can do to fix it right now.
Correct me if I'm misunderstanding your issue.