Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

The partner accepts the password, but sign-in fails

An external sign-in asks two principals to authenticate at the provider: the person, and then the application exchanging the code. This lesson follows customers whose password works at the photo service while the printing site still cannot sign them in, traces the failure to the site's own connection secret, replaces it on both sides and checks that each person still reaches the same account.

Customers sign in, then see an error

All names, domains and identifiers in these examples are fictional. You are on the printing company's identity team. Its site, printer.example, lets customers sign in with their photo service account, and most of them do. On a Saturday morning the first ticket arrives from Mara: "I clicked Sign in with Photos, typed my password at the photo service, approved the code on my phone, and came back to your site with Something went wrong signing you in. My password definitely works, because I can sign in to the photo service itself." By 09:00 there are forty more like it. Customers who sign in to the printing site with a local password are unaffected.

That pattern points at the connection between the two organizations, but it does not name a cause. The photo service could have changed its issuer or its signing keys, the site could be sending a return address the photo service no longer accepts, or the site could be failing to authenticate itself to the photo service. Mara's report already rules out the second: she came back to the site, so the photo service accepted the return address and redirected her. The question is what happened after she arrived.

Two sign-ins in one attempt

In this connection the printing site is an OpenID Connect relying party of the photo service, which acts as its identity provider, the roles Providers and relying parties introduced. Every external sign-in involves two principals authenticating at the photo service. First Mara authenticates there, with her password and her phone. Then, after her browser returns with an authorization code, the printing site's backend calls the photo service's token endpoint and authenticates as itself, with the client ID printer-signin and a client secret the photo service issued to the printing company. Only if that second authentication succeeds does the photo service hand over the ID token that tells the site who Mara is.

Mara's success at the first step says nothing about the second. The site's own trace for her attempt shows where it stopped:

08:12:40.102  callback                state=match  iss=https://auth.photos.example  code=present
08:12:40.215  upstream.token.request  endpoint=https://auth.photos.example/token
                                      client=printer-signin  auth=client_secret_basic
08:12:40.388  upstream.token.response status=401  error=invalid_client
                                      upstream_request_id=e4b27c90-3a1f-4d65-8b02-9f6e1d4a7c38
08:12:40.391  signin.result           outcome=failed  stage=upstream_token_exchange  subject=unknown

The callback arrived with a matching state and the expected issuer, and the code exchange failed. The site never learned who was signing in, which is why the result has no subject. It also did the right thing next: it failed closed, as Authentication errors described. Without an ID token it has validated, the site has nothing it can trust about the user, and falling back to an email address or any other value that came through the browser would let anyone who can shape that value sign in as someone else.

The site logs the upstream response body as well. It contains no credentials, so it is safe to keep:

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm="auth.photos.example"
Content-Type: application/json
Cache-Control: no-store
X-Request-ID: e4b27c90-3a1f-4d65-8b02-9f6e1d4a7c38

{"error": "invalid_client", "error_description": "The client secret has expired."}

The error customers saw is local, but its cause is upstream, at another organization's token endpoint. Not every provider writes an error_description this helpful, and on its own invalid_client also fits a wrong secret, a retired one or an authentication method the client is not registered for, as Token requests fail with invalid_client showed. Treat the description as a lead and confirm it with records.

Mara's password works; the printing site's own connection secret is the credential that expired.

Establish when the secret expired

An expiry date is metadata the photo service keeps with the secret. You cannot see it by looking at the secret, and nothing about the secret itself changes when the date passes. So the evidence comes from records, not from the value. You send the photo service's partner support team the upstream request ID and the time, which identify the failure without exposing anything, and ask what their records show for the client. Their reply, with your own records alongside:

photo service   client printer-signin
                secret sha256:7c30a5e1  created 2026-04-20T09:12:00Z
                expires 2026-10-17T00:00:00Z  status expired
                first rejection 2026-10-17T00:00:09Z  reason client_secret_expired

printing site   connection "Sign in with Photos"
                client printer-signin  secret sha256:7c30a5e1
                last changed 2026-04-20T09:40:00Z

The fingerprints match, so the site has been presenting exactly the secret the photo service issued. Nobody mistyped it and nobody changed the connection. The secret was issued in April with an expiry date of 17 October, it expired at midnight UTC, and the first refusal came nine seconds later with the first sign-in attempt after the deadline. Mara's password, the photo service's keys and the site's return address all play no part. One credential reached its end date, and nobody had a reminder for it.

Replace the secret on both sides

A connection credential has two halves owned by two organizations. The photo service issues it and checks it, and the printing site stores it and presents it. Replace both halves in order. The photo service issues a new secret for printer-signin with a 180-day lifetime and hands it over through the channel the two companies agreed for credentials, never by email or in a ticket. You store it in the site's connection configuration, record its fingerprint and expiry date, and reload the connection. Leave everything else as it is: the issuer, the client ID, the return address, the requested scopes, the claim mappings and the authentication method. None of them caused this, and changing them during an outage only adds new ways to fail.

The photo service's rotation screen offers to keep the current secret working for a week. That option exists for planned rotations, where the old secret is still valid and both sides need time to move, the overlap Rotating client credentials described. It does not apply here. An overlap extends a secret that is still working. It cannot revive one that has already expired, and the photo service's records should show the old secret as expired after the rotation, just as before it.

Verify the repair from the customer's side, with a fresh external sign-in. A test account at the photo service signs in, the site's trace shows upstream.token.response status=200, the ID token validates and the account page opens. Then confirm that the expired secret stays refused. A token request presenting it still gets invalid_client, and the photo service's record names client_secret_expired.

Check that each person reaches the same account

A working exchange is not the end of verification. The point of the connection is that Mara reaches her own account on the printing site, with her saved projects and order history, and that nobody else does. Repairs that go further than a secret, such as recreating the connection instead of updating it or retyping the issuer, can quietly break that, sending returning customers into new, empty accounts.

Ask Mara to sign in again, then compare the claims in her new ID token with the link the site already holds for her account:

ID token claims (decoded)
{
  "iss": "https://auth.photos.example",
  "sub": "8f3e2a71-5c4d-4b0e-9a12-6d7f3e1c0b95",
  "aud": "printer-signin",
  "email": "[email protected]",
  "iat": 1792226340,
  "exp": 1792226640
}

printing site account acct-20931 (Mara)
  linked identity  iss=https://auth.photos.example
                   sub=8f3e2a71-5c4d-4b0e-9a12-6d7f3e1c0b95
                   linked 2025-11-03

The site found her account by the issuer and subject together, which OpenID Connect treats as the only stable identifier for a user at a provider, as Connecting a sign-in to an account explained. It did not use her email address, which she can change at the photo service and which the photo service could one day assign to someone else. Now check the other direction. Another customer signs in through the same connection: her subject is different, and she reaches her own account, not Mara's. A test account at the photo service with no link reaches the site's account linking step, not anyone's account, because a matching email address is never enough to join an external identity to an existing account, as Linking accounts showed.

Hand off with dates and owners

This outage was scheduled six months in advance, and nobody had it on their calendar. The handoff note fixes that. It records the failing stage, both organizations' evidence by reference, the replacement's fingerprint and expiry date, and a named owner on each side.

It also books the next rotation as a planned one, with an overlap, a month before the new secret expires: the photo service issues the next secret while the current one still works, you deploy it and confirm a sign-in, and only then does the photo service retire the old one. An alert on the recorded expiry date, which is not secret, makes sure a missed calendar entry is noticed weeks ahead instead of at midnight. Removing the expiry date instead, if the photo service even allows it, would trade one outage for a credential that never gets replaced.

Worked example: the handoff note

The note gives each organization its own owner and puts the next rotation on a date, which is the part this incident was missing:

Symptom:       From 2026-10-17 00:00 UTC, Sign in with Photos failed after customers
               authenticated at the photo service. Local sign-in unaffected.
Failing stage: printer.example code exchange at https://auth.photos.example/token.
               401 invalid_client (upstream request e4b27c90-3a1f-4d65-8b02-9f6e1d4a7c38).
Cause:         Client secret for printer-signin (sha256:7c30a5e1) expired 2026-10-17T00:00:00Z.
               Photo service record: client_secret_expired. Site presented the issued value.
Repair:        Photo service issued a new secret, 180-day lifetime, expires 2027-04-15T00:00:00Z
               (sha256:d218b6f4). Stored in the site's connection only. Issuer, client ID,
               return address, scopes, claim mappings and method unchanged.
Verification:  Fresh test sign-in: exchange 200, ID token valid. Customer reached her existing
               account (same iss and sub). Second customer reached her own account. Unlinked
               test account reached the linking step. Expired secret: still invalid_client.
Owners:        Printing company identity team (connection), photo service partner
               integrations (client printer-signin).
Next:          Planned rotation with overlap booked for 2027-03-15. Expiry alert at 30 days.

Every value in it is a reference, a fingerprint or a date. None of them would let anyone authenticate as printer-signin.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Customers authenticate at a partner provider and return to your site, which then shows a sign-in error. Your trace shows the callback with a matching state, then a 401 invalid_client from the partner's token endpoint. Which credential is failing? 1 of 3

Choose one answer.

A connection's client secret at a partner expired yesterday. The partner's rotation screen offers to keep the current secret working for seven days. What should you expect after rotating with that option? 2 of 3

Choose one answer.

After a teammate recreated the partner connection, a returning customer signs in and lands in a new, empty account. Her email is unchanged. What do you compare first? 3 of 3

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity