GoTrue signup authenticates, though with bad User API

Hi all,

It seems both the Signup and Login functions of GoTrueJs authenticates the user, but only Login provides the full User object as a response(incl the Logout and Update functions). This means that I have to both first let the user signup and then I have to behind the scenes also call Login with their credentials.

Is this as intended? Confused me since they both authenticates the user.

I.e.

let auth = new GoTrue({ APIUrl: "https://xxxxxx.netlify.app/.netlify/identity", audience: "", setCookie: true, });

auth.signup(email, password).then((response) => {
   setUser(response);
})

“response” is a json with email, id etc WITHOUT the logout() and update() functions etc. while in:

auth.login(username, pass, true).then((response) => {
   setUser(response);
})

“response” has the full User typed object INCLUDING the api functions logout() and update().

Netlify Identity is a service soon set to be deprecated. GoTrue should be usable, but you’d have to deploy your own instance.

Oh no! I’ve finally managed to set up a boilerplate repo with Identity :dizzy_face:

Could I then ask you maybe; I’m a simple frontend React developer that would like to spin up such app projects that has a boilerplate including authentication, sql db, media cdn storage and a generally scalability from 10 users to millions. This without having to become a Devop/Backend engineer as well.

Any tips?

There are several better apps and services than handle auth (probably better than Netlify):

  • Supabase
  • Clerk
  • Firebase

are the ones that come to my mind.

1 Like

Thank you, auth now moved over to Supabase.
Keep up good work with Netlify though!

1 Like