let client: ReturnType<typeof createAuthClient> | undefined
export function getAuth() {
if (!client) {
const baseURL = storage.getString(STORAGE_KEYS.SERVER_URL)
client = createAuthClient({
baseURL,
plugins: [
expoClient({
scheme: 'dev.entro.kaisho',
storagePrefix: 'dev.entro.kaisho',
storage: SecureStore
}),
usernameClient()
]
})
}
return client
}
let client: ReturnType<typeof createAuthClient> | undefined
export function getAuth() {
if (!client) {
const baseURL = storage.getString(STORAGE_KEYS.SERVER_URL)
client = createAuthClient({
baseURL,
plugins: [
expoClient({
scheme: 'dev.entro.kaisho',
storagePrefix: 'dev.entro.kaisho',
storage: SecureStore
}),
usernameClient()
]
})
}
return client
}