Changelog - 2026-10-18
IGNIS's sign-in is the default, and an application can run with no sign-in
Behavior ChangeIn one line. ARDOR is IGNIS's frontend, so DefaultAuthProvider signs in the way IGNIS's auth controller expects; an application on the previous contract sets a path and overrides one hook.
typescript
import { type AnyType, DefaultAuthProvider, type IAuthProviderOptions } from '@venizia/ardor';
// Keep the previous contract: its path in the options, and the login form as the body.
export const previousContract: IAuthProviderOptions = {
paths: { signIn: '/auth/login' },
};
export class FormAuthProvider extends DefaultAuthProvider {
protected override buildSignInBody(opts: { params: AnyType }) {
return opts.params;
}
}What changed
- The default sign-in is IGNIS's.
paths.signIndefaults to/auth/sign-in(it was/auth/login), and the body is{ identifier: { scheme: 'username', value: params.username }, credential: { scheme: 'basic', value: params.password } }(it was the login form as it came). The path must be innoAuthPaths. buildSignInBodyis a protected hook ofDefaultAuthProvider. Returnparamsto keep the form body, or map a login form with other fields. In 0.1.4-4 it tookparamspositionally and read asignInBodyoption first; the sample above shows the form current packages use, oneoptsobject (see the sign-in hooks).loginreads two response shapes.{ userId, token: { value, type } }as before, and a bare{ token: '<jwt>' }. A bare token is stored as aBearertoken, and the user id is the response'suserId, else the JWT'suserIdclaim, else itssub. Before, a string token was spread into character keys and stored, andcheckAuthrejected afterwards.loginfails loud. A response with no token, or with no user id anywhere, rejects with a[login]error and stores nothing.- The auth provider is optional.
ArdorApplicationreadsCoreBindings.DEFAULT_AUTH_PROVIDERwithout requiring it. Unbound, react-admin runs with noauthProvider: no login page and every page public. SetuseAuth: falseon the REST options so noAuthorizationheader is sent. Before, the missing binding threw on the first render. - A signed-out deep link no longer loops.
checkAuthandcheckErrorrejected with{ redirectTo: 'login' }, which react-admin resolves against the current route:#/productswent to#/products/login, then#/products/login/login, without end. They now reject with{ redirectTo: '/login' }.
Who is affected
- An application whose backend signs in at
/auth/loginwith the form body. Setpaths.signInand overridebuildSignInBodyas above, or move the backend to IGNIS's route. Without them the first sign-in posts to/auth/sign-inand fails. - An application over the IGNIS auth controller. Delete the subclass or the
paths.signInthat only mapped the contract, and list/auth/sign-ininnoAuthPaths. - An application with its own
loginPageroute other than/login. The redirect is now absolute; keep the login page at/login. - An application with a public API. Delete the always-resolving auth provider and its bindings.