You can view the valid redirect URLs for your portal by going to:
https://<fqdn>/<PortalWebAdaptor>/portaladmin/security/oauth/getAppInfo?appID=arcgisonline&f=html
You can view the current redirect URL being used if you select "copy URL" for the sign-in button (or cancel the webpage quickly before it errors) it looks like this:
redirect_uri=https%3A%2F%2F<FQDN>%2FWebAdaptorName%2Fhome%2Faccountswitcher-callback.html
A word of warning, you should access the Portal using the designed/intended URL. If you manage to allow another redirect to browse the portal, creating content (if it allows you) with this alternative URL will bind the content to this URL and make the content unusable via the designed URL.
"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."