Remove wifi password

I have an app that connect to specific wifi but the macos always save password while i do not want user to remember the password. Anyway to stop or work around on it?

Answered by DTS Engineer in 864072022
i am using associate(…) of CWInterface to join the network.

Thanks.

That method ends up storing the password in both the System keychain and the data protection keychain.

Note If you’re unfamiliar with these keychain types, see TN3137 On Mac keychain APIs and implementations.

You might be able to delete the password from the System keychain, but data protection keychain access is determined by entitlements and there’s no way to gain access to the Apple keychain access group in which this item is stored, so there’s no way to delete it from there.

On iOS we have a join once mechanism, which allows you to join a network without remembering that network or its password. AFAIK macOS has no equivalent facility )-:

If you’d like to see this added in the future, I encourage you to file an enhancement request describing your requirements. And please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Please explain what API you’re using to join the network in the first place.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

i am using .associate of CWInterface to join the network. I have tried to use SecItemDelete to delete the password but it still able to connect without entering password.

i am using associate(…) of CWInterface to join the network.

Thanks.

That method ends up storing the password in both the System keychain and the data protection keychain.

Note If you’re unfamiliar with these keychain types, see TN3137 On Mac keychain APIs and implementations.

You might be able to delete the password from the System keychain, but data protection keychain access is determined by entitlements and there’s no way to gain access to the Apple keychain access group in which this item is stored, so there’s no way to delete it from there.

On iOS we have a join once mechanism, which allows you to join a network without remembering that network or its password. AFAIK macOS has no equivalent facility )-:

If you’d like to see this added in the future, I encourage you to file an enhancement request describing your requirements. And please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I submitted the enhancement request, below is the number. FB20876956

Thanks for submitting FB20876956.

Reading that through, it explains what you want but gives not details as to why you want it. I recommend that you add that context. My experience is that details like that help ERs get more traction.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Remove wifi password
 
 
Q