Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
IhsotasTon opened this issue Sep 26, 2024 · 0 comments
Open

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

IhsotasTon opened this issue Sep 26, 2024 · 0 comments

Comments

@IhsotasTon
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant