Login and API requests fail
Match a failed registration, login, token, or API request to its cause, and apply the remedy for that cause.
Condition
A registration, a login redirect, a token request, or an API call fails. The
failure shows an error page, an HTTP status, an error code, or a request that
the browser blocks.
Solutions
The application is pending or rejected
A pending application cannot complete login or obtain tokens. A rejected application returns to draft before you can edit it. Review is manual and has no guaranteed completion time.
- Open your application in the developer portal.
- Read its status and any rejection note.
- If the application is rejected, reopen it as a draft.
- Correct the application.
- Submit the application again.
The callback URL does not match
The authorization redirect shows error=invalid_redirect_uri or an
authorization error page. The redirect_uri does not match a callback that is
registered for your client.
- Compare the
redirect_uriof the request with the registered callbacks. - Send a registered callback URL verbatim, with its scheme, port, and path.
The client ID is wrong
The login page reports an unknown or invalid client, or a token request returns
invalid_client. The application is not approved, client_id is mistyped, or
the client ID and the secret do not match.
- Check the status of the application in the developer portal.
- Copy the client ID again from the application page.
- For an API client, check that the secret belongs to the same client.
The callback state does not match
Your own callback check reports a state mismatch. The response is not tied to
your request, or the browser lost the saved state.
- Discard the callback.
- Start another login.
The authorization code is rejected
The token exchange returns HTTP 400 invalid_grant. The code was used already
or expired, the redirect_uri differs from the authorization request, or the
code_verifier is missing or wrong.
- Start a fresh authorization request.
- Send the same
redirect_uriin the authorization request and the exchange. - Send the verifier that belongs to the same login attempt.
The refresh token is rejected
A refresh request returns HTTP 400 invalid_grant. The refresh token expired or
was revoked.
- Clear the local tokens.
- Start the full login flow again.
The access token is invalid or missing
An API call returns 401 invalid_token or 401 unauthorized. The bearer token
is malformed or expired, or the request sent no token to a route that needs one.
- If the token expired, refresh it.
- Send
Authorization: Bearer <access_token>with the request. - Retry the request.
The token lacks a scope
An API call returns 403 insufficient_scope. The endpoint requires a scope
outside the grant of your client.
- Keep unrelated features available.
- Check the approved scopes of the application in the developer portal.
- After any required approval, log in again to obtain another token.
For more information, see Scopes.
The token has no user
An API call returns 403 requires_user. The token belongs to an
API client and has no user identity.
- Use a Login client to obtain the token of a user.
The browser blocks the request
The browser blocks a token exchange or an API response, but curl succeeds.
curl does not enforce cross-origin resource sharing (CORS).
The API accepts cross-origin requests under /api/* with a bearer token or no
authentication. The gateway allows the Authorization and Content-Type
headers and answers preflight requests. The /oidc/* endpoints of the identity
provider allow the origins of the registered redirect URLs of a Login client.
localhost and 127.0.0.1 are different origins.
-
Compare the page origin with the origins of your registered callbacks.
-
Check that the token request goes to the correct issuer.
-
Read the actual response and preflight in the network panel.
-
Send API requests with
credentials: "omit"and an explicit bearer header:const response = await fetch("https://www.remilia.net/api/v1/me", { credentials: "omit", headers: { Authorization: `Bearer ${accessToken}` }, }); -
Remove any unsupported custom headers from the request.
A 401 or a 403 with an error code is an API response, not a CORS error.
mode: "no-cors" returns an opaque response that your app cannot read. An API
client secret in browser code does not fix an origin error and exposes the
secret.
A required command is missing
A setup command fails because a tool is not installed. Each path needs these tools and credentials:
- Run
bun --version,curl --version, orjq --version. - Install each tool that reports no version.
The cause is unknown
The status or the failure needs investigation by Remilia. The general support address handles these reports. No dedicated developer escalation route or response time is published.
Warning: Never send a client secret, an access token, a refresh token, a password, or an unredacted network export. Support does not need these to identify the client.
- Collect the public client ID, the client type, and the application status.
- Collect the failing endpoint, the HTTP method, the status, and the error code.
- Note the failure time with its time zone, the browser, and the exact callback.
- Write a short reproduction with credentials, codes, and tokens removed.
- Send the report to Remilia support.
If a secret or token is exposed, see Client credentials are exposed.
