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

Running AliceWantsAJsonCredential.md demo results in two credentials in Alice wallet instead of one #2014

Closed
swcurran opened this issue Nov 9, 2022 · 5 comments
Assignees

Comments

@swcurran
Copy link
Contributor

swcurran commented Nov 9, 2022

Steps to replicate the problem:

  • Update ACA-Py to current main
  • Use instructions in AliceWantsAJsonCredential.md
  • Connect Faber and Alice -- retrieve Faber connection_id
  • Create a did:key for Faber -- retrieve did:key
  • Create a did:key for Alice -- retrieve did:key
  • Copy and paste suggested credential to issue from demo script into payload for /issue-credential-v2/send, with updates:
    • replace issuer with Faber's did:key
    • replace connection_id with Faber's connection id
    • replace id in credentialSubject with Alice's did:key
    • replace proofType in options with Ed25519Signature2018
  • Execute, and it should work with no errors, with the following in the Alice command line -- note the two cred_id_stored:
Alice      | Credential: state = offer-received, cred_ex_id = 3b5902a2-5c2a-437d-a4a5-c99b9cdec60c

#15 After receiving credential offer, send credential request
Alice      | Credential: state = request-sent, cred_ex_id = 3b5902a2-5c2a-437d-a4a5-c99b9cdec60c
Alice      | Credential: state = credential-received, cred_ex_id = 3b5902a2-5c2a-437d-a4a5-c99b9cdec60c
Alice      | LD Credential: message = {'cred_ex_id': '3b5902a2-5c2a-437d-a4a5-c99b9cdec60c', 'updated_at': '2022-11-09T21:40:57.839917Z', 'created_at': '2022-11-09T21:40:57.839917Z', 'cred_id_stored': '8019139808a742f2b4a66936a24994b0', 'cred_ex_ld_proof_id': '13c3800d-7150-4133-9546-7af9d65b1bda'}
Alice      | Credential: state = done, cred_ex_id = 3b5902a2-5c2a-437d-a4a5-c99b9cdec60c
Alice      | LD Credential: message = {'cred_ex_id': '3b5902a2-5c2a-437d-a4a5-c99b9cdec60c', 'updated_at': '2022-11-09T21:40:58.972811Z', 'created_at': '2022-11-09T21:40:58.972811Z', 'cred_id_stored': '27f2396bae61486ebb82f0ff9ad1c0e0', 'cred_ex_ld_proof_id': 'cce16a56-f563-4177-885d-8977de427c6e'}
    (3) Send Message
    (4) Input New Invitation
    (X) Exit?                                                                                                                            
[3/4/X]                           

Execute with an empty ({}) payload the Alice endpoint POST /credentials/W3C and see that result shows an array of two credentials -- each the same.

Shouldn't there just be one credential?

Assuming this is an issue, not sure if it is in ACA-Py (although I suspect it is) or the demo controller.

@swcurran
Copy link
Contributor Author

swcurran commented Nov 9, 2022

@shaangill025 , when you get a chance, please take a look.
@ianco -- FYI.

@ianco ianco assigned ianco and unassigned shaangill025 Nov 24, 2022
@ianco
Copy link
Contributor

ianco commented Nov 24, 2022

If you just use the menu option (option 1 to send a credential) then a single credential is issued and only a single credential is stored in Alice wallet

Looking into the instructions ...

@ianco
Copy link
Contributor

ianco commented Nov 24, 2022

I think when you use the /issue-credential-2.0/send endpoint, because it automates the flow, you are getting the duplicate because the controllers are also responding to the webhooks. So for these instructions you should only use the /issue-credential-2.0/create-offer endpoint (or else you should run alice and faber with the --no-auto option.

@swcurran what's your preference?

@swcurran
Copy link
Contributor Author

If we turn off auto processing, the presentation process will be harder, right, since that will no longer be automated? The /send on issue is kind of auto on the fly.

The create-offer sounds fine. It seems more confusing because we both have a controller and we have the --auto in ACA-Py.

Anyway -- up to you. I don't have a preference as long as it works :-)

@ianco
Copy link
Contributor

ianco commented Jan 3, 2023

Closing

@ianco ianco closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants