auth

auth(app) returns admin.auth.Auth

Gets the Auth service for the default app or a given app.

admin.auth() can be called with no arguments to access the default app's Auth service or as admin.auth(app) to access the Auth service associated with a specific app.

Parameter

app

Optional

admin.app.App

Optional app whose Auth service to return. If not provided, the default Auth service will be returned.

Value must not be null.

Returns

non-null admin.auth.Auth The default Auth service if no app is provided or the Auth service associated with the provided app.

Examples

// Get the Auth service for the default app
var defaultAuth = admin.auth();
// Get the Auth service for a given app
var otherAuth = admin.auth(otherApp);

Interfaces