Web3Auth / web3auth-wagmi-connector

Web3Auth connector for wagmi
26 stars 23 forks source link

Implement Dynamic ID and Name for Web3Auth Connectors Based on Login Providers #136

Closed matteocelani closed 2 days ago

matteocelani commented 4 months ago

This update introduces the ability to dynamically assign IDs and display names to Web3Auth connectors based on the specified login provider. This enhancement simplifies the management of multiple connectors in a single application, providing clearer identification and better usability in client-side implementations.

Key Changes:

Benefits:

Example Usage:

Before:

const connector = Web3AuthConnector({ loginProvider: 'google' });
// Previously, this would default to generic IDs and names.

After:

const connector = Web3AuthConnector({ loginProvider: 'google' });
// Now, the connector ID and name will be "google" and "Google", respectively.

This update does not introduce breaking changes to existing implementations but extends the functionality to support a more structured and maintainable approach when dealing with various Web3Auth connectors.

yashovardhan commented 2 days ago

Thanks for your PR, as per suggestion in #128 we are thinking of adding in the name and id parameters separately in the latest update to the connector.