@absolutejs/auth 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +46 -5
- package/dist/index.js +7 -4
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +7 -3
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Cookie, status as statusType, redirect as redirectType } from 'elysia';
|
|
|
3
3
|
import { ElysiaCustomStatusResponse } from 'elysia/error';
|
|
4
4
|
import type { AuthIdentityConflict } from './errors';
|
|
5
5
|
import type { AbsoluteAuthSessionStore } from './sessionTypes';
|
|
6
|
-
import type { AuthHtmxConfig } from './ui/types';
|
|
6
|
+
import type { AuthHtmxConfig, AuthHtmxUser } from './ui/types';
|
|
7
7
|
export type AuthIntent = 'login' | 'link_identity' | 'link_connector';
|
|
8
8
|
export type OAuth2ProviderClientConfiguration<Provider extends ProviderOption> = {
|
|
9
9
|
credentials: CredentialsFor<Provider>;
|
|
@@ -154,8 +154,12 @@ export type AbsoluteAuthProps<UserType> = {
|
|
|
154
154
|
/** Enable the built-in HTMX fragment routes (login, identities, connectors,
|
|
155
155
|
* account, signout, delete-account). Supply provider display data + the
|
|
156
156
|
* identity/connector data actions; the package owns the route wiring and
|
|
157
|
-
* renderers. See @absolutejs/auth/ui to override individual fragments.
|
|
158
|
-
|
|
157
|
+
* renderers. See @absolutejs/auth/ui to override individual fragments.
|
|
158
|
+
*
|
|
159
|
+
* Only available when `UserType` has the fields the fragments render
|
|
160
|
+
* (`sub` + optional email/name); users that don't enable HTMX are never
|
|
161
|
+
* constrained. */
|
|
162
|
+
htmx?: UserType extends AuthHtmxUser ? AuthHtmxConfig : never;
|
|
159
163
|
unregisteredSessionDurationMs?: number;
|
|
160
164
|
resolveAuthIntent?: ResolveAuthIntent<UserType>;
|
|
161
165
|
onAuthorizeSuccess?: OnAuthorizeSuccess;
|
package/package.json
CHANGED