(ctx context.Context, userID string)
| 236 | } |
| 237 | |
| 238 | func (ua *UserAuth) defaultAgentEmail(ctx context.Context, userID string) string { |
| 239 | agents, err := ua.store.ListAgentsByUser(ctx, userID) |
| 240 | if err != nil || len(agents) == 0 { |
| 241 | return "" |
| 242 | } |
| 243 | return agents[0].EmailAddress() |
| 244 | } |
| 245 | |
| 246 | func (ua *UserAuth) writeCLIHandoffPage(w http.ResponseWriter, r *http.Request, user *identity.User, handoff *cliLoginHandoff) error { |
| 247 | key, err := ua.store.CreateAPIKey(r.Context(), user.ID, "CLI login", nil) |
no test coverage detected