Introduction
Setup
Guides
API & Troubleshooting
Guides
Password Authentication
Authenticate users with passwords in React Native and Expo applications
Para supports password-based authentication as an alternative to passkeys. When users choose password authentication, they are redirected to Paraβs secure web interface to create or enter their password.
Implementation
Copy
Ask AI
import InAppBrowser from 'react-native-inappbrowser-reborn';
// After email/phone verification, if authState has passwordUrl
if (authState.passwordUrl) {
const APP_SCHEME = 'your-app-scheme';
const APP_SCHEME_REDIRECT_URL = `${APP_SCHEME}://para`;
// Redirect to password creation/login
await InAppBrowser.openAuth(authState.passwordUrl, APP_SCHEME_REDIRECT_URL);
// For new users creating password
await para.waitForWalletCreation({});
// For existing users logging in
await para.waitForLogin({});
onSuccess();
}
Copy
Ask AI
import InAppBrowser from 'react-native-inappbrowser-reborn';
// After email/phone verification, if authState has passwordUrl
if (authState.passwordUrl) {
const APP_SCHEME = 'your-app-scheme';
const APP_SCHEME_REDIRECT_URL = `${APP_SCHEME}://para`;
// Redirect to password creation/login
await InAppBrowser.openAuth(authState.passwordUrl, APP_SCHEME_REDIRECT_URL);
// For new users creating password
await para.waitForWalletCreation({});
// For existing users logging in
await para.waitForLogin({});
onSuccess();
}
Copy
Ask AI
import { openAuthSessionAsync } from 'expo-web-browser';
// After email/phone verification, if authState has passwordUrl
if (authState.passwordUrl) {
const APP_SCHEME = 'your-app-scheme';
const APP_SCHEME_REDIRECT_URL = `${APP_SCHEME}://para`;
// Redirect to password creation/login
await openAuthSessionAsync(authState.passwordUrl, APP_SCHEME_REDIRECT_URL);
// For new users creating password
await para.waitForWalletCreation({});
// For existing users logging in
await para.waitForLogin({});
onSuccess();
}
On this page
Assistant
Responses are generated using AI and may contain mistakes.