/// <summary>
        /// Sends a 401 on failure of firebase identity verification
        /// </summary>
        /// <param name="context"></param>
        /// <param name="exception"></param>
        /// <returns></returns>
        private static Task HandleFirebaseAuthExceptionAsync(HttpContext context, Exception exception)
        {
            context.Response.ContentType = "application/json";
            context.Response.StatusCode  = (int)HttpStatusCode.Unauthorized;

            return(context.Response.WriteAsync(exception.AggregateExceptionMessages()));
        }