@pontive/pontkit-core 1.2.0 → 1.3.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.
@@ -18,6 +18,16 @@ export interface EnvConfig {
18
18
  appId: string;
19
19
  signinUrl: string;
20
20
  signupUrl: string;
21
+ /**
22
+ * Where this host serves the invitation page, when it serves one — the page
23
+ * that mounts `pont-invitation`.
24
+ *
25
+ * The path is what tells the SDK which flow a page is running, so without
26
+ * this an invitation page runs the sign-in flow: the invitee signs in and
27
+ * joins nothing. There is deliberately no default, since a guessed one would
28
+ * give that meaning to any route that happens to contain the word.
29
+ */
30
+ invitationUrl?: string;
21
31
  signinRedirectUrl?: string;
22
32
  /**
23
33
  * Language for the sign-in UI: space-separated BCP-47 tags in descending
@@ -0,0 +1,20 @@
1
+ import { EnvConfig } from '../types';
2
+ /**
3
+ * Where to send the browser once a flow has authenticated someone, or null to
4
+ * stay put.
5
+ *
6
+ * Pure, and separate from the provider, because the rule is easy to get subtly
7
+ * wrong and impossible to see when it is: getting it wrong means a page that
8
+ * finished its work and said nothing. That is what happened to invitations —
9
+ * the invitee was authenticated and the invitation accepted, while the page sat
10
+ * on the verification step, because the rule was "redirect only from the
11
+ * sign-in or sign-up page" and an invitation is answered on neither.
12
+ */
13
+ export interface PostAuthPage {
14
+ /** The page's path, e.g. window.location.pathname. */
15
+ pathname: string;
16
+ /** The page's query, e.g. window.location.search. */
17
+ search: string;
18
+ env: Pick<EnvConfig, "signinUrl" | "signupUrl" | "invitationUrl" | "signinRedirectUrl">;
19
+ }
20
+ export declare function postAuthDestination({ pathname, search, env }: PostAuthPage): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pontive/pontkit-core",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "license": "MIT",
5
5
  "description": "A collection of core components for Pontive",
6
6
  "main": "dist/index.js",
@@ -78,7 +78,7 @@
78
78
  "@lit/context": "^1.1.0",
79
79
  "@lit/reactive-element": "^2.1.0",
80
80
  "@open-wc/lit-helpers": "^0.7.0",
81
- "@pontive/oidc-client": "^1.0.0",
81
+ "@pontive/oidc-client": "^1.1.0",
82
82
  "class-variance-authority": "^0.7.0",
83
83
  "clsx": "^2.1.0",
84
84
  "jsoneditor": "^10.2.0",