You already can access cookies with the
secure flag the same way you can access cookies without this flag. The only difference is, that cookies with the
secure flag can't be accessed if you request a page via HTTP instead of HTTPS.
If you don't see them using
document.cookie then you likely either didn't request the page via HTTPS, or the
HttpOnly flag is not set and you do request the page via HTTPS, then the problem must be elsewhere, such as the current domain or path not matching the one specified on the cookie.)