
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
@arcana/auth-react-native
Advanced tools
A well typed React Native library providing support for Crypto wallet Authentication on iOS and Android, including support for all currency variants.
The @arcana/auth-react-native
library will not work if you do not ensure the following:
You are using React Native version 0.60
or higher.
(iOS only) You have setup react-native iOS development environment on your machine (Will only work on Mac). If not, please follow the official React Native documentation for getting started: React Native getting started documentation.
(iOS only) You are using Xcode version 11 or higher. This will allow you to develop using iOS version 13 and higher, when the APIs for Sign In with Apple became available.
Once you're sure you've met the above, please add webview package
npm i react-native-webview
npm i @arcana/auth-react-native
(cd ios && pod install)
You will not have to manually link this module as it supports React Native auto-linking.
//A
import React, { useState } from "react";
import { Button, View } from "react-native";
import Apps from "@arcana/auth-react-native";
export default function App() {
const componentARef = React.useRef(null);
const [modalVisible, setModalVisible] = useState(false);
const handleOpenModal = () => {
setModalVisible(true);
};
const handleCloseModal = () => {
setModalVisible(false);
};
return (
<View style={{ flex: 1 }}>
<Button title="Login" onPress={handleOpenModal} />
<Apps
ref={componentARef}
visible={modalVisible}
onClose={handleCloseModal}
/>
</View>
);
}
<Apps
ref={componentARef}
getUserInfoRes ={(ev) => {
console.log('response', JSON.stringify(ev));
}}
sendDataRes = {(ev) => {
console.log('response', JSON.stringify(ev));
}}
logOutRes ={(ev) => {
console.log('response', JSON.stringify(ev));
}}
visible={modalVisible}
onClose={handleOpenModal}
clientid={'XXXXXXX'}
/>
// Returns 'user info'
const getUserInfo = data => {
if(componentARef!==null){
componentARef?.current.getUserInfo(data);
}
};
// For 'initiating transaction'
const sendTransaction = data => {
if(componentARef!==null){
componentARef?.current.sendTransaction(data);
}
};
// Returns 'account detail'
const getAccount = data => {
if(componentARef!==null){
componentARef?.current.getAccount(data);
}
};
//Global Method To send any request type
const sendRequest = (id,method,params) => {
if(componentARef!==null){
componentARef?.current.sendRequest(id,method,params);
}
};
//Logout User from session
const logOut = (id) => {
if(componentARef!==null){
componentARef?.current.logOut(id);
}
};
return (
<View style={{flex: 1}}>
<Button
title={"Get User Info"}
onPress={() =>
getUserInfo('ID')
}
/>
<Button
title={"Send Transaction"}
onPress={() =>
sendTransaction('ID',"KEY","KEY","KEY")
}
/>
<Button
title={"Get Account"}
onPress={() =>
getAccount('ID')
}
/>
<Button
title={"Send Request"}
onPress={() =>{sendRequest( 'ID',"METHOD",'PARAMS')}}
/>
<Button
title={"log out"}
onPress={() =>{logOut('ID')}}
/>
{showWebView && (
<Apps
ref={componentARef}
getUserInfoRes ={(ev) => {
//USER INFO
}}
sendTransactionRes = {(ev) => {
//GET TRANSATION UPDATE
}}
getAccountRes = {(ev) => {
//GET ACCOUNT UPDATE
}}
sendDataRes = {(ev) => {
//GET RESPONSE OF ANY GLOBAL REQUEST
}}
noNetwork={()=>{
//NETWORK PING CALLBACK (BOOLEAN)
}}
/>
)}
<Text>{textData}</Text>
</View>
);
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
oauth, social, authentication, passwordless, signup, login, web3, wallet, reactnative
FAQs
Arcana Auth React Native SDK
We found that @arcana/auth-react-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.