@pelican-identity/react 1.2.0 → 2.0.0

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/README.md ADDED
@@ -0,0 +1,319 @@
1
+ # Pelican Identity React SDK
2
+
3
+ React SDK for Pelican authentication and identity verification on the web.
4
+ 👉 **Pelican Dashboard:** https://dash.pelicanidentity.com
5
+
6
+ ---
7
+
8
+ ## Installation
9
+
10
+ ### Using npm
11
+
12
+ ```bash
13
+ npm install @pelican-identity/react
14
+ ```
15
+
16
+ ### Using yarn
17
+
18
+ ```bash
19
+ yarn add @pelican-identity/react
20
+ ```
21
+
22
+ ### Using pnpm
23
+
24
+ ```bash
25
+ pnpm add @pelican-identity/react
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Requirements
31
+
32
+ - React **17, 18, or 19**
33
+ - A modern browser environment
34
+ - A Pelican project configured in the Pelican dashboard
35
+
36
+ > This SDK is **browser-only** and must be used in client-side React components.
37
+
38
+ ---
39
+
40
+ ## Required Setup
41
+
42
+ ### 1. Whitelist your domain in Pelican Dashboard
43
+
44
+ You must add your website’s domain (e.g. `example.com`, `app.example.com`, or `localhost`) to your project’s whitelist in the Pelican dashboard.
45
+
46
+ Pelican validates **explicit domain ownership** on every authentication attempt.
47
+ 👉 **Pelican Dashboard:** https://dash.pelicanidentity.com
48
+
49
+ ---
50
+
51
+ ### 2. Client-side usage only (important)
52
+
53
+ If you are using **Next.js, Remix, or similar frameworks**, ensure the SDK is only initialized on the client.
54
+
55
+ For Next.js App Router:
56
+
57
+ ```tsx
58
+ "use client";
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Usage
64
+
65
+ ### Basic Usage
66
+
67
+ ```tsx
68
+ import { PelicanAuth } from "@pelican-identity/react";
69
+
70
+ export default function LoginPage() {
71
+ return (
72
+ <PelicanAuth
73
+ publicKey="your-business-public-key"
74
+ projectId="your-project-id"
75
+ authType="login"
76
+ onSuccess={(data) => {
77
+ console.log("Authentication successful:", data);
78
+ }}
79
+ onError={(error) => {
80
+ console.error("Authentication failed:", error);
81
+ }}
82
+ />
83
+ );
84
+ }
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Complete Example
90
+
91
+ ```tsx
92
+ "use client";
93
+
94
+ import { useState } from "react";
95
+ import { PelicanAuth } from "@pelican-identity/react";
96
+
97
+ export default function Login() {
98
+ const [user, setUser] = useState(null);
99
+ const [error, setError] = useState<string | null>(null);
100
+
101
+ return (
102
+ <div style={{ maxWidth: 400, margin: "auto" }}>
103
+ <h2>Login to MyApp</h2>
104
+
105
+ <PelicanAuth
106
+ publicKey="your-business-public-key"
107
+ projectId="your-project-id"
108
+ authType="login"
109
+ onSuccess={(data) => {
110
+ setUser(data);
111
+ setError(null);
112
+ }}
113
+ onError={(err) => {
114
+ setError(err.message);
115
+ setUser(null);
116
+ }}
117
+ />
118
+
119
+ {user && <p>Authenticated successfully</p>}
120
+ {error && <p style={{ color: "red" }}>{error}</p>}
121
+ </div>
122
+ );
123
+ }
124
+ ```
125
+
126
+ ---
127
+
128
+ ## API Reference
129
+
130
+ ### `PelicanAuth`
131
+
132
+ Main authentication component.
133
+
134
+ #### Props
135
+
136
+ | Prop | Type | Required | Description |
137
+ | ----------------- | ------------------------------------------ | -------- | --------------------------------------------------- |
138
+ | `publicKey` | `string` | ✅ | Business public key from Pelican dashboard |
139
+ | `projectId` | `string` | ✅ | Project ID from Pelican dashboard |
140
+ | `authType` | `"signup" \| "login" \| "id-verification"` | ✅ | Authentication flow |
141
+ | `onSuccess` | `(data: IdentityResult) => void` | ✅ | Success callback containing authenticated user data |
142
+ | `onError` | `(error: Error) => void` | Optional | Error callback |
143
+ | `buttonComponent` | `ReactNode` | Optional | Custom trigger UI |
144
+ | `forceQRCode` | `boolean` | Optional | Always show QR code instead of deep link |
145
+ | `continuousMode` | `boolean` | Optional | Automatically restart auth after completion |
146
+
147
+ > If `publicKey` or `projectId` is invalid, Pelican will fail immediately.
148
+
149
+ ## 👉 **Pelican Dashboard:** https://dash.pelicanidentity.com
150
+
151
+ ## Authentication Flow
152
+
153
+ Pelican Web authentication works using:
154
+
155
+ - **QR codes** (desktop → mobile)
156
+ - **Deep links** (mobile browsers)
157
+
158
+ The SDK automatically chooses the best option based on the user’s device.
159
+
160
+ ---
161
+
162
+ ## Authentication Response
163
+
164
+ When authentication completes successfully, Pelican returns a structured **identity result** to your application via the `onSuccess` callback.
165
+
166
+ ---
167
+
168
+ ## Success Callback
169
+
170
+ ```ts
171
+ onSuccess: (result: IdentityResult) => void;
172
+ ```
173
+
174
+ ---
175
+
176
+ ## IdentityResult
177
+
178
+ ```ts
179
+ interface IdentityResult {
180
+ /** Deterministic unique user identifier specific to your business */
181
+ user_id: string;
182
+
183
+ /** Basic user profile and contact information (if available) */
184
+ user_data?: IUserData;
185
+
186
+ /** Identity document and liveness verification data */
187
+ id_verification: IKycData;
188
+
189
+ /** Download URLs for verified identity documents */
190
+ id_downloadurls?: {
191
+ front_of_card?: string;
192
+ back_of_card?: string;
193
+ };
194
+ }
195
+ ```
196
+
197
+ ---
198
+
199
+ ## `user_id`
200
+
201
+ - A **stable, deterministic identifier** generated by Pelican.
202
+ - Unique **per business**, not global.
203
+ - Safe to store and use as your internal user reference.
204
+ - Does **not** expose personally identifiable information (PII).
205
+
206
+ ---
207
+
208
+ ## User Data (`user_data`)
209
+
210
+ Returned when available and permitted by the authentication flow.
211
+
212
+ ```ts
213
+ interface IUserData {
214
+ first_name?: string;
215
+ last_name?: string;
216
+ other_names?: string;
217
+ email?: IEmail;
218
+ phone?: IPhone;
219
+ dob?: string | Date;
220
+ gender?: "male" | "female" | "other";
221
+ country?: string;
222
+ state?: string;
223
+ city?: string;
224
+ address?: string;
225
+ occupation?: string;
226
+ company?: string;
227
+ website?: string;
228
+ }
229
+ ```
230
+
231
+ All contact data returned by Pelican is **verified**.
232
+
233
+ ---
234
+
235
+ ## Identity Verification (`id_verification`)
236
+
237
+ Returned for flows involving identity verification or KYC.
238
+
239
+ ```ts
240
+ interface IKycData {
241
+ id: number;
242
+ status?: "Approved" | "Declined" | "In Review";
243
+ document_type?:
244
+ | "national id card"
245
+ | "passport"
246
+ | "driver's license"
247
+ | "residence permit";
248
+ document_number?: string;
249
+ nationality?: string;
250
+ age?: number;
251
+ verified_at?: string | Date;
252
+ }
253
+ ```
254
+
255
+ ---
256
+
257
+ ## Authentication Flow Differences
258
+
259
+ | Auth Type | Returned Data |
260
+ | ----------------- | ------------------------------------------- |
261
+ | `signup` | `user_id`, basic `user_data` |
262
+ | `login` | `user_id` |
263
+ | `id-verification` | `user_id`, `id_verification`, document URLs |
264
+
265
+ Returned fields depend on:
266
+
267
+ - User consent
268
+ - Project configuration
269
+ - Regulatory requirements
270
+
271
+ ---
272
+
273
+ ## Troubleshooting
274
+
275
+ ### Blank page or no QR code
276
+
277
+ - Ensure the SDK is running client-side
278
+ - Confirm your domain is whitelisted
279
+
280
+ ### Authentication never completes
281
+
282
+ - Ensure the browser tab regains focus after mobile authentication
283
+
284
+ ### Unsupported authentication type
285
+
286
+ - Ensure `authType` is valid
287
+
288
+ ### Billing issues, please contact this site owner
289
+
290
+ - Ensure your business wallet has sufficient balance
291
+ - Low balance alerts can be configured in the Pelican dashboard
292
+ 👉 **Pelican Dashboard:** https://dash.pelicanidentity.com
293
+
294
+ ---
295
+
296
+ ## Security Notes
297
+
298
+ - All identity data is transmitted **encrypted**.
299
+ - Pelican never exposes raw credentials.
300
+ - Identifiers are scoped per business.
301
+ - Domains are validated on every authentication request.
302
+
303
+ ---
304
+
305
+ ### Final note
306
+
307
+ Pelican deliberately separates:
308
+
309
+ - **Identity** (who the user is)
310
+ - **Authentication** (this session)
311
+ - **Verification** (confidence level)
312
+
313
+ This ensures your web application remains secure, flexible, and compliant.
314
+
315
+ ---
316
+
317
+ ## License
318
+
319
+ MIT
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PelicanAuth.d.ts","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,yBAAyB,CAAC;AAG3E,QAAA,MAAM,WAAW,GAAI,QAAQ,gBAAgB,4CA0d5C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,336 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import PelicanButton from "./PelicanButton";
4
+ import { usePelicanAuth } from "../hooks/usePelicanAuth";
5
+ import StoreIcons from "./StoreIcons";
6
+ const PelicanAuth = (config) => {
7
+ const [isOpen, setIsOpen] = useState(config.continuousMode || false);
8
+ const [successMessage, setSuccessMessage] = useState("");
9
+ const { start, qr, state, deeplink, isProcessing, stop } = usePelicanAuth({
10
+ projectId: config.projectId,
11
+ publicKey: config.publicKey,
12
+ authType: config.authType,
13
+ onSuccess: (identity) => {
14
+ config.onSuccess(identity);
15
+ if (config.continuousMode) {
16
+ setSuccessMessage("Authentication complete!");
17
+ }
18
+ },
19
+ onError: (error) => {
20
+ config.onError?.(error);
21
+ },
22
+ onClose: config.onClose,
23
+ });
24
+ useEffect(() => {
25
+ if (config.continuousMode) {
26
+ start();
27
+ }
28
+ }, [config.continuousMode]);
29
+ return (_jsxs(_Fragment, { children: [_jsx("style", { children: `
30
+ @keyframes fadeUp {
31
+ from {
32
+ opacity: 0;
33
+ transform: translateY(20px);
34
+ }
35
+ to {
36
+ opacity: 1;
37
+ transform: translateY(0);
38
+ }
39
+ }
40
+
41
+ @keyframes spin {
42
+ to {
43
+ transform: rotate(360deg);
44
+ }
45
+ }
46
+
47
+ @keyframes successPulse {
48
+ 0%, 100% {
49
+ transform: scale(1);
50
+ opacity: 1;
51
+ }
52
+ 50% {
53
+ transform: scale(1.05);
54
+ opacity: 0.9;
55
+ }
56
+ }
57
+
58
+ .auth-container {
59
+ width: 100%;
60
+ max-width: 400px;
61
+ padding: 1rem;
62
+ position: relative;
63
+ animation: fadeUp 0.5s ease-out;
64
+ }
65
+
66
+ .close-button {
67
+ position: absolute;
68
+ right: 0;
69
+ top: -2.5rem;
70
+ background: none;
71
+ border: none;
72
+ cursor: pointer;
73
+ transition: opacity 0.2s;
74
+ }
75
+
76
+ .close-button:hover {
77
+ opacity: 0.6;
78
+ }
79
+
80
+ @media (prefers-color-scheme: dark) {
81
+ .close-button {
82
+ color: #fff;
83
+ }
84
+
85
+ .close-icon {
86
+ fill: #000000;
87
+ }
88
+ }
89
+
90
+ .close-icon {
91
+ width: 1.5rem;
92
+ height: 1.5rem;
93
+ fill: #000000;
94
+ }
95
+
96
+ .retry-container {
97
+ text-align: center;
98
+ padding: 3rem 0;
99
+ }
100
+
101
+ .retry-container > div:first-child {
102
+ margin-bottom: 1rem;
103
+ }
104
+
105
+ .retry-text {
106
+ font-size: 1.125rem;
107
+ }
108
+
109
+ .content-wrapper {
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: 2rem;
113
+ }
114
+
115
+ .unpaired-container {
116
+ text-align: center;
117
+ display: flex;
118
+ flex-direction: column;
119
+ gap: 1.5rem;
120
+ }
121
+
122
+ .main-heading {
123
+ font-size: 1rem;
124
+ font-weight: 800;
125
+ }
126
+
127
+ @media (min-width: 768px) {
128
+ .main-heading {
129
+ font-size: 1.25rem;
130
+ }
131
+ }
132
+
133
+ @media (min-width: 1024px) {
134
+ .main-heading {
135
+ font-size: 1.25rem;
136
+ }
137
+ }
138
+
139
+ .mobile-auth-container {
140
+ display: flex;
141
+ flex-direction: column;
142
+ gap: 1rem;
143
+ }
144
+
145
+ .logo-container {
146
+ display: flex;
147
+ justify-content: center;
148
+ padding: 2rem 0;
149
+ }
150
+
151
+ .open-app-link {
152
+ display: inline-block;
153
+ padding: 1rem 2rem;
154
+ background-color: #000000;
155
+ border: 1px solid #d9eb1b;
156
+ border-radius: 9999px;
157
+ color: #d9eb1b;
158
+ font-weight: 700;
159
+ font-size: 1.125rem;
160
+ text-decoration: none;
161
+ transition: background-color 0.2s;
162
+ }
163
+
164
+ .open-app-link:hover {
165
+ background-color: rgba(217, 235, 27, 0.9);
166
+ color: #000;
167
+ }
168
+
169
+ .helper-text {
170
+ font-size: 0.75rem;
171
+ color: #6b7280;
172
+ }
173
+
174
+ .qr-container {
175
+ display: flex;
176
+ justify-content: center;
177
+ }
178
+
179
+ .qr-wrapper {
180
+ display: flex;
181
+ justify-content: center;
182
+ align-items: center;
183
+ overflow: hidden;
184
+ border-radius: 2rem;
185
+ border: 1px solid #d9eb1b;
186
+ background-color: #FFFFF5;
187
+ padding: 0.5rem;
188
+ height: 250px;
189
+ width: 250px;
190
+ }
191
+
192
+ .error-text {
193
+ font-weight: 500;
194
+ color: red;
195
+ }
196
+
197
+ .qr-image {
198
+ height: 100%;
199
+ width: 100%;
200
+ }
201
+
202
+ .loader-container {
203
+ display: flex;
204
+ justify-content: center;
205
+ }
206
+
207
+ .instruction-text {
208
+ font-size: 0.875rem;
209
+ color: #9ca3af;
210
+ }
211
+
212
+ .paired-container {
213
+ text-align: center;
214
+ padding: 1rem 0;
215
+ display: flex;
216
+ flex-direction: column;
217
+ gap: 1rem;
218
+ max-width: 250px;
219
+ }
220
+
221
+ .paired-heading {
222
+ font-size: 1.875rem;
223
+ font-weight: 800;
224
+ }
225
+
226
+ @media (min-width: 768px) {
227
+ .paired-heading {
228
+ font-size: 2.25rem;
229
+ }
230
+ .main-heading {
231
+ font-size: 1.25rem;
232
+ }
233
+ }
234
+
235
+ .success-message {
236
+ background-color: #121212;
237
+ color: #d9eb1b;
238
+ padding: 1rem 2rem;
239
+ border-radius: 2rem;
240
+ font-weight: 700;
241
+ font-size: 1.25rem;
242
+ animation: successPulse 0.2s ease-in-out;
243
+ margin: 1rem 0;
244
+ }
245
+
246
+ .auto-renew-badge {
247
+ display: inline-block;
248
+ background-color: rgba(217, 235, 27, 0.2);
249
+ border: 1px solid #d9eb1b;
250
+ color: #d9eb1b;
251
+ padding: 0.25rem 0.75rem;
252
+ border-radius: 9999px;
253
+ font-size: 0.75rem;
254
+ font-weight: 600;
255
+ margin-top: 0.5rem;
256
+ }
257
+
258
+ .loader {
259
+ width: 48px;
260
+ height: 48px;
261
+ position: relative;
262
+ }
263
+ .loader::before , .loader::after{
264
+ content: '';
265
+ position: absolute;
266
+ left: 50%;
267
+ top: 50%;
268
+ transform: translate(-50% , -50%);
269
+ width: 48em;
270
+ height: 48em;
271
+ background-image:
272
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
273
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
274
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
275
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
276
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
277
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
278
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0),
279
+ radial-gradient(circle 10px, #d9eb1b 100%, transparent 0);
280
+ background-position: 0em -18em, 0em 18em, 18em 0em, -18em 0em,
281
+ 13em -13em, -13em -13em, 13em 13em, -13em 13em;
282
+ background-repeat: no-repeat;
283
+ font-size: 0.5px;
284
+ border-radius: 50%;
285
+ animation: blast 1s ease-in infinite;
286
+ }
287
+ .loader::after {
288
+ font-size: 1px;
289
+ background: #d9eb1b;
290
+ animation: bounce 1s ease-in infinite;
291
+ }
292
+
293
+ @keyframes bounce {
294
+ 0% , 100%{ font-size: 0.75px }
295
+ 50% { font-size: 1.5px }
296
+ }
297
+ @keyframes blast {
298
+ 0% , 40% {
299
+ font-size: 0.5px;
300
+ }
301
+ 70% {
302
+ opacity: 1;
303
+ font-size: 4px;
304
+ }
305
+ 100% {
306
+ font-size: 6px;
307
+ opacity: 0;
308
+ }
309
+ }
310
+ ` }), _jsx("div", { style: { maxWidth: "300px" }, children: !config.continuousMode && (_jsxs("div", { style: {
311
+ maxWidth: "300px",
312
+ gap: "40px",
313
+ display: "flex",
314
+ justifyContent: "space-between",
315
+ alignItems: "center",
316
+ }, children: [_jsx("button", { type: "button", onClick: () => {
317
+ start();
318
+ setIsOpen(true);
319
+ }, disabled: isOpen || config.continuousMode, children: config.buttonComponent ? (config.buttonComponent) : (_jsx(PelicanButton, { authType: config.authType, text: config.buttonText })) }), isOpen && !config.continuousMode && (_jsx("button", { onClick: () => {
320
+ stop();
321
+ config.onClose?.();
322
+ setIsOpen(false);
323
+ }, className: "close-button", "aria-label": "Close", type: "button", children: _jsx("svg", { className: "close-icon", fill: "#6a7282", stroke: "#6a7282", viewBox: "0 0 24 24", role: "img", "aria-label": "close icon", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 4, d: "M6 18L18 6M6 6l12 12" }) }) }))] })) }), _jsxs("div", { className: "auth-container", children: [successMessage && (_jsxs("div", { className: "success-message", children: [successMessage, config.continuousMode && (_jsx("div", { style: { fontSize: "0.875rem", marginTop: "0.5rem" }, children: "Preparing next session..." }))] })), isProcessing ? (_jsxs("div", { className: "content-wrapper", children: [_jsx("h2", { className: "main-heading", children: config.continuousMode
324
+ ? "Preparing new session..."
325
+ : "Starting authentication..." }), _jsx("div", { className: "qr-wrapper", children: _jsx("span", { className: "loader" }) })] })) : (_jsxs("div", { className: "content-wrapper", children: [state === "awaiting-pair" && !successMessage && (_jsxs("div", { className: "unpaired-container", children: [_jsx("h2", { className: "main-heading", children: config.forceQRCode || state === "awaiting-pair"
326
+ ? "Open the Pelican Vault app"
327
+ : `Authenticate with Pelican Vault` }), !config.forceQRCode && deeplink ? (_jsxs("div", { className: "mobile-auth-container", children: [_jsx("div", { className: "logo-container", children: _jsx("svg", { width: 82, height: 96, viewBox: "0 0 588 640", fill: "none", role: "img", "aria-label": "Pelican Logo", children: _jsx("path", { d: "M357.79 383.899C357.99 372.409 367.47 358.149 379.03 352.079C391.03 345.819 400.26 350.269 400.13 362.279C399.94 373.899 390.26 388.479 378.7 394.479C367.14 400.479 357.6 395.839 357.79 383.899ZM486.16 316.459C487.06 315.809 488.55 314.069 488.55 313.459C488.74 307.009 488.67 300.689 488.67 293.909C470.15 305.979 452.21 317.719 434.27 329.469V350.379C436.01 349.219 437.5 348.249 438.98 347.279C454.66 336.999 470.41 326.779 486.16 316.459ZM482.54 400.359C470.529 418.676 454.87 434.318 436.54 446.309C420.21 457.209 404.54 463.019 389.94 462.699C374.94 462.309 364.84 455.339 358.94 441.919C364.62 437.009 369.72 432.489 374.82 428.039C377.02 431.039 378.76 434.169 381.21 436.429C391.02 445.659 405.15 445.009 422.21 437.139C424.21 436.139 426.14 435.079 428.14 433.979C436.34 429.459 440.53 424.229 442.6 414.979C444.28 407.299 445.31 399.869 446.66 392.259C448.387 382.382 451.533 372.806 456 363.829C461.23 353.309 468.59 345.369 478.08 341.629C486.53 338.269 491.95 340.629 494.66 347.049C500.81 361.889 495.64 380.279 482.54 400.359ZM478.87 362.999C478.35 361.509 476.73 359.999 475.32 360.419C473.91 360.839 471.64 363.899 470.41 365.969C469.016 368.283 467.953 370.781 467.25 373.389C464.67 384.619 462.25 395.779 459.76 406.949C460.192 406.935 460.623 406.892 461.05 406.819C467.51 399.399 473.05 391.519 476.73 382.749C479.9 375.119 480.54 368.539 478.87 362.999ZM587.54 222.999V416.419C587.537 438.587 581.704 460.364 570.627 479.566C559.55 498.767 543.618 514.719 524.43 525.819L357 622.489C337.794 633.588 316.003 639.432 293.82 639.432C271.637 639.432 249.846 633.588 230.64 622.489L63.12 525.819C43.9293 514.721 27.995 498.77 16.9161 479.568C5.83724 460.366 0.00339985 438.588 0 416.419L0 222.999C0.006907 200.834 5.84241 179.06 16.9211 159.861C27.9999 140.663 43.9322 124.716 63.12 113.619L230.59 16.9391C249.796 5.83984 271.587 -0.00390625 293.77 -0.00390625C315.953 -0.00390625 337.744 5.83984 356.95 16.9391L524.43 113.619C543.615 124.718 559.545 140.666 570.622 159.864C581.699 179.062 587.533 200.835 587.54 222.999ZM559.47 298.119C559.47 247.519 518.47 228.289 467.83 255.199L323.46 331.999C311.58 338.319 301.97 353.099 301.97 364.999V579.379C301.97 591.319 311.58 595.769 323.46 589.449L377.15 560.919C382.557 557.892 387.127 553.569 390.45 548.339C393.87 543.109 396 537.339 396 532.079C396 526.329 400.65 519.229 406.39 516.199L433.11 501.939C438.137 499.272 442.977 496.559 447.63 493.799L467.83 483.089C518.43 456.089 559.47 393.259 559.47 342.659V298.119Z", fill: "#D9EB1B" }) }) }), _jsx("a", { href: deeplink, className: "open-app-link", children: "Open Pelican App" }), _jsx("p", { className: "helper-text", children: "Tap the button above to open the app and authenticate" })] })) : config.forceQRCode ? (_jsx("div", { className: "qr-container", children: _jsxs("div", { className: "qr-wrapper", children: [qr && (_jsx("img", { src: qr, alt: "QR Code", className: "qr-image" })), !qr && _jsx("span", { className: "loader" })] }) })) : (_jsx("div", { className: "loader-container", children: _jsx("span", { className: "loader" }) })), !config.continuousMode && (_jsxs("p", { className: "instruction-text", children: ["Scan barcode to", " ", config.authType === "login"
328
+ ? "login"
329
+ : config.authType === "signup"
330
+ ? "sign up"
331
+ : config.authType === "id-verification"
332
+ ? "verify identity"
333
+ : "authenticate"] }))] })), state === "paired" && !successMessage && (_jsxs("div", { className: "paired-container", children: [_jsx("h2", { className: "main-heading", children: "Authorize on your mobile device" }), _jsx("div", { className: "loader-container", children: _jsx("span", { className: "loader" }) }), _jsx("p", { className: "instruction-text", children: "Enter your passcode on your mobile device to continue" }), !config.continuousMode && _jsx(StoreIcons, {})] }))] }))] })] }));
334
+ };
335
+ export default PelicanAuth;
336
+ //# sourceMappingURL=PelicanAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PelicanAuth.js","sourceRoot":"","sources":["../../src/components/PelicanAuth.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAoB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,WAAW,GAAG,CAAC,MAAwB,EA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AA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,QAAA,MAAM,aAAa,GAAI,qBAGpB;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,4CAmCA,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePelicanAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/usePelicanAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IAMzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAOrB,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAO5C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAOjC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAOlC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,GAAI,QAAQ,gBAAgB;;;;;;;;CA2CtD,CAAC"}