An ExpressJS API service for Udagram Users.
This packaged is maintained via the Udagram Monorepo
Current API Version: v0
.
Interface definitions:
interface User {
email: string;
password: string;
}
interface AuthenticationResponse {
token: string; // The JWT token.
user: Omit<User, 'password'>;
}
interface IAuthenticated {
auth: boolean;
}
type RegistrationResponse = AuthenticationResponse;
type LoginResponse = AuthenticationResponse & IAuthenticated;
Registers a new user.
version
- The User API version.
None
A User
instance with a unique email
value.
A RegistrationResponse
object.
Logs in using an existing user's information.
version
- The User API version.
None
A User
object representing a user that has already registered.
A LoginResponse
object.