diff --git a/examples/javascript-auth/index.js b/examples/javascript-auth/index.js index 67c2089761c..5b16fdf6043 100644 --- a/examples/javascript-auth/index.js +++ b/examples/javascript-auth/index.js @@ -56,16 +56,10 @@ const logInSubmitted = (event) => { } const fetchUserDetails = () => { - supabase.auth - .user() - .then((response) => { - alert(JSON.stringify(response)) - }) - .catch((err) => { - alert(err.response.text) - }) + alert(JSON.stringify(supabase.auth.user())) } + const logoutSubmitted = (event) => { event.preventDefault()