RemiliaNET login
RemiliaNET login lets users connect their RemiliaNET account to your app without giving the app their password.
Users log in on the RemiliaNET login page, so your app never collects or stores
a RemiliaNET password. RemiliaNET sends an authorization code to the exact
callback URL that you registered. Your app exchanges the code and its Proof Key
for Code Exchange (PKCE) verifier for tokens, then sends the access token as a
bearer token to /api/v1.
How login works
Login uses OpenID Connect (OIDC) with Authorization Code and PKCE, method
S256, on a Login client. A pending
application cannot complete login until it is approved.
Safeguards
Each implementation keeps these safeguards:
- The callback URL matches a registered callback URL exactly.
- A random
statevalue ties each callback to the request that started it. - When the app uses an ID token, a random
noncevalue ties it to its request. - The PKCE verifier stays in the app. Only its
S256challenge goes in the redirect. - A maintained OIDC library validates an ID token before the app uses its claims.
- Logout clears the tokens, the account data, and the pending requests of the app.
The OIDC reference lists the parameters and endpoints of each request.
Implementations
A connected app also refreshes its access token and clears its tokens on logout.
Login button
Every implementation starts login from the official Log in with RemiliaNET button. The login button kit holds the styles, the labels, the React component, the mark, and the files to download. For the steps, see Add the login button.
Accounts created during login
A person without a RemiliaNET account can create one from the login page. RemiliaNET then completes the original authorization request and redirects to your callback, so your app needs no registration flow. An account created this way starts with a generated handle and a default display name, which the user changes on remilia.net.
Account identity
The account key is (iss, sub) from a validated ID token. Handles and display
names can change, so read them from
GET /api/v1/me each time that you
show them.
Agent prompt
With a Login client ID and an exact callback URL, a coding agent can add login from this prompt:
Add RemiliaNET login with Authorization Code and S256 PKCE.
Follow these guides:
https://docs.remilia.net/guide/authentication
https://docs.remilia.net/guide/manual-pkce
https://docs.remilia.net/api/oidc
Use the official button kit:
https://docs.remilia.net/brand/login-button
Register the exact callback URL in the developer portal.
Use HTTPS for public hosts.
For a local app, use an exact HTTP loopback callback.
Store the public client ID in app configuration.
Keep client secrets out of the browser.
Validate the callback state.
Validate ID tokens, including nonce, with a maintained OIDC library.
Send the access token on /api/v1 requests.
Use a returned refresh token to renew access.
Save any replacement refresh token.
If refresh returns invalid_grant, clear tokens.
Then ask the user to log in again.
If a request fails temporarily, keep the current refresh token.
Keep the connected account visible when an optional feature lacks permission.
When the user logs out of the app, clear local tokens.
Discard pending login, refresh, and profile results after logout.
Test login, callback, refresh, and logout locally.The callback must be reachable at the registered URL.
