react-native-credentials-manager
Version:
A React Native library that implements the Credential Manager API for Android. This library allows you to manage passwords and passkeys in your React Native applications.
32 lines • 1.53 kB
TypeScript
import type { Credential, GoogleCredential, AppleCredential, SignInOption, PasskeyCredential, PasswordCredential } from './NativeCredentialsManager';
type GoogleSignInParams = {
nonce?: string;
serverClientId: string;
autoSelectEnabled?: boolean;
};
type AppleSignInParams = {
nonce?: string;
requestedScopes?: ('fullName' | 'email')[];
};
type CredentialMap = {
'passkeys': PasskeyCredential;
'password': PasswordCredential;
'google-signin': GoogleCredential;
'apple-signin': AppleCredential;
};
type SignInResult<T extends readonly SignInOption[]> = CredentialMap[T[number]];
export declare function signUpWithPasskeys(requestJson: Object, preferImmediatelyAvailableCredentials?: boolean): Promise<Object>;
export declare function signUpWithPassword({ username, password, }: {
username: string;
password: string;
}): Promise<Object>;
export declare function signIn<T extends readonly SignInOption[]>(options: T, params: {
passkeys?: Object;
googleSignIn?: GoogleSignInParams;
appleSignIn?: AppleSignInParams;
}): Promise<SignInResult<T>>;
export declare function signUpWithGoogle(params: GoogleSignInParams): Promise<GoogleCredential>;
export declare function signUpWithApple(params?: AppleSignInParams): Promise<AppleCredential>;
export declare function signOut(): Promise<null>;
export type { Credential, GoogleCredential, AppleCredential, SignInOption, GoogleSignInParams, AppleSignInParams, PasskeyCredential, PasswordCredential, };
//# sourceMappingURL=index.d.ts.map