code: func GetState(c context.Context) State {
  	if s, ok := c.Value(stateContextKey(0)).(State); ok && s != nil {
  		return s
  	}
  	if getConfig(c) != nil {
  		return backgroundState{c}
  	}
  	return nil
  }
docs: // GetState return State stored in the context by 'Authenticate' call, the
  // background state if 'Authenticate' wasn't used or nil if the auth library
  // wasn't configured.
  //
  // The background state roughly is similar to the state of anonymous call.
  // Various background non user-facing handlers (crons, task queues) that do not
  // use 'Authenticate' see this state by default. Its most important role is to
  // provide access to authdb.DB (and all functionality that depends on it) to
  // background handlers.