To add an application to the auth environment you use the addApplication() method of the authManager object returned by auth.setup(). 
For example,  using the authManager object created in the example above:
authManager.addApplication('app')
See About this document... for information on suggesting changes.