RegistryDashboard

Authentication

User registration, login, password management, API keys, and session management. Public endpoints (register, login, forgotPassword, resetPassword) do not require authentication.

17 methods

client.auth.register()

Register a new user account.

emailrequiredstringemail

User email address.

passwordrequiredstring

User password.

idrequiredstringuuid

User ID.

emailrequiredstring

User email.

isActiverequiredboolean

Account active status.

rolerequiredUserRole

User role.

useradminsystem
createdAtrequiredstringdate-time

Creation timestamp.

register(input: RegisterInput): Promise<RegisterResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.register({ email: 'user@example.com', password: 'SecurePass123!' });

console.log(result.id);
Response Type
// Promise<RegisterResponse>
{
  id: string;
  email: string;
  isActive: boolean;
  role: UserRole;
  createdAt: string;
}

client.auth.login()

Authenticate with email and password. Returns a session token and user profile.

emailrequiredstringemail

User email address.

passwordrequiredstring

User password.

userrequiredAuthUser

Authenticated user profile.

sessionTokenrequiredstring

JWT session token.

expiresAtrequiredstringdate-time

Token expiration.

Use `client.login()` on the OpsClient instance instead — it automatically installs the session auth strategy.
login(input: LoginInput): Promise<LoginResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.login({ email: 'user@example.com', password: 'SecurePass123!' });

console.log(result.user);
Response Type
// Promise<LoginResponse>
{
  user: AuthUser;
  sessionToken: string;
  expiresAt: string;
}

client.auth.logoutAll()

Revoke all active sessions for the current user.

Requires authentication
sessionsRevokedrequirednumber

Number of sessions revoked.

logoutAll(): Promise<{ sessionsRevoked: number }>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.logoutAll();

console.log(result.sessionsRevoked);
Response Type
// Promise<{ sessionsRevoked: number }>
{
  sessionsRevoked: number;
}

client.auth.forgotPassword()

Send a password reset email. Always returns success to prevent email enumeration.

emailrequiredstringemail

User email address.

messagerequiredstring

Success message.

forgotPassword(email: string): Promise<MessageResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.forgotPassword('user@example.com');

console.log(result.message);
Response Type
// Promise<MessageResponse>
{
  message: string;
}

client.auth.resetPassword()

Reset password using a token from the forgot-password email.

tokenrequiredstring

Password reset token from email.

passwordrequiredstring

New password.

messagerequiredstring

Success message.

resetPassword(input: ResetPasswordInput): Promise<MessageResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.resetPassword({ token: 'reset-token-abc123', password: 'SecurePass123!' });

console.log(result.message);
Response Type
// Promise<MessageResponse>
{
  message: string;
}

client.auth.changePassword()

Change password for the authenticated user. Requires current password for verification.

Requires authentication
currentPasswordrequiredstring

Current password for verification.

newPasswordrequiredstring

New password.

messagerequiredstring

Success message.

changePassword(input: ChangePasswordInput): Promise<MessageResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.changePassword({ currentPassword: 'SecurePass123!', newPassword: 'SecurePass123!' });

console.log(result.message);
Response Type
// Promise<MessageResponse>
{
  message: string;
}

client.auth.setPassword()

Set a password for the first time (no current password required).

Requires authentication
passwordrequiredstring

Password to set.

messagerequiredstring

Success message.

setPassword(password: string): Promise<MessageResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.setPassword('SecurePass123!');

console.log(result.message);
Response Type
// Promise<MessageResponse>
{
  message: string;
}

client.auth.getMe()

Get the authenticated user's profile.

Requires authentication
idrequiredstringuuid

User ID.

emailrequiredstringemail

User email.

rolerequiredUserRole

User role.

useradminsystem
usernamerequiredstring | null

Display username.

namerequiredstring | null

Full name.

getMe(): Promise<AuthUser>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.getMe();

console.log(result.id);
Response Type
// Promise<AuthUser>
{
  id: string;
  email: string;
  role: UserRole;
  username: string | null;
  name: string | null;
}

client.auth.getProfile()

Get the authenticated user's full public profile.

Requires authentication
userrequiredPublicUser

Full public user profile including avatar, bio, timezone.

getProfile(): Promise<{ user: PublicUser }>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.getProfile();

console.log(result.user);
Response Type
// Promise<{ user: PublicUser }>
{
  user: PublicUser;
}

client.auth.updateProfile()

Update the authenticated user's profile fields.

Requires authentication
usernameoptionalstring | null

Display username.

nameoptionalstring | null

Full name.

biooptionalstring | null

Short bio.

timezoneoptionalstring | null

IANA timezone string.

websiteUrloptionalstring | nulluri

Website URL.

userrequiredPublicUser

Updated public user profile.

updateProfile(input: UpdateProfileInput): Promise<{ user: PublicUser }>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.updateProfile();

console.log(result.user);
Response Type
// Promise<{ user: PublicUser }>
{
  user: PublicUser;
}

client.auth.deleteAvatar()

Delete the authenticated user's avatar.

Requires authentication
deleteAvatar(): Promise<void>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.deleteAvatar();
Response Type
Promise<void>

client.auth.listApiKeys()

List all API keys for the authenticated user.

Requires authentication
idrequiredstringuuid

Key ID.

namerequiredstring | null

Key name.

lastUsedAtrequiredstring | nulldate-time

Last usage timestamp.

expiresAtrequiredstring | nulldate-time

Expiration timestamp.

createdAtrequiredstringdate-time

Creation timestamp.

listApiKeys(): Promise<PublicApiKey[]>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.listApiKeys();

console.log(result.id);
Response Type
// Promise<PublicApiKey[]>
{
  id: string;
  name: string | null;
  lastUsedAt: string | null;
  expiresAt: string | null;
  createdAt: string;
}

client.auth.createApiKey()

Create a new API key. The plaintext key is only returned once.

Requires authentication
nameoptionalstring

Optional name for the API key.

expiresAtoptionalstringdate-time

Optional expiration date.

keyrequiredstring

Plaintext API key — only shown once.

apiKeyrequiredPublicApiKey

Key metadata (id, name, createdAt).

createApiKey(input?: CreateApiKeyInput): Promise<ApiKeyCreatedResponse>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.createApiKey();

console.log(result.key);
Response Type
// Promise<ApiKeyCreatedResponse>
{
  key: string;
  apiKey: PublicApiKey;
}

client.auth.revokeApiKey()

Revoke an API key by ID.

Requires authentication
keyIdrequiredstringuuid

API key ID to revoke.

revokeApiKey(keyId: string): Promise<void>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.revokeApiKey('550e8400-e29b-41d4-a716-446655440000');
Response Type
Promise<void>

client.auth.listSessions()

List all active sessions for the authenticated user.

Requires authentication
idrequiredstringuuid

Session ID.

expiresAtrequiredstringdate-time

Session expiration.

createdAtrequiredstringdate-time

Session creation.

lastActiveAtrequiredstringdate-time

Last activity.

userAgentrequiredstring | null

Client user agent.

ipAddressrequiredstring | null

Client IP address.

listSessions(): Promise<PublicSession[]>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.listSessions();

console.log(result.id);
Response Type
// Promise<PublicSession[]>
{
  id: string;
  expiresAt: string;
  createdAt: string;
  lastActiveAt: string;
  userAgent: string | null;
  ipAddress: string | null;
}

client.auth.revokeSession()

Revoke a session by ID.

Requires authentication
sessionIdrequiredstringuuid

Session ID to revoke.

revokeSession(sessionId: string): Promise<void>
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.revokeSession('550e8400-e29b-41d4-a716-446655440000');
Response Type
Promise<void>

client.auth.getAvatar()

Fetch the current user's avatar bytes and content type.

Requires authentication
getAvatar()
typescript
import { OpsClient } from '@uluops/ops-sdk';

const client = new OpsClient({
  apiKey: 'ulr_your-api-key',
});

const result = await client.auth.getAvatar();
Response Type
Promise<{ bytes: ArrayBuffer; contentType: string }>