The domain is used when setting HTTP authentication cookies in a user's browser. If this attribute is not correct, single sign-on will not work when the user switches between applications.
When developing on your local machine, the domain should be set to localhost.
If you wish to have single sign-on (SSO) support for *.mydomain.com, you will need to set the domain to .mydomain.com. Please note the full stop ('.') before the top-level-domain.