I am new to the anvil. i dont want to use the default login (signin / signup ) functionality. I just want to create my login form and create the default administrator and password to enter and i should manually create the username and password for other user and store it in userdata. then using the same username and password to login. is there any example to follow ?
In addition to the tutorial shared by @david.wylie (thanks David), this section of the reference docs explains the API for creating custom signup forms
To log in manually with an email and password, call anvil.users.login_with_email() , passing the email address and password as arguments. This function returns the newly-logged-in user, or raises an AuthenticationFailed exception if the login failed.
This function can be called from client or server code.
To reset a userâs password, call anvil.users.send_password_reset_email() . If the specified email address is in the Users table, Anvil will send them an email with a link where they can set a new password for their account.
This function can be called from client or server code.
To register a new account with an email and password, call anvil.users.signup_with_email() . If signup succeeds, this function returns the newly-created user object. The new user will also be logged in if email confirmation is not required, and new-user registrations are automatically enabled.
This function can be called from client or server code, if the âallow signupsâ option is enabled in the users service configuration. Otherwise, it can only be called from server code.
(Thatâs the most relevant section; the reference docs also describe the exceptions to use to check if the user has entered the wrong password, etc.)
My requirement is to âAdmin will create the username and password for the userâ. Then admin will share the credentials with the user, then the user use the same credential for login.