summaryrefslogtreecommitdiff
path: root/app/utils/keychain.ts
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
committerKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
commitf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch)
tree575c0ff2cbb846252bd2e494c81c396846aab2f6 /app/utils/keychain.ts
parent67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff)
Apply Prettier
Diffstat (limited to 'app/utils/keychain.ts')
-rw-r--r--app/utils/keychain.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/utils/keychain.ts b/app/utils/keychain.ts
index 34774bb..86fae6f 100644
--- a/app/utils/keychain.ts
+++ b/app/utils/keychain.ts
@@ -1,4 +1,4 @@
-import * as ReactNativeKeychain from "react-native-keychain"
+import * as ReactNativeKeychain from 'react-native-keychain'
/**
* Saves some credentials securely.
@@ -7,7 +7,11 @@ import * as ReactNativeKeychain from "react-native-keychain"
* @param password The password
* @param server The server these creds are for.
*/
-export async function save(username: string, password: string, server?: string) {
+export async function save(
+ username: string,
+ password: string,
+ server?: string,
+) {
if (server) {
await ReactNativeKeychain.setInternetCredentials(server, username, password)
return true
@@ -31,7 +35,7 @@ export async function load(server?: string) {
}
} else {
const creds = await ReactNativeKeychain.getGenericPassword()
- if (typeof creds === "object") {
+ if (typeof creds === 'object') {
return {
username: creds.username,
password: creds.password,