import React from 'react' import { Text, View, StyleSheet, Button, Alert, TextInput, Platform, } from 'react-native' import { digest, getRandomValues, createJwt, generateJwk, ExpoOAuthClient, } from 'expo-atproto-auth' import { OAuthSession } from '@atproto/oauth-client' import { Agent } from '@atproto/api' import type { ExpoKey } from 'expo-atproto-auth' const client = new ExpoOAuthClient({ clientMetadata: { client_id: 'https://hailey.at/oauth-client-metadata.json', client_name: 'React Native OAuth Client Demo', client_uri: 'https://hailey.at', redirect_uris: ['at.hailey:/auth/callback'], scope: 'atproto transition:generic', token_endpoint_auth_method: 'none', response_types: ['code'], grant_types: ['authorization_code', 'refresh_token'], application_type: 'native', dpop_bound_access_tokens: true, }, handleResolver: 'https://bsky.social', }) export default function App() { const [values, setValues] = React.useState() const [sha, setSha] = React.useState() const [jwt, setJwt] = React.useState() const [privateJwk, setPrivateJwk] = React.useState() const [session, setSession] = React.useState() const [input, setInput] = React.useState() const [agent, setAgent] = React.useState() return ( Current Account: {session ? session.did : 'No Account'} Values: {values}