Connect to saved wifi network without user auth

Hi! I'm trying to prototype a macOS app related to wifi features. The main hiccup I've encountered is "Connect to a saved network without re-entering the network password".

So far I've been unsuccessful in this without

  1. entering the password manually each time
  2. asking the user for authentication to access the saved network in keychain

I read somewhere on the internet that CWInterface.associate would use saved credentials automatically if you gave a nil password, but my attempts have proven that to be false.

Is this not currently available because it raises security concerns, or it just hasn't been considered? Or am I missing a way to do this? I don't need access to the credentials, just for the system to connect for me.

Connect to saved wifi network without user auth
 
 
Q