That's what I did when the same happened to me. Enable iCloud Keychain on the iPad and the Mac, wait for the passwords to sync (might take a few minutes) and then open Keychain Access on the Mac and find the password on it.
See here: https://www.google.com/search?q=XYMCOOKIE+authentication