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

Add II login to Candid UI for authenticated calls #474

Open
Web3NL opened this issue Oct 8, 2023 · 2 comments
Open

Add II login to Candid UI for authenticated calls #474

Web3NL opened this issue Oct 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Web3NL
Copy link
Contributor

Web3NL commented Oct 8, 2023

Requires a canister to implement http_request method and serve /.well-known/ii-alternative-origins with https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io as an origin, as I currently understand.

If this is a good idea and there is support for this feature, I'm willing to start working on a PR.

@Web3NL Web3NL added the enhancement New feature or request label Oct 8, 2023
@chenyan-dfinity
Copy link
Contributor

Sounds like a good feature. Looking forward to your PR :)

@Web3NL
Copy link
Contributor Author

Web3NL commented Oct 9, 2023

See this demo and forked repo

For testing I have a canister with:

http_request query method with update = ?true (see upgrade to update)

http_request_update and serves /.well-known/ii-alternative-origins with my self deployed candid ui canister as an alternative origin

hello query method that only answers if caller = allowed

setter and getter for var allowed: Principal

To test:
Open the demo

Query the hello method. This should give an error

Login with your II and copy your principal id

Paste in _set_allowed_principal and submit

Query the hello method

Next steps
Some more testing (hopefully local Docker testing with Selenium for local alternative origins testing)
UI touches
Gather feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants