Skip to content

Commit

Permalink
chore: expose app check JWT to debug menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Nov 16, 2023
1 parent 753a8ec commit 1004126
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/screens/developer-screen/developer-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { StackNavigationProp } from "@react-navigation/stack"
import { RootStackParamList } from "@app/navigation/stack-param-lists"
import { useIsAuthed } from "@app/graphql/is-authed-context"
import { ScrollView } from "react-native-gesture-handler"
import { getAppCheckToken } from "../get-started-screen/use-device-token"

gql`
query debugScreen {
Expand Down Expand Up @@ -113,6 +114,14 @@ export const DeveloperScreen: React.FC = () => {
}
}, [newGaloyInstance, currentGaloyInstance, token])

const [appChecktoken, setAppCheckToken] = React.useState<string | undefined>()

React.useEffect(() => {
;(async () => {
setAppCheckToken(await getAppCheckToken())
})()
}, [])

const openInAppBrowser = async () => {
try {
if (await InAppBrowser.isAvailable()) {
Expand Down Expand Up @@ -403,6 +412,7 @@ export const DeveloperScreen: React.FC = () => {
/>
</>
)}
<Text selectable>{appChecktoken}</Text>
</View>
</View>
</ScrollView>
Expand Down

0 comments on commit 1004126

Please sign in to comment.