How to generate nonce from client-side Javascript

Can’t you just redirect the user to the magic URL that triggers SSO?
I’m not sure what the URL is and cannot check right now, it’s something like /session/sso.