Authentication
Etebase automatically takes care of the encryption for you, securely deriving an encryption key from the user password. It then also creates an asymmetric keypair to login so the password never leaves the user's device.
important
Please note that all of the operations in this page are slow and may take a few seconds to complete depending on your device. This is because Etebase purposefully uses a slow function (Argon2id) to derive a secure encryption key from the user password.
Luckily they can be avoided almost entirely for most use-cases. Please take a look at session save and restore for more information.
Signup
Sign up is just one easy call which returns an instance of the main etebase class.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Login
Login is too just one easy call which returns an instance of the main etebase class.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Change password
Unlike signup and login, changing password requires an already set up etebase object.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Logout
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Session save and restore
Most apps can't, or don't want the user to enter their passwords every time they are opened, that's why Etebase supports saving and restoring sessions.
Saving and restoring a session is as simple as:
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Encrypting the stored session
While the above works, it's advised to encrypt the stored session with a randomly generated key that is stored securely (e.g. in the operating system's key store), or securely derived from a user storage password.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Email as username
In some cases you don't want a separate username, and would instead like users to be able to login using just their email address. Etebase supports this out of the box, just pass the email instead of the username in the login
and anywhere else where Etebase accepts a username.
Etebase however still needs a unique username passed to it during signup, though it can just be randomly generated. So for example, you can use the Etebase utils to generate a username like shown in this psuedo-code:
Using custom servers
Checking custom server URLs
The login and signup operations above automatically check whether the URL passed is pointing to a valid Etebase server. However, some applications need to know if the URL is pointing to a valid server before asking for credentials. This function does exactly that.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
Forcing server URL for local development
When saving etebase instances with cacheSave
the server URL is also being saved. This is not an issue in production as the URL of the server is unlikely to change, however, when developing against a local server it's often useful to force the server URL without having to login again.
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust