Add base project

Implement auth method
This commit is contained in:
coreyphillips
2024-09-11 22:03:27 -04:00
parent 66649117dc
commit b03d04ccc4
192 changed files with 54913 additions and 3 deletions

37
example/src/App.tsx Normal file
View File

@@ -0,0 +1,37 @@
import { StyleSheet, View, Button } from 'react-native';
import { auth } from 'react-native-pubky';
export default function App() {
return (
<View style={styles.container}>
<Button
title={'auth'}
onPress={async (): Promise<void> => {
try {
const res = await auth('pubkyAuthUrl', 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855');
if (res.isErr()) {
console.log(res.error.message);
return;
}
console.log(res.value);
} catch (e) {
console.log(e);
}
}}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: 60,
height: 60,
marginVertical: 20,
},
});