Yes, the used API url can be adjusted when constructing the client:
import { SimpleLoginClient } from 'simplelogin-client';
const { alias } = new SimpleLoginClient({
apiKey: process.env.API_KEY,
url: 'https://app.my-selfhosted-simplelogin.io', // <-- change me
});Check the docs for more information.
This client is developed for NodeJS 24 and modern browsers.
It can run in most NodeJS versions and most browsers as well with a third-party fetch API.
It does not require any dependencies by default when used in enviroments where a global fetch API is available. This is the case for NodeJS 24 and modern browsers.
In case you want to use the client with older versions of NodeJS you may need to install a third-party fetch compliant library like node-fetch. You then just pass the fetch HTTP client into the API client:
import { SimpleLoginClient } from 'simplelogin-client';
import fetch from 'node-fetch'; // v2
const { alias } = new SimpleLoginClient({
apiKey: process.env.API_KEY,
fetchApi: fetch, // <-- insert fetch API
});Same for outdated browsers that do not support fetch with alternatives like whatwg-fetch.
Yes of course! Check the license for conditions under which this code can be used.
The client is still under heavy development. But that shouldn't scare you from already using it. It's just a dumb REST client. More API tests are being added that will help further strengthen the compliance with the SimpleLogin API. Check the README for a full list of supported features.
Still you may stumble upon bugs, wrongly configured requests, etc. The development mainly affects missing functionality to support everything the upstream API can do. During the v0.* versions you may even expect breaking changes in the client's API.
Please be so kind to report any issues or even contribute fixes.