A react-native wrapper for VGS Show for displaying secure information using a proxy.
npm install vgs-show-react-native
import VgsShowAttribute from 'vgs-show-react-native';
// ...
const vgsShow = React.useRef<VgsShowAttribute> = null;
<VgsShowAttribute
ref={vgsShow}
initParams={{
environment: ENV,
vaultId: VAULT_ID,
// optional, if needed for the upstream service
customHeaders: {
Authorization: 'Bearer ' + customerToken,
},
}}
contentPath="data.attributes.pan"
placeholder="Value will appear here"
style={styles.box}
/>;
// To trigger reveal:
<Button onPress={vgsShow.current?.reveal(PATH, METHOD, CUSTOM_PAYLOAD)}>
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT