fix fetchreds

This commit is contained in:
Violet Caulfield
2024-10-15 11:05:33 -05:00
parent 4021abb972
commit 336e1cd6d9
2 changed files with 17 additions and 8 deletions

View File

@@ -12,16 +12,15 @@ export const fetchCredentials : () => Promise<Keychain.SharedWebCredentials> = (
console.debug(`REMOVE THIS::Server Url ${serverUrl}`);
if (!_.isNull(serverUrl))
Keychain.getInternetCredentials(serverUrl!)
.then((keychain) => {
if (!keychain)
reject(new Error("Unable to retrieve credentials for server address"))
if (_.isNull(serverUrl))
throw new Error("Unable to retrieve credentials without a server URL");
resolve(keychain as Keychain.SharedWebCredentials)
})
const keychain = await Keychain.getInternetCredentials(serverUrl!);
throw new Error("Unable to retrieve credentials without a server URL");
if (!keychain)
throw new Error("Unable to retrieve credentials for server address from keychain");
resolve(keychain as Keychain.SharedWebCredentials)
});
export const fetchServerUrl : () => Promise<string> = () => new Promise(async (resolve, reject) => {

View File

@@ -0,0 +1,10 @@
import React from "react";
import { View } from "react-native-ui-lib";
export default function SignOut(): React.JSX.Element {
return (
<View>
</View>
)
}