User Account

Skapi comes with a complete user account system: sign up, log in, email verification, password reset and profile management. Nothing has to be built on a server. Every feature below is one method call on the skapi object, usually with a plain HTML form as its argument.

Login or Sign up

skapi.signup() creates an account from an email address and a password, and skapi.login() signs the user in. The session is kept by the browser, so with the autoLogin option the user is logged in again on their next visit.

Login | Sign up

Signup email verification

When an account is created with the signup_confirmation option, Skapi sends a confirmation email and the user can only log in after clicking the link in it. A logged in user can also verify their email address later with skapi.verifyEmail(), which sends a 6 digit code. A verified email address is needed to reset a forgotten password and to recover a removed account.

Sign up | Verify email

Forgot password

skapi.forgotPassword() sends a 6 digit code to the account's verified email address, and skapi.resetPassword() sets a new password with that code.

Forgot password

Change password

A logged in user changes their password with skapi.changePassword() by giving the current password and the new one.

Change password

Update account profile

skapi.updateProfile() changes the user's name, birthdate, email address and whether the email address is visible to other users.

Update profile

Remove account

skapi.disableAccount() removes the logged in user's account. The account is disabled rather than deleted right away, so it can still be recovered for a while.

Remove account

Recover account

When a removed account tries to log in, the login fails with the error code USER_IS_DISABLED. skapi.recoverAccount() then sends a recovery email to the account's verified email address, and the link in it enables the account again.

Recover account