@ovok/native/next

The native `Ovok` client built on `@ovok/core/next`, with secure-store token storage.

  • Stable unknown
  • Release candidate since 1.16.1-rc.3
  • Development since 1.16.1-dev.2111+9796905

The native Ovok client built on @ovok/core/next, with secure-store token storage.

Import from @ovok/native/next.

Classes

Ovok

The @ovok/core/next client with the session kept in the device's secure store.

Extends

  • Ovok

Constructors

Constructor
new Ovok(config): Ovok;
Parameters
ParameterType
configOvokNativeConfig
Returns

Ovok

Overrides

CoreOvok.constructor

Properties

PropertyModifierTypeDescription
baseUrlreadonlystringBase URL of the Ovok API, with a trailing slash.
storagereadonlyOvokStorageSecure store backed session storage.
tenantCodereadonlystringTenant code the client was configured with.

SecureStoreStorage

Splits each value across numbered entries and keeps the count under the key itself.

Implements

  • OvokStorage

Constructors

Constructor
new SecureStoreStorage(store, options?): SecureStoreStorage;
Parameters
ParameterType
storeOvokSecureStore
options?Record<string, unknown>
Returns

SecureStoreStorage

Methods

getItem()
getItem(key): Promise<string | null>;

Returns the stored value, or null when it is missing, incomplete or unreadable.

Parameters
ParameterType
keystring
Returns

Promise<string | null>

Implementation of

OvokStorage.getItem

removeItem()
removeItem(key): Promise<void>;

Deletes the value and all of its chunks.

Parameters
ParameterType
keystring
Returns

Promise<void>

Implementation of

OvokStorage.removeItem

setItem()
setItem(key, value): Promise<void>;

Stores the value in chunks and removes leftover chunks of the previous value.

Parameters
ParameterType
keystring
valuestring
Returns

Promise<void>

Implementation of

OvokStorage.setItem

Interfaces

OvokSecureStore

The part of expo-secure-store the storage needs; the host app passes the module in.

Properties

PropertyTypeDescription
deleteItemAsync(key, options?) => Promise<void>Deletes the entry for a key.
getItemAsync(key, options?) => Promise<string | null>Reads the stored string for a key, or null when absent.
setItemAsync(key, value, options?) => Promise<void>Stores a string under a key.

Type Aliases

OvokNativeConfig

type OvokNativeConfig = Omit<UserClientConfig, "storage" | "clientSecret"> & object;

No clientSecret: anything shipped inside an app can be extracted from it.

Type Declaration

NameTypeDescription
getRandomValues?RandomValuesSourceFills a byte array with random values; used when the runtime has no crypto.getRandomValues.
secureStoreOvokSecureStoreThe expo-secure-store module (or a compatible store) that holds the session.
secureStoreOptions?Record<string, unknown>Options passed to every secure store call, such as keychain accessibility.

RandomValuesSource

type RandomValuesSource = (array) => Uint8Array;

Fills the array with cryptographically secure random bytes and returns it.

Parameters

ParameterType
arrayUint8Array

Returns

Uint8Array

Last updated on

On this page