-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
export async function connectParticle(): Promise<{
loginResponse: LoginResponse;
address: string;
}> {
const connectConfig = {
account: '',
loginType: LoginType.Email,
supportAuthType: [SupportAuthType.Email],
socialLoginPrompt: SocialLoginPrompt.SelectAccount,
loginPageConfig: {
projectName: 'Yuku',
description: 'Welcome to login',
imagePath: logo,
},
};
try {
const account = await particleConnect.connect(AuthCore, connectConfig);
const { publicAddress } = account;
await particleWallet.createSelectedWallet(publicAddress, AuthCore);
const message = await getSignInMessage(account.publicAddress);
const signature = await particleConnect.signMessage(AuthCore, publicAddress, message);
const loginResponse = await verifySignInSignature(account.publicAddress, signature);
// await registerAppByInvitationCode({
// user_id: loginResponse.user_id,
// user_token: loginResponse.token,
// });
return { loginResponse, address: publicAddress };
} catch (e) {
Alert.alert('Error', JSON.stringify(e));
throw e;
}
}
android:
https://github.com/user-attachments/assets/9960378e-cc24-456b-a662-aff7a34cfd50
ios:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels