Can my redirect server be on localhost?

No it cannot. When you register your application with an OAuth provider, the provider will need to contact your redirect server. Therefore, the redirect server needs to be available to the internet.

See more details about how the OAuth flow works from Unity here:‚Äč