All right we’ve got some exciting news on Plug.
V0.2.1 (download it here) is out with a big addition, key for Plug-app integrations… The PlugAgent!
As of V0.2.1, devs can integrate Plug into their apps to support it as an authentication provider, and proxy-sign canister requests with the user’s identity in Plug. That’s done interacting with Plug through the IC Provider API in the browser’s window object, and through there using the PlugAgent (a proxy for DFINITY’s agent-js agent module).
Meaning users could now sign into any integrated IC app from their wallet in Plug, with a click in a confirmation pop-up, and interact with your app smoothly (while in the background you sign the necessary canister request through the agent). And since their identity is also their wallet, apps could surface/interact with the user’s balances too (e.g. trigger a transaction based on an app action).
Here’s the full brief and breakdown
There’s also a second surprise we built to showcase all of this live… The Coinflip game app! A demo app build that’s integrated to support Plug as an auth option, with a simple coinflip guess game, and a leaderboard/ranking of users.
That’s all it takes to authenticate a user using their wallet in Plug as their identity (their Principal ID)
Any feedback on the integration flow, the interactions with the IC Provider API, and the PlugAgent is welcome You can see how to integrate it here, or use one of our reference app examples / implementations as a guide. We also created a template/package for that “Connect to Plug” button seen above, ready to go.