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

Cannot see my keychain in iCloud #156

Open
RoMay opened this issue Oct 15, 2018 · 8 comments · May be fixed by #497
Open

Cannot see my keychain in iCloud #156

RoMay opened this issue Oct 15, 2018 · 8 comments · May be fixed by #497

Comments

@RoMay
Copy link

RoMay commented Oct 15, 2018

All seems to work as expected. My question is:
Is there a way to see the generated keychain, perhaps via Keychain Access.app or in iCloud?

Thanks for any suggestion.

@RoMay
Copy link
Author

RoMay commented Oct 24, 2018

Still trying to figure out how to synchronise the keys with iCloud.

@oblador @vonovak @pcoltau is it supported by the library at all? I would really appreciate any advice here.

@msiryk
Copy link

msiryk commented Oct 25, 2018

I have the same problem. Is it possible to do something
img_2102
like that (screenshot)?

@hellogerard
Copy link

Same question. I would expect that setting a generic password or internet credentials would save to keychain, sync to iCloud, then show up in Keychain Access. But it does not. What am I missing?

@hellogerard
Copy link

Figured it out. Any keychain operations require the kSecAttrSynchronizable attribute to be true to operate on an iCloud-synced entry. Here is the line I had to add everywhere:

  (__bridge NSString *)kSecAttrSynchronizable: (__bridge id)(kCFBooleanTrue),

Here is the relevant Apple Dev doc on adding a password keychain entry.

@hellogerard
Copy link

I have a fork which adds a synchronized option to all the methods. Keep in mind that you have to have this option on all function calls which might operate on an entry. That is, if you create an entry using synchronized, you have to remove the entry with synchronized set. I take no responsibility for this work, so use at your own risk. This commit has all the changes.

hellogerard@e2959be

Once you have a Keychain entry syncing, you can see it the Keychain Access app for Mac OS (assuming you have iCloud Keychain enabled on your phone and the same Apple ID, etc, etc).

@taschik
Copy link

taschik commented Sep 27, 2019

@hellogerard thanks for finding out, however I can't get it to work for me. Every time I call it like this:

const { email, password } = this.props
const synchronized = true
await Keychain.setGenericPassword(email, password, {
      accessControl,
      accessible,
      synchronized,
    })

I get : Error: One or more parameters passed to a function where not valid.

I used your fork to install the package. do you see the modal popping up as in your screenshot now, or do you have to build this yourself and just save it in the background. I try to achieve the same and would love to understand what the best practice for this is. Thanks so much in advance!

@mrousavy
Copy link
Sponsor

I'm in the same situation. I'm trying to securely store a password for an app in iCloud, so that the user can login when he switches phones.

Has anyone here achieved this?

@sopianguyen
Copy link

Likewise. We are thinking of using this library for a feature we hope to build soon, but the difficulty in syncing the saved-keychain credentials with iCloud is a hinderance. It seems this PR will resolve it, but it needs a review and clarification from @oblador when he has time? 🙏 #497

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

Successfully merging a pull request may close this issue.

6 participants