Skip to main content

Function: getInternetCredentials()

getInternetCredentials(server, options?): Promise<false | UserCredentials>

Fetches the internet credentials for the given server.

Parameters

server: string

The server URL.

options?: Partial<object & BaseOptions>

A keychain options object.

Returns

Promise<false | UserCredentials>

Resolves to an object containing server, username, password, and storage when successful, or false on failure.

Example

const credentials = await Keychain.getInternetCredentials('https://example.com');
if (credentials) {
console.log('Credentials loaded for user ' + credentials.username);
} else {
console.log('No credentials stored for server');
}

Defined in

index.ts:411