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().