cleanup, debug code
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@
|
|||||||
"react-native": "^0.79.3",
|
"react-native": "^0.79.3",
|
||||||
"react-native-compressor": "^1.11.0",
|
"react-native-compressor": "^1.11.0",
|
||||||
"react-native-date-picker": "^5.0.12",
|
"react-native-date-picker": "^5.0.12",
|
||||||
"react-native-device-attest": "^0.1.4",
|
"react-native-device-attest": "^0.1.5",
|
||||||
"react-native-drawer-layout": "^4.1.8",
|
"react-native-drawer-layout": "^4.1.8",
|
||||||
"react-native-edge-to-edge": "^1.6.0",
|
"react-native-edge-to-edge": "^1.6.0",
|
||||||
"react-native-gesture-handler": "2.25.0",
|
"react-native-gesture-handler": "2.25.0",
|
||||||
|
|||||||
Vendored
+7
@@ -78,3 +78,10 @@ export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN
|
|||||||
*/
|
*/
|
||||||
export const BITDRIFT_API_KEY: string | undefined =
|
export const BITDRIFT_API_KEY: string | undefined =
|
||||||
process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
|
process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GCP project ID which is required for device attestation
|
||||||
|
*/
|
||||||
|
export const GCP_PROJECT_ID: number = Number(
|
||||||
|
process.env.EXPO_PUBLIC_GCP_PROJECT_ID,
|
||||||
|
)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ const ALLOWED_HOSTS = [
|
|||||||
'js.hcaptcha.com',
|
'js.hcaptcha.com',
|
||||||
'newassets.hcaptcha.com',
|
'newassets.hcaptcha.com',
|
||||||
'api2.hcaptcha.com',
|
'api2.hcaptcha.com',
|
||||||
|
'e9755d3e012b.ngrok.app',
|
||||||
]
|
]
|
||||||
|
|
||||||
export function CaptchaWebView({
|
export function CaptchaWebView({
|
||||||
@@ -29,12 +30,13 @@ export function CaptchaWebView({
|
|||||||
onError: (error: unknown) => void
|
onError: (error: unknown) => void
|
||||||
}) {
|
}) {
|
||||||
const redirectHost = React.useMemo(() => {
|
const redirectHost = React.useMemo(() => {
|
||||||
if (!state?.serviceUrl) return 'bsky.app'
|
return 'e9755d3e012b.ngrok.app'
|
||||||
|
// if (!state?.serviceUrl) return 'bsky.app'
|
||||||
return state?.serviceUrl &&
|
//
|
||||||
new URL(state?.serviceUrl).host === 'staging.bsky.dev'
|
// return state?.serviceUrl &&
|
||||||
? 'staging.bsky.app'
|
// new URL(state?.serviceUrl).host === 'staging.bsky.dev'
|
||||||
: 'bsky.app'
|
// ? 'staging.bsky.app'
|
||||||
|
// : 'bsky.app'
|
||||||
}, [state?.serviceUrl])
|
}, [state?.serviceUrl])
|
||||||
|
|
||||||
const wasSuccessful = React.useRef(false)
|
const wasSuccessful = React.useRef(false)
|
||||||
@@ -52,7 +54,7 @@ export function CaptchaWebView({
|
|||||||
if (wasSuccessful.current) return
|
if (wasSuccessful.current) return
|
||||||
|
|
||||||
const urlp = new URL(e.url)
|
const urlp = new URL(e.url)
|
||||||
if (urlp.host !== redirectHost) return
|
if (urlp.host !== redirectHost || urlp.pathname === '/gate/signup') return
|
||||||
|
|
||||||
const code = urlp.searchParams.get('code')
|
const code = urlp.searchParams.get('code')
|
||||||
if (urlp.searchParams.get('state') !== stateParam || !code) {
|
if (urlp.searchParams.get('state') !== stateParam || !code) {
|
||||||
|
|||||||
@@ -28,8 +28,9 @@ import {Divider} from '#/components/Divider'
|
|||||||
import {LinearGradientBackground} from '#/components/LinearGradientBackground'
|
import {LinearGradientBackground} from '#/components/LinearGradientBackground'
|
||||||
import {InlineLinkText} from '#/components/Link'
|
import {InlineLinkText} from '#/components/Link'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {GCP_PROJECT_ID} from '#/env'
|
|
||||||
import * as bsky from '#/types/bsky'
|
import * as bsky from '#/types/bsky'
|
||||||
|
import {GCP_PROJECT_ID} from '#/env'
|
||||||
|
import {logger} from '#/logger'
|
||||||
|
|
||||||
export function Signup({onPressBack}: {onPressBack: () => void}) {
|
export function Signup({onPressBack}: {onPressBack: () => void}) {
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
@@ -106,10 +107,14 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
|
|||||||
|
|
||||||
// On Android, warmup the Play Integrity API on the signup screen so it is ready by the time we get to the gate screen.
|
// On Android, warmup the Play Integrity API on the signup screen so it is ready by the time we get to the gate screen.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log('here...')
|
||||||
if (!isAndroid) {
|
if (!isAndroid) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ReactNativeDeviceAttest.warumpIntegrity(GCP_PROJECT_ID)
|
console.log('TRYING TO WARMUP')
|
||||||
|
ReactNativeDeviceAttest.warmupIntegrity(GCP_PROJECT_ID).catch(err =>
|
||||||
|
logger.error(err),
|
||||||
|
)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -16787,10 +16787,10 @@ react-native-date-picker@^5.0.12:
|
|||||||
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-5.0.12.tgz#12540b6a58500811ee7e4fc0244e3accc7cca9c1"
|
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-5.0.12.tgz#12540b6a58500811ee7e4fc0244e3accc7cca9c1"
|
||||||
integrity sha512-R/mUnCKhcuxbhKPFwYdBQCxQt9HHLqpM4ruRUqlcBjiUZ3N2wdnwOMyc888Ps8qp8e7v29PrDHtUlG8LPuFn9w==
|
integrity sha512-R/mUnCKhcuxbhKPFwYdBQCxQt9HHLqpM4ruRUqlcBjiUZ3N2wdnwOMyc888Ps8qp8e7v29PrDHtUlG8LPuFn9w==
|
||||||
|
|
||||||
react-native-device-attest@^0.1.4:
|
react-native-device-attest@^0.1.5:
|
||||||
version "0.1.4"
|
version "0.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-device-attest/-/react-native-device-attest-0.1.4.tgz#221860443765422f6dfebf4d868f367cda2a61b1"
|
resolved "https://registry.yarnpkg.com/react-native-device-attest/-/react-native-device-attest-0.1.5.tgz#437cb0ff955d7457f7e27cb41bfd8be89481b965"
|
||||||
integrity sha512-jFogWXXl3NBEAA3U+f1NQwdeIysCu6bGEmMGzz6gw4uipe6ELxZmovx64cJJHessZs1gjYDaUcbXGncirwykYg==
|
integrity sha512-TNmsN00vUqmPB1rw1HlnefCwC7Sc4IYPkEwPjM0CRtHKnxS/mSfr3E+Swch9jRQlwoWPfSHNSvXB3w4aP0Rzfw==
|
||||||
|
|
||||||
react-native-dotenv@^3.4.11:
|
react-native-dotenv@^3.4.11:
|
||||||
version "3.4.11"
|
version "3.4.11"
|
||||||
|
|||||||
Reference in New Issue
Block a user