I use this gotrue.js method to confirm the user: auth.confirm(token);
This is where the issue occurs. Instead of confirming the user, the system logs a console error (see screenshot below): Invited users must specify a password.
OK, that makes sense. Then, with gotrue-js, what should be the process for invite-only users to get a working login? Something like this?
Please see point 4 below. I’m not sure what to do with the confirmation_token.
I visit Netlify App and click the “invite users” button in order to send an invite email. Registration is invite-only.
The user receives the invite email and clicks the Confirm Your Email Address button.
I think that should work. Perhaps you can look at the code in the identity widget to see what calls it makes? It’s just javascript using that same API. Our support team can’t really consult on code at that level but if that isn’t sufficient please let us know what you found while you tried
Hi @edtalmadge - not sure if you’ve solved this one yet. I just had the same problem.
I dug into the gotrue-js package source and found a method called acceptInvite that takes a token & a password as its parameters. Using auth.acceptInvite(token, password) allowed me to set a password for an invited user.