wiyota / ic-auth-client-rs

Simple interface to get your web application authenticated with the Internet Identity Service with the Rust programming language.
https://crates.io/crates/ic-auth-client
Apache License 2.0
7 stars 2 forks source link

Expand Functionality to Desktop DApps #1

Open okwareddevnest opened 2 months ago

okwareddevnest commented 2 months ago

Raised this issue I was facing on DFINITY Forum and you gave a proposal to expand the functionality to desktop Dapps

https://forum.dfinity.org/t/internet-identity-with-rust-ui/35318/2

wiyota commented 2 months ago

To achieve this, it will be necessary to create features that can replace functions that currently depend on Browser APIs accessed through JavaScript with OS standard ones, etc., and specify them after declaring default-features = false.

The following is a list of functions that depend on JS. Please wait until I work on replacing these with non-JS in stages.

okwareddevnest commented 2 months ago

Alright thank you

wiyota commented 1 month ago

@SoftCysec

A few points about the specifications update

Storage for storing keys and delegation

If keyring is supported by the environment, use it; if not, or if the developer explicitly avoids it, use a pem file to save the key. (This is much like what dfx does)

Window to open the Identity Provider's website

The current Internet Identity specification requires a website to be hosted to open II. This site would be opened in the OS's default browser from the native app, and the results of the authentication would be sent. Kai Peacock's React Native for IC Apps tutorial has a detailed implementation.

Event listener and timeout in IdleManager

This function is not required, but if I am to provide it, to capture mouse and keyboard global events at first. To make it suitable for a particular app, you would need to develop something tailored to the framework or individual use cases. I will at least provide a trait for that.


I need to know which OS you support and what frameworks you use in order to quickly address your use case. If possible, I would also ask you to share the source code.