Open johnsmith-gooddollar opened 1 year ago
Log messages shape:
{
type: <one of log levels, lowecased> https://github.com/jonnyreeves/js-logger/blob/master/src/logger.js#L50,
name: <name of the component, hook or api/service>
messages: [array, of, args, been, logged]
}
Event shape:
{
type: 'event',
event: <one of the GD analytics events predefined> https://github.com/GoodDollar/GoodDAPP/blob/master/src/lib/analytics/constants.js,
data?: <custom data object>
}
Not that implementation is strictly tied to RN WebView. Data is sent/received as JSON-stringified text
Example app:
import React, { useMemo, useEffect, useCallback } from 'react';
import { useColorScheme, SafeAreaView, ScrollView, StatusBar, View, Text, Dimensions } from 'react-native'
import { WebView } from 'react-native-webview'
function App(): JSX.Element {
const { width, height } = useMemo(() => Dimensions.get('window'), [])
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {
backgroundColor: isDarkMode ? '#222' : '#444',
};
const webViewStyle = {
flex: 1,
backgroundColor: '#fff',
width,
height,
}
const onMessage = useCallback(({ nativeEvent }) => console.log(JSON.parse(nativeEvent.data)), [])
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}
>
<WebView
style={webViewStyle}
title={"GoodDollar Wallet"}
source={{ uri: "https://delta.gooddollar.org" }}
scrollEnabled={true}
originWhitelist={['*']}
onMessage={onMessage}
/>
</ScrollView>
</SafeAreaView>
);
}
export default App;
To allow send form iframe - ask me for updated solution @peterfo-tr @sunela-tr Also ask me regarding handling urls (deep links ?)
I see GOTO_CHOOSEAUTH and SIGNIN_METHOD_SELECTED but don’t immediately see an event when the user actually signed in and the below screen is displayed. Is there one I should see?
Will give an answer during the day. In short words - as we’re reloading app after login/logout there’s two options a) to handle last screen of auth flow (when you just have logged) b) to handle AppRouter effect tracking isLoggedIn (after app been reloaded) I’ll search for proper events or debug logs to track
Breaking changes
{
type: 'identify',
email: user's email
identifier?: user's ID (only for signed users, not available during signup)
signup: true|false
}
About your issue
@johnsmith-gooddollar added domain to pokt and mongodb
@sirpy Thanks. Checked Google & FB, awaiting for eToro's confirmation
@sirpy they have issues with password less:
It seems delta.gooddollar.org still not enabled on 0auth PROD redirect uri should be exactly like for wallet.gooddollar.org just domain is delta. https://wallet.gooddollar.org/Welcome/Auth is used for Torus as I remember so it should be https://delta.gooddollar.org/Welcome/Auth
Issues