-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Request
Some developers would like to be able to use Stoic or Plug in their dApp for authentication purposes.
Notes
This feature request concerns a "login flow" and not a "wallet signature flow."
Links
- Previous Plug Wallet issue Plug wallet integration (?) #31
- Previous Stoic issue stoic-wallet for login #154
- Forum thread
- Example of implementation in DecentralizedAIonIC repo
Technical notes
- The Stoic Identity library seems to be unmaintained for a few years and lacks best practices.
- Plug Wallet is somewhat of a black box as it is unclear where its source code is and if it is even open source.
- While requesting a connection with these libraries seems straightforward, it is unclear if they expose the generated identity and, more importantly, if it is possible to initialize actors using it without using the actor interfaces they expose.
- Both libraries require access to the
window
object, and it is unclear if the libraries offer up-to-date TypeScript support.
Conclusion
While it seems feasible to implement a login flow with these methods, it is still unclear if there is significant demand within the IC ecosystem for such flows. On the forum, only one project communicated that they implemented such flows, and on Discord, two developers shared their interest in such a feature.
Given the above technical notes, it is clear that in the current state, these libraries cannot be incorporated into the core of Juno's libraries. However, the core can be reworked to expose interfaces and patterns that could be used by consumers, allowing developers to provide their own authentication providers. We can share some snippets to ease the integration, adopting a "bring your own authentication" approach.
While this seems straightforward on paper, in addition to the feature itself, it likely requires a significant refactoring.