code: func (s *Server) initLocalAuth(ctx context.Context) (*lucictx.LocalAuth, error) {
  	// Build a sorted list of LocalAuthAccount to put into the context, grab
  	// emails from the generators.
  	ids := make([]string, 0, len(s.TokenGenerators))
  	for id := range s.TokenGenerators {
  		ids = append(ids, id)
  	}
  	sort.Strings(ids)
  	accounts := make([]lucictx.LocalAuthAccount, len(ids))
  	for i, id := range ids {
  		email, err := s.TokenGenerators[id].GetEmail()
  		switch {
  		case err == auth.ErrNoEmail:
  			email = "-"
  		case err != nil:
  			return nil, errors.Annotate(err, "could not grab email of account %q", id).Err()
  		}
  		accounts[i] = lucictx.LocalAuthAccount{ID: id, Email: email}
  	}
  
  	secret := make([]byte, 48)
  	if _, err := cryptorand.Read(ctx, secret); err != nil {
  		return nil, err
  	}
  
  	return &lucictx.LocalAuth{
  		Secret:           secret,
  		Accounts:         accounts,
  		DefaultAccountID: s.DefaultAccountID,
  	}, nil
  }
docs: // initLocalAuth generates new LocalAuth struct with RPC port blank.