ceramicstudio / js-3id Goto Github PK
View Code? Open in Web Editor NEWAuthentication system for Ceramic apps that works with blockchain wallets.
License: Other
Authentication system for Ceramic apps that works with blockchain wallets.
License: Other
Spinner maybe.
As a 3Box Labs developer, I want the 3ID Connect application to be built using React instead of HTML templates so that I can add more rich functionality such as making IDX queries.
Describe the bug
Receiving a failure when trying to connect an existing 3ID in 0.1.3
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error is expected.
Versions
Produced using the web playground using @3id/[email protected]
Additional context
On "Connect to existing" vs "Create new" panel.
we have different build configs for development and deployment, add an additional for prod vs dev. We already have dev pipeline, but should be configured to use dev-unstable (probably), and didv0 migration enabled.
Sync with @zachferland on exactly what to do!
Describe the problem
3id-connect
currently only works with the Clay Testnet. As a developer, I would like to be able to get a fully isolated dev set up working.
steps to reproduce
ceramic daemon --network=inmemory
CERAMIC_API=http://localhost:7007 npm run start
in 3id-connect
good to do sooner than later, may change/break tests which took some time to get good mock data for, and best to do before more testing and everyone using with test app
Pinned docker image to hash, since we were having problems with dependencies in CI. With the pinned version we may have other issues with upgrading the test dependencies the future.
Mostly been used in desktop, no need to optimize mobile design yet, but confirm that it minimally works (visually) and that it works with major mobile wallets.
provider, rpc methods and interface for UIs to implement
It fails on setDIDProvider. The 3idconnect version is alpha 11 but it was also failing with alpha 6.
If you need more details you can see the code here: https://github.com/DistributedTown/distributed-town-skill-wallet/tree/skill-wallet-ref
const [ceramic, provider] = await Promise.all([ceramicPromise, getProvider()])
console.log('1');
await ceramic.setDIDProvider(provider)
console.log('2');
const idx = createIDX(ceramic)
Same as 3id-connect, bundle, push to s3 at another path
As a 3Box Labs developer, I want the IDX SDK integrated into 3ID Connect so that I can use it to display a DID's profile information.
the permission func is getting domain undefined on first request (not first req per domain, but first when creating local auth did data), so its not properly stored locally, then on second loading domain is passed, thinking it has no permissions, it asks again
Make explicit each case/flow that is supported, and split out clear paths in code base with descriptions
Lots of if x and y, but not z do this, etc and not clear how they map to end user flow or what condition they support.
This will make it easier for others to contribute after.
https://playwright.dev/docs/test-intro
Might be a good alternative to using Jest with Playwright, it could simplify the setup.
User story: As a developer, I want my users to enjoy a seamless and secure authentication experience so that I can increase trust with users and improve conversion in my onboarding/login flow.
Goals:
Definition of done:
We will know this initiative is done by:
Add a "Stay connected" option in the prompt so that 3ID Connect would persist the last time this consent prompt showed up and only ask for consent again at a certain frequency (every 2 weeks for example).
"background"/non-interactive auth where an app could check if it's allowed to connect directly or needs user consent (= showing user prompts), so the app's UX can be adapted accordingly.
It does load management page, and appears to load fine
seems to only be visual issue
need to make sure we can force overlay the management app in most all context
Make explicit each case/flow that is supported, and split out clear paths in code base with descriptions
Lots of if x and y, but not z do this, etc and not clear how they map to end user flow or what condition they support.
This will make it easier for others to contribute after.
Currently:
caip10 -> did
did -> seed
Not freindly for key rotations, auth data may not be necessarily either. Need to change implementation once key rotations are more widely supported and/or make additional network requests.
Describe the bug
Error: Unable to connect on ceramic popup
To Reproduce
Steps to reproduce the behavior:
import { ThreeIdConnect, EthereumAuthProvider } from '@3id/connect'
const threeIdConnect = new ThreeIdConnect()
let authProvider = new EthereumAuthProvider(window.ethereum, address)
yield threeIdConnect.connect(authProvider)
const didProvider = yield threeIdConnect.getDidProvider()
const CERAMIC_URL = "https://ceramic-clay.3boxlabs.com";
const ceramic = new Ceramic(CERAMIC_URL)
yield ceramic.setDIDProvider(didProvider)
Screenshots
Pic 1 - These APIs are getting called only, after which i get the error in Pic 2
Pic 3 and Pic 4 - Getting error on this API only for now but still other APIs are getting called which further gives the error on popup.
Ceramic versions
"@3id/connect": "^0.1.3",
"@ceramicnetwork/http-client": "^0.9.3",
"@ceramicstudio/idx": "^0.7.0",
Machine, OS, browser information (please complete the following information):
Linux,testing on Chrome and Brave only for right now.
It is now unclear if I can click on the button or not.
Related to #60
Make explicit each case/flow that is supported, and split out clear paths in code base with descriptions
Lots of if x and y, but not z do this, etc and not clear how they map to end user flow or what condition they support.
This will make it easier for others to contribute after.
I spoke to @michaelsena on Discord and they said that when a user first authenticates using 3ID Connect eventually it will automatically migrate their 3Box profile to IDX.
I'm just creating this issue to track the progress of that since MyMeta already has everyone using 3Box, and until that information can be migrated we're blocked on the migration to IDX.
Just confirm configs aligned for management app and 3id-connect, and add option to config for mainnet (consider if any other parts of deployment, ie infra will have to change as well)
The tutorial hosted here states that the Filecoin or EOS blockchains are already supported for authentication, but 3id-connect
package doesn't export any FilecoinAuthProvider
or smth similar. Do you have any additional instructions or hints about how to add authentication using Ethereum, Filecoin, Cosmos or EOS?
Most times this is instant, but the case of account already exist in network, not in local storage and first time using app will take some time and needs visual feedback
Feedback already exist for create and migrate modals, just not the permissions modal.
Text in permission modal until we have actual permissions
Determine if we are ok with any kind of customization by app in modal
When create account, combine permission modal with account create/link or just remove (will remove at least one prompt)
After authenticating with Authereum, I'm getting '{"error":"Invalid proof for signed commit"}' after the POST to https://ceramic-clay.3boxlabs.com/api/v0/commits. This happens right after my code calls this: 'await ceramic.setDIDProvider(provider)'.
Code:
const ethProvider = await web3Modal.connect()
const addresses = await ethProvider.enable()
const authProvider = new EthereumAuthProvider(ethProvider, addresses[0])
threeIdConnect = new ThreeIdConnect()
await threeIdConnect.connect(authProvider)
const didProvider = await threeIdConnect.getDidProvider()
Steps to reproduce:
Package versions:
+-- [email protected]
+-- [email protected]
+-- @ceramicnetwork/[email protected]
+-- @ceramicnetwork/[email protected]
+-- @ceramicstudio/[email protected]
+-- @portis/[email protected]
+-- @stablelib/[email protected]
+-- @testing-library/[email protected]
+-- @testing-library/[email protected]
+-- @testing-library/[email protected]
+-- @walletconnect/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- UNMET PEER DEPENDENCY [email protected] - 3
+-- [email protected]
+-- UNMET PEER DEPENDENCY popper.js@^1.16.1
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
Due to past bugs in 3box, there is a few instances where it is not easy to migrate the dids. As implemented the migration will just fail with error, and then reprompt user to create a new instead.
For known failures we can detect ahead of time, we could instead just default to creating a new did without any migration prompts. This is likley best.
Example of an account we cant easily migrate
DID owned by ADDRESS_ONE
https://ipfs.3box.io/did-doc?cid=bafyreihggvtidyvqw42hitvj3veki7wmhnchuok5mcjlosgu5532mrkcya
LINK DID -> ADDRESS_TWO
https://beta.3box.io/address-server/odbAddress/0x12396e8b57b1a64ed18aa6fc2f5fec75ba55de07
It is diffucult to make any default choices about migration (other than just create new), since the user may not want ADDRESS_TWO profile added to ADDRESS_ONE, this may have been linked by accident. And unfortunately when authenticating with ADDRESS_ONE no link will be found and a new did will be created anyways
Links support EIP1271, but signing requests for eoa signers for EIP1271 needed additional flag
ceramicnetwork/js-3id-blockchain-utils@18ae58d
Make sure this change made into new library, and that opts can get passed through authprovider. Optionally see if anyway we can support without flag, especially with when using walletconnect
Now it makes sense to replace 3id-blockchain-utils with linking utils from ceramic repo.
Reasons:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.