Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.