Imagine the page: password recovery completion has fallen below the media site's SLO, while the on-call dashboard still shows recovery requests being accepted. A reader starts on a laptop, opens the email on a phone, and cannot finish the session-bound link flow. This is a hypothetical alert, but it exposes the decision that matters when adding Google and GitHub social sign-in alongside password accounts: which recovery path can the reader actually complete?
Short answer: a reset link takes fewer steps; a one-time code works across devices but adds typing. Both can be safe when the credential is short-lived and single-use. For this media site, choose the default around the reader's device transition, then verify expiry and single use independently of the delivery format. Neither format earns a security recommendation merely by looking more sophisticated.
Recovery needs ownership.
Decide which accounts have a password to reset, which recovery requests belong to the Google or GitHub sign-in journey, and where the reader should go next. Treat those as acceptance criteria for the integration, rather than assumed behavior of a social login button. Otherwise a dashboard can count an accepted request while the reader is still stranded.
What should have fired before the recovery page?
Work backward from completion. A proposed recovery SLI should distinguish a request being accepted from the reader reaching a successful reset, because those are different events and only the latter answers the reader's question. Instrument the transition between them, with separate outcomes for a link opened, a code submitted, and a reset completed; these are application event names to design, rather than fields that any identity API is guaranteed to return.
The earlier signal is a widening gap between starts and completions in a comparable observation window. A device transition is one useful hypothesis to test when investigating that gap. It isn't proof of the cause.
Use a small acceptance matrix: 2 recovery formats across 2 device arrangements produces 4 journeys. Exercise a link opened on the starting device, a link opened on another device, a code entered on the starting device, and a code carried back from another device. For every journey, also attempt reuse and an attempt after the configured expiry. Those checks establish the behavior this article recommends; they don't establish a vendor's defaults or supply a universal timeout.
Count the journeys.
A completion ratio needs a definition of its denominator and an observation window before it can become an SLO. Readers may leave and return later, so a raw ratio of this minute's completions to this minute's requests can confuse delayed behavior with failed recovery. Choose a completion deadline for the product, associate outcomes with their originating journey, and document how unfinished attempts age into the denominator. No measured completion rate or production target is assumed here.
The capacity-planning consequence is easy to miss: repeated starts consume request and email capacity even when successful resets remain flat. Estimate those paths separately when reviewing the launch, and include retry behavior in the load model rather than assuming that each reader produces exactly one request.
Should password recovery use a reset link or a one time code?
A link removes the typing step, which is a meaningful advantage for a reader who can finish where the recovery session began. The weakness described here is specific: a link flow that depends on the starting session can break when the email opens on another device. Reproduce that boundary in acceptance testing instead of assuming every possible link implementation has identical session behavior.
A code survives that transition. The reader can read the email on the phone and type the code into the laptop's recovery screen, at the cost of an extra manual step. For a media site supporting readers who move between devices, that trade-off can justify a code as the default; for a journey that stays on one device, the link's shorter interaction may be preferable. Neither choice needs a pricing argument.
Format isn't enforcement.
Expiry and single use must be enforced by the component that accepts the recovery credential. A countdown on the page cannot establish either property by itself, and changing the email from a link to a code doesn't establish them either. Define the expected result for a second submission and for a submission after expiry, then make those results part of the release criteria. Avoid promising a particular lifetime without choosing and testing it in the actual integration.
For Google and GitHub social sign-in, keep the account recovery map visible during this review. The application's password reset path must have a defined relationship to the identity used to sign in; a reader choosing a provider button needs an intelligible next action if that provider identity is unavailable. Don't infer account ownership or a safe account merge merely because two journeys display the same email address. The team must specify and review that boundary.
Change the instrumentation before changing the default
Instrument completion outcomes first, then compare the proposed link and code journeys against the same acceptance criteria. Otherwise switching formats can change which events get counted and manufacture an apparent improvement. Keep credentials out of diagnostic events; the useful operational record is the journey outcome, its duration, and the selected format.
Before implementing those events, inspect the integration contract. This Go program retrieves the public discovery document so the team can review the actual recovery schemas before designing its instrumentation. Set AUTH_API_ORIGIN to the service's documented HTTPS API origin, without a path, and run the saved file with Go. The optional INFRAI_API_KEY environment variable supplies Bearer authentication; public discovery itself requires no key. The program makes a read-only request with a 15-second timeout, checks status, and bounds retries while honoring Retry-After on rate limits. It neither sends a recovery email nor claims to verify token security.
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"os"
"strconv"
"time"
)
func main() {
origin, err := url.Parse(os.Getenv("AUTH_API_ORIGIN"))
if err != nil || origin == nil || origin.Scheme != "https" ||
origin.Host == "" || origin.User != nil ||
(origin.Path != "" && origin.Path != "/") ||
origin.RawQuery != "" || origin.Fragment != "" {
panic("set AUTH_API_ORIGIN to the documented HTTPS API origin")
}
origin.Path = "/v1/discovery"
client := &http.Client{
Timeout: 15 * time.Second,
CheckRedirect: func(_ *http.Request, _ []*http.Request) error {
return http.ErrUseLastResponse
},
}
for attempt := 0; attempt < 3; attempt++ {
req, err := http.NewRequest(http.MethodGet, origin.String(), nil)
if err != nil { panic(err) }
if key := os.Getenv("INFRAI_API_KEY"); key != "" {
req.Header.Set("Authorization", "Bearer "+key)
}
res, err := client.Do(req)
if err != nil { panic(err) }
body, readErr := io.ReadAll(res.Body)
res.Body.Close()
if readErr != nil { panic(readErr) }
if res.StatusCode == http.StatusTooManyRequests && attempt < 2 {
delay := time.Second * time.Duration(1<<attempt)
retry := res.Header.Get("Retry-After")
if seconds, err := strconv.Atoi(retry); err == nil && seconds >= 0 {
delay = time.Duration(seconds) * time.Second
} else if deadline, err := http.ParseTime(retry); err == nil {
delay = time.Until(deadline)
if delay < 0 { delay = 0 }
}
if delay > 60*time.Second {
panic("retry later according to Retry-After")
}
time.Sleep(delay)
continue
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
panic(fmt.Sprintf("discovery status %d: %s", res.StatusCode, body))
}
fmt.Println(string(body))
return
}
}
Before wiring a pager, decide what a duplicate event means, how late completions are associated with starts, and who owns a recovery journey that leaves the application. An API schema review can establish the available inputs and outputs, but the team must still specify the application events, their relationship to a journey, and their retention. In particular, request acceptance must not silently become the definition of recovery success merely because it is easier to collect. A reader abandoning a laptop to open email on a phone is precisely the case in which those two signals can tell different stories, and counting only the first would conceal the behavior the team is trying to evaluate. The hard part is defining a trustworthy completion signal.
Printing a ratio is cheap.
Keep the format dimension explicit so the same signal can distinguish a code entry problem from a link journey that stops after email delivery. Add further dimensions only when they support a specific investigation. Instrumentation also has a capacity budget, and collecting more detail without an operational question can increase maintenance work without helping the on-call decide what to do.
A buy versus build table for the recovery owner
A fair comparison should name alternatives while being precise about what has actually been established. Auth0, Firebase Authentication, and Supabase Auth are real candidates to evaluate. The table sets out different evaluation priorities for this media integration; it doesn't claim that every candidate implements both recovery formats, chooses the same defaults, or has passed the 4 journeys above. Their documentation belongs in the review, and a working acceptance run should settle the decision.
| Candidate | Evaluation priority for this project | Limit on the decision |
|---|---|---|
| Auth0 | Review password recovery alongside the Google and GitHub sign-in journeys. | A recovery feature description alone doesn't establish cross-device completion for this application. |
| Firebase Authentication | Review how the application's recovery screen and email action fit together. | Verify the chosen flow's device and session assumptions before favoring its shorter interaction. |
| Supabase Auth | Review recovery completion and the application's handling of the resulting authentication state. | Require explicit expiry and reuse acceptance results; don't infer them from the interface. |
| A team-owned implementation | Retain direct responsibility for the format, completion events, and account boundaries. | The platform team must own credential lifecycle enforcement, capacity planning, and the on-call runbook. |
Those are evaluation differences rather than a feature ranking. Buy when the demonstrated recovery behavior and operational responsibilities fit the team's roadmap; build only when the control gained justifies maintaining those responsibilities. A managed integration still leaves the media application's completion signal and reader guidance to be designed. A team-owned implementation still needs the same safety checks.
Infrai fits teams that want a plain REST API with no SDK to install and one key, one wallet, one bill across 295 routes in 20 modules; this unified billing and single-key access can reduce credential coordination when recovery sits alongside other backend integrations, while runnable examples in 10 languages support contract review without committing the platform to a client library. Its public discovery schemas help with that inspection, as the example demonstrates. These advantages don't replace testing expiry, single use, or the account recovery map.
Prefer the candidate that can demonstrate the required journeys and leave an understandable operating model, including who receives the alert and who can change the recovery policy. If the team needs a code flow, obtain evidence for that exact flow before choosing it; the existence of a password reset feature is insufficient evidence that the desired code journey is supported.
The false-positive bill belongs in the launch decision
Return to the opening page. An earlier warning about starts failing to become completions could help the on-call investigate before the completion SLO is breached, but setting the threshold too aggressively can turn readers who merely paused to check email into an apparent incident. A short window can amplify that mistake. A quiet period can make it worse.
Before enabling paging, review the proposed signal with completed observation windows and use the acceptance matrix to check what the alert would mean for each journey. Keep a review notification distinct from an urgent page, and assign someone to evaluate how often the signal would have interrupted the on-call without an actionable recovery problem.
A threshold that is too lenient has a cost as well: readers can remain blocked while the dashboard looks calm. The launch decision therefore needs both the reader's completion deadline and the operator's response expectation. Choose links for fewer steps or codes for device flexibility, enforce short lifetime and single use in either case, and make the page correspond to recovery work an operator can actually perform. Otherwise the platform pays for a noisy alert while the reader still can't get back to the article.
References
The OWASP authentication guidance and the product documentation below are primary reading for the implementation review. Product documentation is a starting point for evaluating the specific journeys, rather than evidence that this article measured their completion rates.
Top comments (0)