Skip to content

It doesn't work on Android but it works on iOS #30

@IhsotasTon

Description

@IhsotasTon
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:
![20240926-111525](https://github.com/user-attachments/assets/c158b766-6d07-4a25-84f7-f899172c1faf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions