diff --git a/backend/email.js b/backend/email.js
new file mode 100644
index 0000000..4f57c17
--- /dev/null
+++ b/backend/email.js
@@ -0,0 +1,45 @@
+const nodemailer = require("nodemailer");
+const fs = require("fs");
+const path = require("path");
+require("dotenv").config();
+
+/* ---------- TRANSPORTER ---------- */
+const transporter = nodemailer.createTransport({
+ host: process.env.SMTP_HOST,
+ port: process.env.SMTP_PORT,
+ secure: false,
+ auth: {
+ user: process.env.SMTP_USER,
+ pass: process.env.SMTP_PASS,
+ },
+});
+
+/* ---------- SEND EMAIL ---------- */
+async function sendConfirmationEmail(to, teamName) {
+ try {
+ const templatePath = path.join(
+ __dirname,
+ "templates",
+ "email.html"
+ );
+
+ let html = fs.readFileSync(templatePath, "utf-8");
+
+ // Replace placeholders
+ html = html.replace(/{{TEAM_NAME}}/g, teamName);
+
+ await transporter.sendMail({
+ from: `"Hackathon Team" <${process.env.SMTP_USER}>`,
+ to,
+ subject: "Hackathon Registration Confirmation",
+ html,
+ });
+
+ console.log("✔ Confirmation email sent to:", to);
+ } catch (err) {
+ console.error("❌ Email sending failed:", err);
+ throw err;
+ }
+}
+
+module.exports = { sendConfirmationEmail };
diff --git a/backend/node_modules/.package-lock.json b/backend/node_modules/.package-lock.json
new file mode 100644
index 0000000..29b48a8
--- /dev/null
+++ b/backend/node_modules/.package-lock.json
@@ -0,0 +1,1000 @@
+{
+ "name": "backend",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@supabase/auth-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.87.1.tgz",
+ "integrity": "sha512-6RDeOf5TVoaXFtEstN188ykp3pXLZaU9qoAWfx8dc50FFAAqt+kcFJ96V0IvSmcpb4mDAWcpTJ7BegmVDn/WIw==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/functions-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.87.1.tgz",
+ "integrity": "sha512-rWmYo4gRD0XAjMhYDlz7IH67bp4TIQ1UE4VqwIQtl1gGPwtLDq6wcRnu7jLKlXx0Gtrknw/eoiHYG9//XrCTzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/postgrest-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.87.1.tgz",
+ "integrity": "sha512-Yzu5eL3iGmZW0C/8x+vEojAOou63FI9oVw8HI8YOq63+5yM8g8aGh7Y1E2vbXFb7+gHGsPqLnaC6dPhrYt7qBA==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/realtime-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.87.1.tgz",
+ "integrity": "sha512-XvLtEznxmYZXA7LYuy5zbSXpSYjDLJq2wQeRh3MzON2OR4U8Kq+RtPz2E2Wi8HEzvBfsc+nNu1TG8LQ9+3DRkA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/phoenix": "^1.6.6",
+ "@types/ws": "^8.18.1",
+ "tslib": "2.8.1",
+ "ws": "^8.18.2"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/storage-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.87.1.tgz",
+ "integrity": "sha512-0Uc8tNV4yzkNNmp1inpXru0RB4a7ECq05G2S6BDvSpMxTxJrDVJ4vVDwyhqB8ZZ+O9+8prHaQYoByQeuDnwpFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "iceberg-js": "^0.8.1",
+ "tslib": "2.8.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@supabase/supabase-js": {
+ "version": "2.87.1",
+ "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.87.1.tgz",
+ "integrity": "sha512-tVgqZqnHZVum584KuUKSQZgcy6ZkhVd6gG8QWg2QfIXH9HmXdamauxdVsLXwaNPJxEdOyfAfwIyi5XUsiVYWtg==",
+ "license": "MIT",
+ "dependencies": {
+ "@supabase/auth-js": "2.87.1",
+ "@supabase/functions-js": "2.87.1",
+ "@supabase/postgrest-js": "2.87.1",
+ "@supabase/realtime-js": "2.87.1",
+ "@supabase/storage-js": "2.87.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "25.0.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.0.tgz",
+ "integrity": "sha512-rl78HwuZlaDIUSeUKkmogkhebA+8K1Hy7tddZuJ3D0xV8pZSfsYGTsliGUol1JPzu9EKnTxPC4L1fiWouStRew==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~7.16.0"
+ }
+ },
+ "node_modules/@types/phoenix": {
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/@types/phoenix/-/phoenix-1.6.7.tgz",
+ "integrity": "sha512-oN9ive//QSBkf19rfDv45M7eZPi0eEXylht2OLEXicu5b4KoQ1OzXIw+xDSGWxSxe1JmepRR/ZH283vsu518/Q==",
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.18.1",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/body-parser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
+ "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^1.0.5",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.0",
+ "iconv-lite": "^0.7.0",
+ "on-finished": "^2.4.1",
+ "qs": "^6.14.0",
+ "raw-body": "^3.0.1",
+ "type-is": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/content-disposition": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
+ "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.5",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+ "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "17.2.3",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
+ "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/iceberg-js": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz",
+ "integrity": "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz",
+ "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
+ "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.54.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
+ "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
+ "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "^1.54.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/negotiator": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
+ "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/nodemailer": {
+ "version": "7.0.11",
+ "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.11.tgz",
+ "integrity": "sha512-gnXhNRE0FNhD7wPSCGhdNh46Hs6nm+uTyg+Kq0cZukNQiYdnCsoQjodNP9BQVG9XrcK/v6/MgpAPBUFyzh9pvw==",
+ "license": "MIT-0",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
+ "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/qs": {
+ "version": "6.14.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
+ "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "side-channel": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
+ "node_modules/send": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",
+ "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "mime-types": "^3.0.1",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",
+ "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
+ "node_modules/side-channel": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
+ "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3",
+ "side-channel-list": "^1.0.0",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
+ "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
+ "node_modules/type-is": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
+ "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^1.0.5",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
+ "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
+ "license": "MIT"
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "license": "ISC"
+ },
+ "node_modules/ws": {
+ "version": "8.18.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/backend/node_modules/@supabase/auth-js/LICENSE b/backend/node_modules/@supabase/auth-js/LICENSE
new file mode 100644
index 0000000..ddeba6a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/backend/node_modules/@supabase/auth-js/README.md b/backend/node_modules/@supabase/auth-js/README.md
new file mode 100644
index 0000000..d23aee3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/README.md
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
Supabase Auth JS SDK
+
+ An isomorphic JavaScript SDK for the Supabase Auth API.
+
+
+ Guides
+ ·
+ Reference Docs
+ ·
+ TypeDoc
+
+
+
+
+
+[](https://github.com/supabase/supabase-js/actions?query=branch%3Amaster)
+[](https://www.npmjs.com/package/@supabase/auth-js)
+[](#license)
+[](https://pkg.pr.new/~/supabase/auth-js)
+
+
+
+## Requirements
+
+- **Node.js 20 or later** (Node.js 18 support dropped as of October 31, 2025)
+- For browser support, all modern browsers are supported
+
+> ⚠️ **Node.js 18 Deprecation Notice**
+>
+> Node.js 18 reached end-of-life on April 30, 2025. As announced in [our deprecation notice](https://github.com/orgs/supabase/discussions/37217), support for Node.js 18 was dropped on October 31, 2025.
+
+## Quick start
+
+Install
+
+```bash
+npm install --save @supabase/auth-js
+```
+
+Usage
+
+```js
+import { AuthClient } from '@supabase/auth-js'
+
+const GOTRUE_URL = 'http://localhost:9999'
+
+const auth = new AuthClient({ url: GOTRUE_URL })
+```
+
+- `signUp()`: https://supabase.com/docs/reference/javascript/auth-signup
+- `signIn()`: https://supabase.com/docs/reference/javascript/auth-signin
+- `signOut()`: https://supabase.com/docs/reference/javascript/auth-signout
+
+### Custom `fetch` implementation
+
+`auth-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
+
+```js
+import { AuthClient } from '@supabase/auth-js'
+
+const AUTH_URL = 'http://localhost:9999'
+
+const auth = new AuthClient({ url: AUTH_URL, fetch: fetch })
+```
+
+## Development
+
+This package is part of the [Supabase JavaScript monorepo](https://github.com/supabase/supabase-js). To work on this package:
+
+### Building
+
+```bash
+# Complete build (from monorepo root)
+npx nx build auth-js
+
+# Build with watch mode for development
+npx nx build auth-js --watch
+
+# Individual build targets
+npx nx build:main auth-js # CommonJS build (dist/main/)
+npx nx build:module auth-js # ES Modules build (dist/module/)
+
+# Other useful commands
+npx nx lint auth-js # Run ESLint
+npx nx typecheck auth-js # TypeScript type checking
+npx nx docs auth-js # Generate documentation
+```
+
+#### Build Outputs
+
+- **CommonJS (`dist/main/`)** - For Node.js environments
+- **ES Modules (`dist/module/`)** - For modern bundlers (Webpack, Vite, Rollup)
+- **TypeScript definitions (`dist/module/index.d.ts`)** - Type definitions for TypeScript projects
+
+### Testing
+
+**Docker Required!** The auth-js tests require a local Supabase Auth server (GoTrue) running in Docker.
+
+```bash
+# Run complete test suite (from monorepo root)
+npx nx test:auth auth-js
+```
+
+This command automatically:
+
+1. Stops any existing test containers
+2. Starts a Supabase Auth server (GoTrue) and PostgreSQL database in Docker
+3. Waits for services to be ready (30 seconds)
+4. Runs the test suite
+5. Cleans up Docker containers after tests complete
+
+#### Individual Test Commands
+
+```bash
+# Run just the test suite (requires infrastructure to be running)
+npx nx test:suite auth-js
+
+# Manually manage test infrastructure
+npx nx test:infra auth-js # Start Docker containers
+npx nx test:clean auth-js # Stop and remove containers
+```
+
+#### Development Testing
+
+For actively developing and debugging tests:
+
+```bash
+# Start infrastructure once
+npx nx test:infra auth-js
+
+# Run tests multiple times (faster since containers stay up)
+npx nx test:suite auth-js
+
+# Clean up when done
+npx nx test:clean auth-js
+```
+
+#### Test Infrastructure
+
+The Docker setup includes:
+
+- **Supabase Auth (GoTrue)** - The authentication server
+- **PostgreSQL** - Database for auth data
+- Pre-configured with test users and settings
+
+#### Prerequisites
+
+- **Docker** must be installed and running
+- Ports used by test infrastructure (check `infra/docker-compose.yml`)
+- No full Supabase instance needed - just the Auth server
+
+### Contributing
+
+We welcome contributions! Please see our [Contributing Guide](../../../CONTRIBUTING.md) for details on how to get started.
+
+For major changes or if you're unsure about something, please open an issue first to discuss your proposed changes.
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts
new file mode 100644
index 0000000..aacb97d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts
@@ -0,0 +1,4 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+declare const AuthAdminApi: typeof GoTrueAdminApi;
+export default AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map
new file mode 100644
index 0000000..5c6efa8
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthAdminApi.d.ts","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,QAAA,MAAM,YAAY,uBAAiB,CAAA;AAEnC,eAAe,YAAY,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
new file mode 100644
index 0000000..0fed974
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = require("tslib");
+const GoTrueAdminApi_1 = tslib_1.__importDefault(require("./GoTrueAdminApi"));
+const AuthAdminApi = GoTrueAdminApi_1.default;
+exports.default = AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map
new file mode 100644
index 0000000..6e77d09
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthAdminApi.js","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":";;;AAAA,8EAA6C;AAE7C,MAAM,YAAY,GAAG,wBAAc,CAAA;AAEnC,kBAAe,YAAY,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts
new file mode 100644
index 0000000..596eec9
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts
@@ -0,0 +1,4 @@
+import GoTrueClient from './GoTrueClient';
+declare const AuthClient: typeof GoTrueClient;
+export default AuthClient;
+//# sourceMappingURL=AuthClient.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map
new file mode 100644
index 0000000..503d802
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthClient.d.ts","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,QAAA,MAAM,UAAU,qBAAe,CAAA;AAE/B,eAAe,UAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js
new file mode 100644
index 0000000..d6e667d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js
@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = require("tslib");
+const GoTrueClient_1 = tslib_1.__importDefault(require("./GoTrueClient"));
+const AuthClient = GoTrueClient_1.default;
+exports.default = AuthClient;
+//# sourceMappingURL=AuthClient.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map
new file mode 100644
index 0000000..176c212
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthClient.js","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":";;;AAAA,0EAAyC;AAEzC,MAAM,UAAU,GAAG,sBAAY,CAAA;AAE/B,kBAAe,UAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts
new file mode 100644
index 0000000..036f90b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts
@@ -0,0 +1,159 @@
+import { Fetch } from './lib/fetch';
+import { AdminUserAttributes, GenerateLinkParams, GenerateLinkResponse, Pagination, User, UserResponse, GoTrueAdminMFAApi, PageParams, SignOutScope, GoTrueAdminOAuthApi } from './lib/types';
+import { AuthError } from './lib/errors';
+export default class GoTrueAdminApi {
+ /** Contains all MFA administration methods. */
+ mfa: GoTrueAdminMFAApi;
+ /**
+ * Contains all OAuth client administration methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ oauth: GoTrueAdminOAuthApi;
+ protected url: string;
+ protected headers: {
+ [key: string]: string;
+ };
+ protected fetch: Fetch;
+ /**
+ * Creates an admin API client that can be used to manage users and OAuth clients.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueAdminApi } from '@supabase/auth-js'
+ *
+ * const admin = new GoTrueAdminApi({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { Authorization: `Bearer ${process.env.SUPABASE_SERVICE_ROLE_KEY}` },
+ * })
+ * ```
+ */
+ constructor({ url, headers, fetch, }: {
+ url: string;
+ headers?: {
+ [key: string]: string;
+ };
+ fetch?: Fetch;
+ });
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ signOut(jwt: string, scope?: SignOutScope): Promise<{
+ data: null;
+ error: AuthError | null;
+ }>;
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ inviteUserByEmail(email: string, options?: {
+ /** A custom data object to store additional metadata about the user. This maps to the `auth.users.user_metadata` column. */
+ data?: object;
+ /** The URL which will be appended to the email link sent to the user's email address. Once clicked the user will end up on this URL. */
+ redirectTo?: string;
+ }): Promise;
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ generateLink(params: GenerateLinkParams): Promise;
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ createUser(attributes: AdminUserAttributes): Promise;
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ listUsers(params?: PageParams): Promise<{
+ data: {
+ users: User[];
+ aud: string;
+ } & Pagination;
+ error: null;
+ } | {
+ data: {
+ users: [];
+ };
+ error: AuthError;
+ }>;
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ getUserById(uid: string): Promise;
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ updateUserById(uid: string, attributes: AdminUserAttributes): Promise;
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ deleteUser(id: string, shouldSoftDelete?: boolean): Promise;
+ private _listFactors;
+ private _deleteFactor;
+ /**
+ * Lists all OAuth clients with optional pagination.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _listOAuthClients;
+ /**
+ * Creates a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _createOAuthClient;
+ /**
+ * Gets details of a specific OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _getOAuthClient;
+ /**
+ * Updates an existing OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _updateOAuthClient;
+ /**
+ * Deletes an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _deleteOAuthClient;
+ /**
+ * Regenerates the secret for an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _regenerateOAuthClientSecret;
+}
+//# sourceMappingURL=GoTrueAdminApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map
new file mode 100644
index 0000000..88941da
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueAdminApi.d.ts","sourceRoot":"","sources":["../../src/GoTrueAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,iBAAiB,EAKjB,UAAU,EAEV,YAAY,EACZ,mBAAmB,EAKpB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAA;AAErD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,+CAA+C;IAC/C,GAAG,EAAE,iBAAiB,CAAA;IA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QAAE,IAAI,EAAE;YAAE,KAAK,EAAE,EAAE,CAAA;SAAE,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CAC5C;IAmCD;;;;;;OAMG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAiBrD;;;;;;OAMG;IACG,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAkBzF;;;;;;;;OAQG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,OAAO,CAAC,YAAY,CAAC;YAoB/D,YAAY;YA2BZ,aAAa;IA0B3B;;;;;OAKG;YACW,iBAAiB;IAmC/B;;;;;OAKG;YACW,kBAAkB;IAkBhC;;;;;OAKG;YACW,eAAe;IAiB7B;;;;;OAKG;YACW,kBAAkB;IAqBhC;;;;;OAKG;YACW,kBAAkB;IAkBhC;;;;;OAKG;YACW,4BAA4B;CAqB3C"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
new file mode 100644
index 0000000..5e7e5fa
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
@@ -0,0 +1,441 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = require("tslib");
+const fetch_1 = require("./lib/fetch");
+const helpers_1 = require("./lib/helpers");
+const types_1 = require("./lib/types");
+const errors_1 = require("./lib/errors");
+class GoTrueAdminApi {
+ /**
+ * Creates an admin API client that can be used to manage users and OAuth clients.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueAdminApi } from '@supabase/auth-js'
+ *
+ * const admin = new GoTrueAdminApi({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { Authorization: `Bearer ${process.env.SUPABASE_SERVICE_ROLE_KEY}` },
+ * })
+ * ```
+ */
+ constructor({ url = '', headers = {}, fetch, }) {
+ this.url = url;
+ this.headers = headers;
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
+ this.mfa = {
+ listFactors: this._listFactors.bind(this),
+ deleteFactor: this._deleteFactor.bind(this),
+ };
+ this.oauth = {
+ listClients: this._listOAuthClients.bind(this),
+ createClient: this._createOAuthClient.bind(this),
+ getClient: this._getOAuthClient.bind(this),
+ updateClient: this._updateOAuthClient.bind(this),
+ deleteClient: this._deleteOAuthClient.bind(this),
+ regenerateClientSecret: this._regenerateOAuthClientSecret.bind(this),
+ };
+ }
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ async signOut(jwt, scope = types_1.SIGN_OUT_SCOPES[0]) {
+ if (types_1.SIGN_OUT_SCOPES.indexOf(scope) < 0) {
+ throw new Error(`@supabase/auth-js: Parameter scope must be one of ${types_1.SIGN_OUT_SCOPES.join(', ')}`);
+ }
+ try {
+ await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/logout?scope=${scope}`, {
+ headers: this.headers,
+ jwt,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ async inviteUserByEmail(email, options = {}) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/invite`, {
+ body: { email, data: options.data },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ async generateLink(params) {
+ try {
+ const { options } = params, rest = tslib_1.__rest(params, ["options"]);
+ const body = Object.assign(Object.assign({}, rest), options);
+ if ('newEmail' in rest) {
+ // replace newEmail with new_email in request body
+ body.new_email = rest === null || rest === void 0 ? void 0 : rest.newEmail;
+ delete body['newEmail'];
+ }
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
+ body: body,
+ headers: this.headers,
+ xform: fetch_1._generateLinkResponse,
+ redirectTo: options === null || options === void 0 ? void 0 : options.redirectTo,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return {
+ data: {
+ properties: null,
+ user: null,
+ },
+ error,
+ };
+ }
+ throw error;
+ }
+ }
+ // User Admin API
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async createUser(attributes) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/users`, {
+ body: attributes,
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ async listUsers(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: fetch_1._noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const users = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, users), pagination), error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { users: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async getUserById(uid) {
+ (0, helpers_1.validateUUID)(uid);
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async updateUserById(uid, attributes) {
+ (0, helpers_1.validateUUID)(uid);
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
+ body: attributes,
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async deleteUser(id, shouldSoftDelete = false) {
+ (0, helpers_1.validateUUID)(id);
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${id}`, {
+ headers: this.headers,
+ body: {
+ should_soft_delete: shouldSoftDelete,
+ },
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ async _listFactors(params) {
+ (0, helpers_1.validateUUID)(params.userId);
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/factors`, {
+ headers: this.headers,
+ xform: (factors) => {
+ return { data: { factors }, error: null };
+ },
+ });
+ return { data, error };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _deleteFactor(params) {
+ (0, helpers_1.validateUUID)(params.userId);
+ (0, helpers_1.validateUUID)(params.id);
+ try {
+ const data = await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/factors/${params.id}`, {
+ headers: this.headers,
+ });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Lists all OAuth clients with optional pagination.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _listOAuthClients(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/oauth/clients`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: fetch_1._noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const clients = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, clients), pagination), error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { clients: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _createOAuthClient(params) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/oauth/clients`, {
+ body: params,
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets details of a specific OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _getOAuthClient(clientId) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/oauth/clients/${clientId}`, {
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates an existing OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _updateOAuthClient(clientId, params) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/oauth/clients/${clientId}`, {
+ body: params,
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Deletes an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _deleteOAuthClient(clientId) {
+ try {
+ await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/oauth/clients/${clientId}`, {
+ headers: this.headers,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Regenerates the secret for an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _regenerateOAuthClientSecret(clientId) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/oauth/clients/${clientId}/regenerate_secret`, {
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+}
+exports.default = GoTrueAdminApi;
+//# sourceMappingURL=GoTrueAdminApi.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map
new file mode 100644
index 0000000..b56731d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueAdminApi.js","sourceRoot":"","sources":["../../src/GoTrueAdminApi.ts"],"names":[],"mappings":";;;AAAA,uCAMoB;AACpB,2CAA0D;AAC1D,uCAoBoB;AACpB,yCAAqD;AAErD,MAAqB,cAAc;IAgBjC;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,GAAG,GAAG,EAAE,EACR,OAAO,GAAG,EAAE,EACZ,KAAK,GAON;QACC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,IAAA,sBAAY,EAAC,KAAK,CAAC,CAAA;QAChC,IAAI,CAAC,GAAG,GAAG;YACT,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;YACzC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;SAC5C,CAAA;QACD,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9C,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,sBAAsB,EAAE,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,IAAI,C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C,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;YAC9B,CAAC;YAED,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,KAAK,CAAC,4BAA4B,CAAC,QAAgB;QACzD,IAAI,CAAC;YACH,OAAO,MAAM,IAAA,gBAAQ,EACnB,IAAI,CAAC,KAAK,EACV,MAAM,EACN,GAAG,IAAI,CAAC,GAAG,wBAAwB,QAAQ,oBAAoB,EAC/D;gBACE,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,CAAC,MAAW,EAAE,EAAE;oBACrB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;gBACtC,CAAC;aACF,CACF,CAAA;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;YAC9B,CAAC;YAED,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF;AAvgBD,iCAugBC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts
new file mode 100644
index 0000000..86030f0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts
@@ -0,0 +1,608 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import { AuthError } from './lib/errors';
+import { Fetch } from './lib/fetch';
+import { Deferred } from './lib/helpers';
+import type { AuthChangeEvent, AuthFlowType, AuthOtpResponse, AuthResponse, AuthTokenResponse, AuthTokenResponsePassword, CallRefreshTokenResult, GoTrueClientOptions, GoTrueMFAApi, InitializeResult, JWK, JwtHeader, JwtPayload, LockFunc, OAuthResponse, AuthOAuthServerApi, ResendParams, Session, SignInAnonymouslyCredentials, SignInWithIdTokenCredentials, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, SignInWithSSO, SignOut, SignUpWithPasswordCredentials, SSOResponse, Subscription, SupportedStorage, User, UserAttributes, UserIdentity, UserResponse, VerifyOtpParams, Web3Credentials } from './lib/types';
+export default class GoTrueClient {
+ private static nextInstanceID;
+ private instanceID;
+ /**
+ * Namespace for the GoTrue admin methods.
+ * These methods should only be used in a trusted server-side environment.
+ */
+ admin: GoTrueAdminApi;
+ /**
+ * Namespace for the MFA methods.
+ */
+ mfa: GoTrueMFAApi;
+ /**
+ * Namespace for the OAuth 2.1 authorization server methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ * Used to implement the authorization code flow on the consent page.
+ */
+ oauth: AuthOAuthServerApi;
+ /**
+ * The storage key used to identify the values saved in localStorage
+ */
+ protected storageKey: string;
+ protected flowType: AuthFlowType;
+ /**
+ * The JWKS used for verifying asymmetric JWTs
+ */
+ protected get jwks(): {
+ keys: JWK[];
+ };
+ protected set jwks(value: {
+ keys: JWK[];
+ });
+ protected get jwks_cached_at(): number;
+ protected set jwks_cached_at(value: number);
+ protected autoRefreshToken: boolean;
+ protected persistSession: boolean;
+ protected storage: SupportedStorage;
+ /**
+ * @experimental
+ */
+ protected userStorage: SupportedStorage | null;
+ protected memoryStorage: {
+ [key: string]: string;
+ } | null;
+ protected stateChangeEmitters: Map;
+ protected autoRefreshTicker: ReturnType | null;
+ protected visibilityChangedCallback: (() => Promise) | null;
+ protected refreshingDeferred: Deferred | null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the auth state is known and it's safe to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ protected initializePromise: Promise | null;
+ protected detectSessionInUrl: boolean;
+ protected url: string;
+ protected headers: {
+ [key: string]: string;
+ };
+ protected hasCustomAuthorizationHeader: boolean;
+ protected suppressGetSessionWarning: boolean;
+ protected fetch: Fetch;
+ protected lock: LockFunc;
+ protected lockAcquired: boolean;
+ protected pendingInLock: Promise[];
+ protected throwOnError: boolean;
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ protected broadcastChannel: BroadcastChannel | null;
+ protected logDebugMessages: boolean;
+ protected logger: (message: string, ...args: any[]) => void;
+ /**
+ * Create a new client for use in the browser.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueClient } from '@supabase/auth-js'
+ *
+ * const auth = new GoTrueClient({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { apikey: 'public-anon-key' },
+ * storageKey: 'supabase-auth',
+ * })
+ * ```
+ */
+ constructor(options: GoTrueClientOptions);
+ /**
+ * Returns whether error throwing mode is enabled for this client.
+ */
+ isThrowOnErrorEnabled(): boolean;
+ /**
+ * Centralizes return handling with optional error throwing. When `throwOnError` is enabled
+ * and the provided result contains a non-nullish error, the error is thrown instead of
+ * being returned. This ensures consistent behavior across all public API methods.
+ */
+ private _returnResult;
+ private _logPrefix;
+ private _debug;
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ initialize(): Promise;
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ private _initialize;
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ signInAnonymously(credentials?: SignInAnonymouslyCredentials): Promise;
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ signUp(credentials: SignUpWithPasswordCredentials): Promise;
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ signInWithPassword(credentials: SignInWithPasswordCredentials): Promise;
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ signInWithOAuth(credentials: SignInWithOAuthCredentials): Promise;
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ exchangeCodeForSession(authCode: string): Promise;
+ /**
+ * Signs in a user by verifying a message signed by the user's private key.
+ * Supports Ethereum (via Sign-In-With-Ethereum) & Solana (Sign-In-With-Solana) standards,
+ * both of which derive from the EIP-4361 standard
+ * With slight variation on Solana's side.
+ * @reference https://eips.ethereum.org/EIPS/eip-4361
+ */
+ signInWithWeb3(credentials: Web3Credentials): Promise<{
+ data: {
+ session: Session;
+ user: User;
+ };
+ error: null;
+ } | {
+ data: {
+ session: null;
+ user: null;
+ };
+ error: AuthError;
+ }>;
+ private signInWithEthereum;
+ private signInWithSolana;
+ private _exchangeCodeForSession;
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ signInWithIdToken(credentials: SignInWithIdTokenCredentials): Promise;
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ signInWithOtp(credentials: SignInWithPasswordlessCredentials): Promise;
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ verifyOtp(params: VerifyOtpParams): Promise;
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ signInWithSSO(params: SignInWithSSO): Promise;
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ reauthenticate(): Promise;
+ private _reauthenticate;
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ resend(credentials: ResendParams): Promise;
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ getSession(): Promise<{
+ data: {
+ session: Session;
+ };
+ error: null;
+ } | {
+ data: {
+ session: null;
+ };
+ error: AuthError;
+ } | {
+ data: {
+ session: null;
+ };
+ error: null;
+ }>;
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ private _acquireLock;
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ private _useSession;
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ private __loadSession;
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ getUser(jwt?: string): Promise;
+ private _getUser;
+ /**
+ * Updates user data for a logged in user.
+ */
+ updateUser(attributes: UserAttributes, options?: {
+ emailRedirectTo?: string | undefined;
+ }): Promise;
+ protected _updateUser(attributes: UserAttributes, options?: {
+ emailRedirectTo?: string | undefined;
+ }): Promise;
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ setSession(currentSession: {
+ access_token: string;
+ refresh_token: string;
+ }): Promise;
+ protected _setSession(currentSession: {
+ access_token: string;
+ refresh_token: string;
+ }): Promise;
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ refreshSession(currentSession?: {
+ refresh_token: string;
+ }): Promise;
+ protected _refreshSession(currentSession?: {
+ refresh_token: string;
+ }): Promise;
+ /**
+ * Gets the session data from a URL string
+ */
+ private _getSessionFromURL;
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ private _isImplicitGrantCallback;
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ private _isPKCECallback;
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ signOut(options?: SignOut): Promise<{
+ error: AuthError | null;
+ }>;
+ protected _signOut({ scope }?: SignOut): Promise<{
+ error: AuthError | null;
+ }>;
+ /**
+ * Receive a notification every time an auth event happens.
+ * Safe to use without an async function as callback.
+ *
+ * @param callback A callback function to be invoked when an auth event happens.
+ */
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => void): {
+ data: {
+ subscription: Subscription;
+ };
+ };
+ /**
+ * Avoid using an async function inside `onAuthStateChange` as you might end
+ * up with a deadlock. The callback function runs inside an exclusive lock,
+ * so calling other Supabase Client APIs that also try to acquire the
+ * exclusive lock, might cause a deadlock. This behavior is observable across
+ * tabs. In the next major library version, this behavior will not be supported.
+ *
+ * Receive a notification every time an auth event happens.
+ *
+ * @param callback A callback function to be invoked when an auth event happens.
+ * @deprecated Due to the possibility of deadlocks with async functions as callbacks, use the version without an async function.
+ */
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => Promise): {
+ data: {
+ subscription: Subscription;
+ };
+ };
+ private _emitInitialSession;
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ resetPasswordForEmail(email: string, options?: {
+ redirectTo?: string;
+ captchaToken?: string;
+ }): Promise<{
+ data: {};
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Gets all the identities linked to a user.
+ */
+ getUserIdentities(): Promise<{
+ data: {
+ identities: UserIdentity[];
+ };
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Links an oauth identity to an existing user.
+ * This method supports the PKCE flow.
+ */
+ linkIdentity(credentials: SignInWithOAuthCredentials): Promise;
+ /**
+ * Links an OIDC identity to an existing user.
+ */
+ linkIdentity(credentials: SignInWithIdTokenCredentials): Promise;
+ private linkIdentityOAuth;
+ private linkIdentityIdToken;
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ unlinkIdentity(identity: UserIdentity): Promise<{
+ data: {};
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ private _refreshAccessToken;
+ private _isValidSession;
+ private _handleProviderSignIn;
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ private _recoverAndRefresh;
+ private _callRefreshToken;
+ private _notifyAllSubscribers;
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ private _saveSession;
+ private _removeSession;
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ private _removeVisibilityChangedCallback;
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ private _startAutoRefresh;
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ private _stopAutoRefresh;
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ startAutoRefresh(): Promise;
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ stopAutoRefresh(): Promise;
+ /**
+ * Runs the auto refresh token tick.
+ */
+ private _autoRefreshTokenTick;
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ private _handleVisibilityChange;
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ private _onVisibilityChanged;
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ private _getUrlForProvider;
+ private _unenroll;
+ /**
+ * {@see GoTrueMFAApi#enroll}
+ */
+ private _enroll;
+ /**
+ * {@see GoTrueMFAApi#verify}
+ */
+ private _verify;
+ /**
+ * {@see GoTrueMFAApi#challenge}
+ */
+ private _challenge;
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ private _challengeAndVerify;
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ private _listFactors;
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ private _getAuthenticatorAssuranceLevel;
+ /**
+ * Retrieves details about an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * Returns authorization details including client info, scopes, and user information.
+ * If the API returns a redirect_uri, it means consent was already given - the caller
+ * should handle the redirect manually if needed.
+ */
+ private _getAuthorizationDetails;
+ /**
+ * Approves an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _approveAuthorization;
+ /**
+ * Denies an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _denyAuthorization;
+ /**
+ * Lists all OAuth grants that the authenticated user has authorized.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _listOAuthGrants;
+ /**
+ * Revokes a user's OAuth grant for a specific client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _revokeOAuthGrant;
+ private fetchJwk;
+ /**
+ * Extracts the JWT claims present in the access token by first verifying the
+ * JWT against the server's JSON Web Key Set endpoint
+ * `/.well-known/jwks.json` which is often cached, resulting in significantly
+ * faster responses. Prefer this method over {@link #getUser} which always
+ * sends a request to the Auth server for each JWT.
+ *
+ * If the project is not using an asymmetric JWT signing key (like ECC or
+ * RSA) it always sends a request to the Auth server (similar to {@link
+ * #getUser}) to verify the JWT.
+ *
+ * @param jwt An optional specific JWT you wish to verify, not the one you
+ * can obtain from {@link #getSession}.
+ * @param options Various additional options that allow you to customize the
+ * behavior of this method.
+ */
+ getClaims(jwt?: string, options?: {
+ /**
+ * @deprecated Please use options.jwks instead.
+ */
+ keys?: JWK[];
+ /** If set to `true` the `exp` claim will not be validated against the current time. */
+ allowExpired?: boolean;
+ /** If set, this JSON Web Key Set is going to have precedence over the cached value available on the server. */
+ jwks?: {
+ keys: JWK[];
+ };
+ }): Promise<{
+ data: {
+ claims: JwtPayload;
+ header: JwtHeader;
+ signature: Uint8Array;
+ };
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ } | {
+ data: null;
+ error: null;
+ }>;
+}
+//# sourceMappingURL=GoTrueClient.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map
new file mode 100644
index 0000000..f01c185
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueClient.d.ts","sourceRoot":"","sources":["../../src/GoTrueClient.ts"],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AAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,CAC9B;CAmFF"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
new file mode 100644
index 0000000..1dac21e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
@@ -0,0 +1,2789 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const tslib_1 = require("tslib");
+const GoTrueAdminApi_1 = tslib_1.__importDefault(require("./GoTrueAdminApi"));
+const constants_1 = require("./lib/constants");
+const errors_1 = require("./lib/errors");
+const fetch_1 = require("./lib/fetch");
+const helpers_1 = require("./lib/helpers");
+const local_storage_1 = require("./lib/local-storage");
+const locks_1 = require("./lib/locks");
+const polyfills_1 = require("./lib/polyfills");
+const version_1 = require("./lib/version");
+const base64url_1 = require("./lib/base64url");
+const ethereum_1 = require("./lib/web3/ethereum");
+const webauthn_1 = require("./lib/webauthn");
+(0, polyfills_1.polyfillGlobalThis)(); // Make "globalThis" available
+const DEFAULT_OPTIONS = {
+ url: constants_1.GOTRUE_URL,
+ storageKey: constants_1.STORAGE_KEY,
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ headers: constants_1.DEFAULT_HEADERS,
+ flowType: 'implicit',
+ debug: false,
+ hasCustomAuthorizationHeader: false,
+ throwOnError: false,
+};
+async function lockNoOp(name, acquireTimeout, fn) {
+ return await fn();
+}
+/**
+ * Caches JWKS values for all clients created in the same environment. This is
+ * especially useful for shared-memory execution environments such as Vercel's
+ * Fluid Compute, AWS Lambda or Supabase's Edge Functions. Regardless of how
+ * many clients are created, if they share the same storage key they will use
+ * the same JWKS cache, significantly speeding up getClaims() with asymmetric
+ * JWTs.
+ */
+const GLOBAL_JWKS = {};
+class GoTrueClient {
+ /**
+ * The JWKS used for verifying asymmetric JWTs
+ */
+ get jwks() {
+ var _a, _b;
+ return (_b = (_a = GLOBAL_JWKS[this.storageKey]) === null || _a === void 0 ? void 0 : _a.jwks) !== null && _b !== void 0 ? _b : { keys: [] };
+ }
+ set jwks(value) {
+ GLOBAL_JWKS[this.storageKey] = Object.assign(Object.assign({}, GLOBAL_JWKS[this.storageKey]), { jwks: value });
+ }
+ get jwks_cached_at() {
+ var _a, _b;
+ return (_b = (_a = GLOBAL_JWKS[this.storageKey]) === null || _a === void 0 ? void 0 : _a.cachedAt) !== null && _b !== void 0 ? _b : Number.MIN_SAFE_INTEGER;
+ }
+ set jwks_cached_at(value) {
+ GLOBAL_JWKS[this.storageKey] = Object.assign(Object.assign({}, GLOBAL_JWKS[this.storageKey]), { cachedAt: value });
+ }
+ /**
+ * Create a new client for use in the browser.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueClient } from '@supabase/auth-js'
+ *
+ * const auth = new GoTrueClient({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { apikey: 'public-anon-key' },
+ * storageKey: 'supabase-auth',
+ * })
+ * ```
+ */
+ constructor(options) {
+ var _a, _b, _c;
+ /**
+ * @experimental
+ */
+ this.userStorage = null;
+ this.memoryStorage = null;
+ this.stateChangeEmitters = new Map();
+ this.autoRefreshTicker = null;
+ this.visibilityChangedCallback = null;
+ this.refreshingDeferred = null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the auth state is known and it's safe to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ this.initializePromise = null;
+ this.detectSessionInUrl = true;
+ this.hasCustomAuthorizationHeader = false;
+ this.suppressGetSessionWarning = false;
+ this.lockAcquired = false;
+ this.pendingInLock = [];
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ this.broadcastChannel = null;
+ this.logger = console.log;
+ const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);
+ this.storageKey = settings.storageKey;
+ this.instanceID = (_a = GoTrueClient.nextInstanceID[this.storageKey]) !== null && _a !== void 0 ? _a : 0;
+ GoTrueClient.nextInstanceID[this.storageKey] = this.instanceID + 1;
+ this.logDebugMessages = !!settings.debug;
+ if (typeof settings.debug === 'function') {
+ this.logger = settings.debug;
+ }
+ if (this.instanceID > 0 && (0, helpers_1.isBrowser)()) {
+ const message = `${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;
+ console.warn(message);
+ if (this.logDebugMessages) {
+ console.trace(message);
+ }
+ }
+ this.persistSession = settings.persistSession;
+ this.autoRefreshToken = settings.autoRefreshToken;
+ this.admin = new GoTrueAdminApi_1.default({
+ url: settings.url,
+ headers: settings.headers,
+ fetch: settings.fetch,
+ });
+ this.url = settings.url;
+ this.headers = settings.headers;
+ this.fetch = (0, helpers_1.resolveFetch)(settings.fetch);
+ this.lock = settings.lock || lockNoOp;
+ this.detectSessionInUrl = settings.detectSessionInUrl;
+ this.flowType = settings.flowType;
+ this.hasCustomAuthorizationHeader = settings.hasCustomAuthorizationHeader;
+ this.throwOnError = settings.throwOnError;
+ if (settings.lock) {
+ this.lock = settings.lock;
+ }
+ else if (this.persistSession && (0, helpers_1.isBrowser)() && ((_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _b === void 0 ? void 0 : _b.locks)) {
+ this.lock = locks_1.navigatorLock;
+ }
+ else {
+ this.lock = lockNoOp;
+ }
+ if (!this.jwks) {
+ this.jwks = { keys: [] };
+ this.jwks_cached_at = Number.MIN_SAFE_INTEGER;
+ }
+ this.mfa = {
+ verify: this._verify.bind(this),
+ enroll: this._enroll.bind(this),
+ unenroll: this._unenroll.bind(this),
+ challenge: this._challenge.bind(this),
+ listFactors: this._listFactors.bind(this),
+ challengeAndVerify: this._challengeAndVerify.bind(this),
+ getAuthenticatorAssuranceLevel: this._getAuthenticatorAssuranceLevel.bind(this),
+ webauthn: new webauthn_1.WebAuthnApi(this),
+ };
+ this.oauth = {
+ getAuthorizationDetails: this._getAuthorizationDetails.bind(this),
+ approveAuthorization: this._approveAuthorization.bind(this),
+ denyAuthorization: this._denyAuthorization.bind(this),
+ listGrants: this._listOAuthGrants.bind(this),
+ revokeGrant: this._revokeOAuthGrant.bind(this),
+ };
+ if (this.persistSession) {
+ if (settings.storage) {
+ this.storage = settings.storage;
+ }
+ else {
+ if ((0, helpers_1.supportsLocalStorage)()) {
+ this.storage = globalThis.localStorage;
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = (0, local_storage_1.memoryLocalStorageAdapter)(this.memoryStorage);
+ }
+ }
+ if (settings.userStorage) {
+ this.userStorage = settings.userStorage;
+ }
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = (0, local_storage_1.memoryLocalStorageAdapter)(this.memoryStorage);
+ }
+ if ((0, helpers_1.isBrowser)() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
+ try {
+ this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
+ }
+ catch (e) {
+ console.error('Failed to create a new BroadcastChannel, multi-tab state changes will not be available', e);
+ }
+ (_c = this.broadcastChannel) === null || _c === void 0 ? void 0 : _c.addEventListener('message', async (event) => {
+ this._debug('received broadcast notification from other tab or client', event);
+ await this._notifyAllSubscribers(event.data.event, event.data.session, false); // broadcast = false so we don't get an endless loop of messages
+ });
+ }
+ this.initialize();
+ }
+ /**
+ * Returns whether error throwing mode is enabled for this client.
+ */
+ isThrowOnErrorEnabled() {
+ return this.throwOnError;
+ }
+ /**
+ * Centralizes return handling with optional error throwing. When `throwOnError` is enabled
+ * and the provided result contains a non-nullish error, the error is thrown instead of
+ * being returned. This ensures consistent behavior across all public API methods.
+ */
+ _returnResult(result) {
+ if (this.throwOnError && result && result.error) {
+ throw result.error;
+ }
+ return result;
+ }
+ _logPrefix() {
+ return ('GoTrueClient@' +
+ `${this.storageKey}:${this.instanceID} (${version_1.version}) ${new Date().toISOString()}`);
+ }
+ _debug(...args) {
+ if (this.logDebugMessages) {
+ this.logger(this._logPrefix(), ...args);
+ }
+ return this;
+ }
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ async initialize() {
+ if (this.initializePromise) {
+ return await this.initializePromise;
+ }
+ this.initializePromise = (async () => {
+ return await this._acquireLock(-1, async () => {
+ return await this._initialize();
+ });
+ })();
+ return await this.initializePromise;
+ }
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ async _initialize() {
+ var _a;
+ try {
+ let params = {};
+ let callbackUrlType = 'none';
+ if ((0, helpers_1.isBrowser)()) {
+ params = (0, helpers_1.parseParametersFromURL)(window.location.href);
+ if (this._isImplicitGrantCallback(params)) {
+ callbackUrlType = 'implicit';
+ }
+ else if (await this._isPKCECallback(params)) {
+ callbackUrlType = 'pkce';
+ }
+ }
+ /**
+ * Attempt to get the session from the URL only if these conditions are fulfilled
+ *
+ * Note: If the URL isn't one of the callback url types (implicit or pkce),
+ * then there could be an existing session so we don't want to prematurely remove it
+ */
+ if ((0, helpers_1.isBrowser)() && this.detectSessionInUrl && callbackUrlType !== 'none') {
+ const { data, error } = await this._getSessionFromURL(params, callbackUrlType);
+ if (error) {
+ this._debug('#_initialize()', 'error detecting session from URL', error);
+ if ((0, errors_1.isAuthImplicitGrantRedirectError)(error)) {
+ const errorCode = (_a = error.details) === null || _a === void 0 ? void 0 : _a.code;
+ if (errorCode === 'identity_already_exists' ||
+ errorCode === 'identity_not_found' ||
+ errorCode === 'single_identity_not_deletable') {
+ return { error };
+ }
+ }
+ // failed login attempt via url,
+ // remove old session as in verifyOtp, signUp and signInWith*
+ await this._removeSession();
+ return { error };
+ }
+ const { session, redirectType } = data;
+ this._debug('#_initialize()', 'detected session in URL', session, 'redirect type', redirectType);
+ await this._saveSession(session);
+ setTimeout(async () => {
+ if (redirectType === 'recovery') {
+ await this._notifyAllSubscribers('PASSWORD_RECOVERY', session);
+ }
+ else {
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ }, 0);
+ return { error: null };
+ }
+ // no login attempt via callback url try to recover session from storage
+ await this._recoverAndRefresh();
+ return { error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ error });
+ }
+ return this._returnResult({
+ error: new errors_1.AuthUnknownError('Unexpected error during initialization', error),
+ });
+ }
+ finally {
+ await this._handleVisibilityChange();
+ this._debug('#_initialize()', 'end');
+ }
+ }
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ async signInAnonymously(credentials) {
+ var _a, _b, _c;
+ try {
+ const res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ data: (_b = (_a = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {},
+ gotrue_meta_security: { captcha_token: (_c = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _c === void 0 ? void 0 : _c.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ const { data, error } = res;
+ if (error || !data) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ async signUp(credentials) {
+ var _a, _b, _c;
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: {
+ email,
+ password,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ data: (_b = options === null || options === void 0 ? void 0 : options.data) !== null && _b !== void 0 ? _b : {},
+ channel: (_c = options === null || options === void 0 ? void 0 : options.channel) !== null && _c !== void 0 ? _c : 'sms',
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ }
+ else {
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error || !data) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ async signInWithPassword(credentials) {
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ email,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponsePassword,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponsePassword,
+ });
+ }
+ else {
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ const invalidTokenError = new errors_1.AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({
+ data: Object.assign({ user: data.user, session: data.session }, (data.weak_password ? { weakPassword: data.weak_password } : null)),
+ error,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ async signInWithOAuth(credentials) {
+ var _a, _b, _c, _d;
+ return await this._handleProviderSignIn(credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: (_d = credentials.options) === null || _d === void 0 ? void 0 : _d.skipBrowserRedirect,
+ });
+ }
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ async exchangeCodeForSession(authCode) {
+ await this.initializePromise;
+ return this._acquireLock(-1, async () => {
+ return this._exchangeCodeForSession(authCode);
+ });
+ }
+ /**
+ * Signs in a user by verifying a message signed by the user's private key.
+ * Supports Ethereum (via Sign-In-With-Ethereum) & Solana (Sign-In-With-Solana) standards,
+ * both of which derive from the EIP-4361 standard
+ * With slight variation on Solana's side.
+ * @reference https://eips.ethereum.org/EIPS/eip-4361
+ */
+ async signInWithWeb3(credentials) {
+ const { chain } = credentials;
+ switch (chain) {
+ case 'ethereum':
+ return await this.signInWithEthereum(credentials);
+ case 'solana':
+ return await this.signInWithSolana(credentials);
+ default:
+ throw new Error(`@supabase/auth-js: Unsupported chain "${chain}"`);
+ }
+ }
+ async signInWithEthereum(credentials) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
+ // TODO: flatten type
+ let message;
+ let signature;
+ if ('message' in credentials) {
+ message = credentials.message;
+ signature = credentials.signature;
+ }
+ else {
+ const { chain, wallet, statement, options } = credentials;
+ let resolvedWallet;
+ if (!(0, helpers_1.isBrowser)()) {
+ if (typeof wallet !== 'object' || !(options === null || options === void 0 ? void 0 : options.url)) {
+ throw new Error('@supabase/auth-js: Both wallet and url must be specified in non-browser environments.');
+ }
+ resolvedWallet = wallet;
+ }
+ else if (typeof wallet === 'object') {
+ resolvedWallet = wallet;
+ }
+ else {
+ const windowAny = window;
+ if ('ethereum' in windowAny &&
+ typeof windowAny.ethereum === 'object' &&
+ 'request' in windowAny.ethereum &&
+ typeof windowAny.ethereum.request === 'function') {
+ resolvedWallet = windowAny.ethereum;
+ }
+ else {
+ throw new Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`);
+ }
+ }
+ const url = new URL((_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : window.location.href);
+ const accounts = await resolvedWallet
+ .request({
+ method: 'eth_requestAccounts',
+ })
+ .then((accs) => accs)
+ .catch(() => {
+ throw new Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`);
+ });
+ if (!accounts || accounts.length === 0) {
+ throw new Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);
+ }
+ const address = (0, ethereum_1.getAddress)(accounts[0]);
+ let chainId = (_b = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _b === void 0 ? void 0 : _b.chainId;
+ if (!chainId) {
+ const chainIdHex = await resolvedWallet.request({
+ method: 'eth_chainId',
+ });
+ chainId = (0, ethereum_1.fromHex)(chainIdHex);
+ }
+ const siweMessage = {
+ domain: url.host,
+ address: address,
+ statement: statement,
+ uri: url.href,
+ version: '1',
+ chainId: chainId,
+ nonce: (_c = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _c === void 0 ? void 0 : _c.nonce,
+ issuedAt: (_e = (_d = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _d === void 0 ? void 0 : _d.issuedAt) !== null && _e !== void 0 ? _e : new Date(),
+ expirationTime: (_f = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _f === void 0 ? void 0 : _f.expirationTime,
+ notBefore: (_g = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _g === void 0 ? void 0 : _g.notBefore,
+ requestId: (_h = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _h === void 0 ? void 0 : _h.requestId,
+ resources: (_j = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _j === void 0 ? void 0 : _j.resources,
+ };
+ message = (0, ethereum_1.createSiweMessage)(siweMessage);
+ // Sign message
+ signature = (await resolvedWallet.request({
+ method: 'personal_sign',
+ params: [(0, ethereum_1.toHex)(message), address],
+ }));
+ }
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=web3`, {
+ headers: this.headers,
+ body: Object.assign({ chain: 'ethereum', message,
+ signature }, (((_k = credentials.options) === null || _k === void 0 ? void 0 : _k.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: (_l = credentials.options) === null || _l === void 0 ? void 0 : _l.captchaToken } }
+ : null)),
+ xform: fetch_1._sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new errors_1.AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign({}, data), error });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ async signInWithSolana(credentials) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
+ let message;
+ let signature;
+ if ('message' in credentials) {
+ message = credentials.message;
+ signature = credentials.signature;
+ }
+ else {
+ const { chain, wallet, statement, options } = credentials;
+ let resolvedWallet;
+ if (!(0, helpers_1.isBrowser)()) {
+ if (typeof wallet !== 'object' || !(options === null || options === void 0 ? void 0 : options.url)) {
+ throw new Error('@supabase/auth-js: Both wallet and url must be specified in non-browser environments.');
+ }
+ resolvedWallet = wallet;
+ }
+ else if (typeof wallet === 'object') {
+ resolvedWallet = wallet;
+ }
+ else {
+ const windowAny = window;
+ if ('solana' in windowAny &&
+ typeof windowAny.solana === 'object' &&
+ (('signIn' in windowAny.solana && typeof windowAny.solana.signIn === 'function') ||
+ ('signMessage' in windowAny.solana &&
+ typeof windowAny.solana.signMessage === 'function'))) {
+ resolvedWallet = windowAny.solana;
+ }
+ else {
+ throw new Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`);
+ }
+ }
+ const url = new URL((_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : window.location.href);
+ if ('signIn' in resolvedWallet && resolvedWallet.signIn) {
+ const output = await resolvedWallet.signIn(Object.assign(Object.assign(Object.assign({ issuedAt: new Date().toISOString() }, options === null || options === void 0 ? void 0 : options.signInWithSolana), {
+ // non-overridable properties
+ version: '1', domain: url.host, uri: url.href }), (statement ? { statement } : null)));
+ let outputToProcess;
+ if (Array.isArray(output) && output[0] && typeof output[0] === 'object') {
+ outputToProcess = output[0];
+ }
+ else if (output &&
+ typeof output === 'object' &&
+ 'signedMessage' in output &&
+ 'signature' in output) {
+ outputToProcess = output;
+ }
+ else {
+ throw new Error('@supabase/auth-js: Wallet method signIn() returned unrecognized value');
+ }
+ if ('signedMessage' in outputToProcess &&
+ 'signature' in outputToProcess &&
+ (typeof outputToProcess.signedMessage === 'string' ||
+ outputToProcess.signedMessage instanceof Uint8Array) &&
+ outputToProcess.signature instanceof Uint8Array) {
+ message =
+ typeof outputToProcess.signedMessage === 'string'
+ ? outputToProcess.signedMessage
+ : new TextDecoder().decode(outputToProcess.signedMessage);
+ signature = outputToProcess.signature;
+ }
+ else {
+ throw new Error('@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields');
+ }
+ }
+ else {
+ if (!('signMessage' in resolvedWallet) ||
+ typeof resolvedWallet.signMessage !== 'function' ||
+ !('publicKey' in resolvedWallet) ||
+ typeof resolvedWallet !== 'object' ||
+ !resolvedWallet.publicKey ||
+ !('toBase58' in resolvedWallet.publicKey) ||
+ typeof resolvedWallet.publicKey.toBase58 !== 'function') {
+ throw new Error('@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API');
+ }
+ message = [
+ `${url.host} wants you to sign in with your Solana account:`,
+ resolvedWallet.publicKey.toBase58(),
+ ...(statement ? ['', statement, ''] : ['']),
+ 'Version: 1',
+ `URI: ${url.href}`,
+ `Issued At: ${(_c = (_b = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _b === void 0 ? void 0 : _b.issuedAt) !== null && _c !== void 0 ? _c : new Date().toISOString()}`,
+ ...(((_d = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _d === void 0 ? void 0 : _d.notBefore)
+ ? [`Not Before: ${options.signInWithSolana.notBefore}`]
+ : []),
+ ...(((_e = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _e === void 0 ? void 0 : _e.expirationTime)
+ ? [`Expiration Time: ${options.signInWithSolana.expirationTime}`]
+ : []),
+ ...(((_f = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _f === void 0 ? void 0 : _f.chainId)
+ ? [`Chain ID: ${options.signInWithSolana.chainId}`]
+ : []),
+ ...(((_g = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _g === void 0 ? void 0 : _g.nonce) ? [`Nonce: ${options.signInWithSolana.nonce}`] : []),
+ ...(((_h = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _h === void 0 ? void 0 : _h.requestId)
+ ? [`Request ID: ${options.signInWithSolana.requestId}`]
+ : []),
+ ...(((_k = (_j = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _j === void 0 ? void 0 : _j.resources) === null || _k === void 0 ? void 0 : _k.length)
+ ? [
+ 'Resources',
+ ...options.signInWithSolana.resources.map((resource) => `- ${resource}`),
+ ]
+ : []),
+ ].join('\n');
+ const maybeSignature = await resolvedWallet.signMessage(new TextEncoder().encode(message), 'utf8');
+ if (!maybeSignature || !(maybeSignature instanceof Uint8Array)) {
+ throw new Error('@supabase/auth-js: Wallet signMessage() API returned an recognized value');
+ }
+ signature = maybeSignature;
+ }
+ }
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=web3`, {
+ headers: this.headers,
+ body: Object.assign({ chain: 'solana', message, signature: (0, base64url_1.bytesToBase64URL)(signature) }, (((_l = credentials.options) === null || _l === void 0 ? void 0 : _l.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: (_m = credentials.options) === null || _m === void 0 ? void 0 : _m.captchaToken } }
+ : null)),
+ xform: fetch_1._sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new errors_1.AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign({}, data), error });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ async _exchangeCodeForSession(authCode) {
+ const storageItem = await (0, helpers_1.getItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ const [codeVerifier, redirectType] = (storageItem !== null && storageItem !== void 0 ? storageItem : '').split('/');
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=pkce`, {
+ headers: this.headers,
+ body: {
+ auth_code: authCode,
+ code_verifier: codeVerifier,
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new errors_1.AuthInvalidTokenResponseError();
+ return this._returnResult({
+ data: { user: null, session: null, redirectType: null },
+ error: invalidTokenError,
+ });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign(Object.assign({}, data), { redirectType: redirectType !== null && redirectType !== void 0 ? redirectType : null }), error });
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({
+ data: { user: null, session: null, redirectType: null },
+ error,
+ });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ async signInWithIdToken(credentials) {
+ try {
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ const invalidTokenError = new errors_1.AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data, error });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ async signInWithOtp(credentials) {
+ var _a, _b, _c, _d, _e;
+ try {
+ if ('email' in credentials) {
+ const { email, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ const { error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ email,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ create_user: (_b = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _b !== void 0 ? _b : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ if ('phone' in credentials) {
+ const { phone, options } = credentials;
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ phone,
+ data: (_c = options === null || options === void 0 ? void 0 : options.data) !== null && _c !== void 0 ? _c : {},
+ create_user: (_d = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _d !== void 0 ? _d : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ channel: (_e = options === null || options === void 0 ? void 0 : options.channel) !== null && _e !== void 0 ? _e : 'sms',
+ },
+ });
+ return this._returnResult({
+ data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id },
+ error,
+ });
+ }
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number.');
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ async verifyOtp(params) {
+ var _a, _b;
+ try {
+ let redirectTo = undefined;
+ let captchaToken = undefined;
+ if ('options' in params) {
+ redirectTo = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo;
+ captchaToken = (_b = params.options) === null || _b === void 0 ? void 0 : _b.captchaToken;
+ }
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/verify`, {
+ headers: this.headers,
+ body: Object.assign(Object.assign({}, params), { gotrue_meta_security: { captcha_token: captchaToken } }),
+ redirectTo,
+ xform: fetch_1._sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data) {
+ const tokenVerificationError = new Error('An error occurred on token verification.');
+ throw tokenVerificationError;
+ }
+ const session = data.session;
+ const user = data.user;
+ if (session === null || session === void 0 ? void 0 : session.access_token) {
+ await this._saveSession(session);
+ await this._notifyAllSubscribers(params.type == 'recovery' ? 'PASSWORD_RECOVERY' : 'SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ async signInWithSSO(params) {
+ var _a, _b, _c, _d, _e;
+ try {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ const result = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/sso`, {
+ body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ('providerId' in params ? { provider_id: params.providerId } : null)), ('domain' in params ? { domain: params.domain } : null)), { redirect_to: (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo) !== null && _b !== void 0 ? _b : undefined }), (((_c = params === null || params === void 0 ? void 0 : params.options) === null || _c === void 0 ? void 0 : _c.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: params.options.captchaToken } }
+ : null)), { skip_http_redirect: true, code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ headers: this.headers,
+ xform: fetch_1._ssoResponse,
+ });
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if (((_d = result.data) === null || _d === void 0 ? void 0 : _d.url) && (0, helpers_1.isBrowser)() && !((_e = params.options) === null || _e === void 0 ? void 0 : _e.skipBrowserRedirect)) {
+ window.location.assign(result.data.url);
+ }
+ return this._returnResult(result);
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ async reauthenticate() {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._reauthenticate();
+ });
+ }
+ async _reauthenticate() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError)
+ throw sessionError;
+ if (!session)
+ throw new errors_1.AuthSessionMissingError();
+ const { error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/reauthenticate`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ async resend(credentials) {
+ try {
+ const endpoint = `${this.url}/resend`;
+ if ('email' in credentials) {
+ const { email, type, options } = credentials;
+ const { error } = await (0, fetch_1._request)(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ email,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if ('phone' in credentials) {
+ const { phone, type, options } = credentials;
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ phone,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ });
+ return this._returnResult({
+ data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id },
+ error,
+ });
+ }
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a type');
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ async getSession() {
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return this._useSession(async (result) => {
+ return result;
+ });
+ });
+ return result;
+ }
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ async _acquireLock(acquireTimeout, fn) {
+ this._debug('#_acquireLock', 'begin', acquireTimeout);
+ try {
+ if (this.lockAcquired) {
+ const last = this.pendingInLock.length
+ ? this.pendingInLock[this.pendingInLock.length - 1]
+ : Promise.resolve();
+ const result = (async () => {
+ await last;
+ return await fn();
+ })();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ return result;
+ }
+ return await this.lock(`lock:${this.storageKey}`, acquireTimeout, async () => {
+ this._debug('#_acquireLock', 'lock acquired for storage key', this.storageKey);
+ try {
+ this.lockAcquired = true;
+ const result = fn();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ await result;
+ // keep draining the queue until there's nothing to wait on
+ while (this.pendingInLock.length) {
+ const waitOn = [...this.pendingInLock];
+ await Promise.all(waitOn);
+ this.pendingInLock.splice(0, waitOn.length);
+ }
+ return await result;
+ }
+ finally {
+ this._debug('#_acquireLock', 'lock released for storage key', this.storageKey);
+ this.lockAcquired = false;
+ }
+ });
+ }
+ finally {
+ this._debug('#_acquireLock', 'end');
+ }
+ }
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ async _useSession(fn) {
+ this._debug('#_useSession', 'begin');
+ try {
+ // the use of __loadSession here is the only correct use of the function!
+ const result = await this.__loadSession();
+ return await fn(result);
+ }
+ finally {
+ this._debug('#_useSession', 'end');
+ }
+ }
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ async __loadSession() {
+ this._debug('#__loadSession()', 'begin');
+ if (!this.lockAcquired) {
+ this._debug('#__loadSession()', 'used outside of an acquired lock!', new Error().stack);
+ }
+ try {
+ let currentSession = null;
+ const maybeSession = await (0, helpers_1.getItemAsync)(this.storage, this.storageKey);
+ this._debug('#getSession()', 'session from storage', maybeSession);
+ if (maybeSession !== null) {
+ if (this._isValidSession(maybeSession)) {
+ currentSession = maybeSession;
+ }
+ else {
+ this._debug('#getSession()', 'session from storage is not valid');
+ await this._removeSession();
+ }
+ }
+ if (!currentSession) {
+ return { data: { session: null }, error: null };
+ }
+ // A session is considered expired before the access token _actually_
+ // expires. When the autoRefreshToken option is off (or when the tab is
+ // in the background), very eager users of getSession() -- like
+ // realtime-js -- might send a valid JWT which will expire by the time it
+ // reaches the server.
+ const hasExpired = currentSession.expires_at
+ ? currentSession.expires_at * 1000 - Date.now() < constants_1.EXPIRY_MARGIN_MS
+ : false;
+ this._debug('#__loadSession()', `session has${hasExpired ? '' : ' not'} expired`, 'expires_at', currentSession.expires_at);
+ if (!hasExpired) {
+ if (this.userStorage) {
+ const maybeUser = (await (0, helpers_1.getItemAsync)(this.userStorage, this.storageKey + '-user'));
+ if (maybeUser === null || maybeUser === void 0 ? void 0 : maybeUser.user) {
+ currentSession.user = maybeUser.user;
+ }
+ else {
+ currentSession.user = (0, helpers_1.userNotAvailableProxy)();
+ }
+ }
+ // Wrap the user object with a warning proxy on the server
+ // This warns when properties of the user are accessed, not when session.user itself is accessed
+ if (this.storage.isServer &&
+ currentSession.user &&
+ !currentSession.user.__isUserNotAvailableProxy) {
+ const suppressWarningRef = { value: this.suppressGetSessionWarning };
+ currentSession.user = (0, helpers_1.insecureUserWarningProxy)(currentSession.user, suppressWarningRef);
+ // Update the client-level suppression flag when the proxy suppresses the warning
+ if (suppressWarningRef.value) {
+ this.suppressGetSessionWarning = true;
+ }
+ }
+ return { data: { session: currentSession }, error: null };
+ }
+ const { data: session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { session: null }, error });
+ }
+ return this._returnResult({ data: { session }, error: null });
+ }
+ finally {
+ this._debug('#__loadSession()', 'end');
+ }
+ }
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ async getUser(jwt) {
+ if (jwt) {
+ return await this._getUser(jwt);
+ }
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return await this._getUser();
+ });
+ if (result.data.user) {
+ this.suppressGetSessionWarning = true;
+ }
+ return result;
+ }
+ async _getUser(jwt) {
+ try {
+ if (jwt) {
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: jwt,
+ xform: fetch_1._userResponse,
+ });
+ }
+ return await this._useSession(async (result) => {
+ var _a, _b, _c;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ // returns an error if there is no access_token or custom authorization header
+ if (!((_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) && !this.hasCustomAuthorizationHeader) {
+ return { data: { user: null }, error: new errors_1.AuthSessionMissingError() };
+ }
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: (_c = (_b = data.session) === null || _b === void 0 ? void 0 : _b.access_token) !== null && _c !== void 0 ? _c : undefined,
+ xform: fetch_1._userResponse,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ if ((0, errors_1.isAuthSessionMissingError)(error)) {
+ // JWT contains a `session_id` which does not correspond to an active
+ // session in the database, indicating the user is signed out.
+ await this._removeSession();
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return this._returnResult({ data: { user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates user data for a logged in user.
+ */
+ async updateUser(attributes, options = {}) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._updateUser(attributes, options);
+ });
+ }
+ async _updateUser(attributes, options = {}) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ throw sessionError;
+ }
+ if (!sessionData.session) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const session = sessionData.session;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce' && attributes.email != null) {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ const { data, error: userError } = await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/user`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: Object.assign(Object.assign({}, attributes), { code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ jwt: session.access_token,
+ xform: fetch_1._userResponse,
+ });
+ if (userError) {
+ throw userError;
+ }
+ session.user = data.user;
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('USER_UPDATED', session);
+ return this._returnResult({ data: { user: session.user }, error: null });
+ });
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ async setSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._setSession(currentSession);
+ });
+ }
+ async _setSession(currentSession) {
+ try {
+ if (!currentSession.access_token || !currentSession.refresh_token) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const timeNow = Date.now() / 1000;
+ let expiresAt = timeNow;
+ let hasExpired = true;
+ let session = null;
+ const { payload } = (0, helpers_1.decodeJWT)(currentSession.access_token);
+ if (payload.exp) {
+ expiresAt = payload.exp;
+ hasExpired = expiresAt <= timeNow;
+ }
+ if (hasExpired) {
+ const { data: refreshedSession, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ if (!refreshedSession) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ session = refreshedSession;
+ }
+ else {
+ const { data, error } = await this._getUser(currentSession.access_token);
+ if (error) {
+ throw error;
+ }
+ session = {
+ access_token: currentSession.access_token,
+ refresh_token: currentSession.refresh_token,
+ user: data.user,
+ token_type: 'bearer',
+ expires_in: expiresAt - timeNow,
+ expires_at: expiresAt,
+ };
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user: session.user, session }, error: null });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { session: null, user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ async refreshSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._refreshSession(currentSession);
+ });
+ }
+ async _refreshSession(currentSession) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ if (!currentSession) {
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ currentSession = (_a = data.session) !== null && _a !== void 0 ? _a : undefined;
+ }
+ if (!(currentSession === null || currentSession === void 0 ? void 0 : currentSession.refresh_token)) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const { data: session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ if (!session) {
+ return this._returnResult({ data: { user: null, session: null }, error: null });
+ }
+ return this._returnResult({ data: { user: session.user, session }, error: null });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets the session data from a URL string
+ */
+ async _getSessionFromURL(params, callbackUrlType) {
+ try {
+ if (!(0, helpers_1.isBrowser)())
+ throw new errors_1.AuthImplicitGrantRedirectError('No browser detected.');
+ // If there's an error in the URL, it doesn't matter what flow it is, we just return the error.
+ if (params.error || params.error_description || params.error_code) {
+ // The error class returned implies that the redirect is from an implicit grant flow
+ // but it could also be from a redirect error from a PKCE flow.
+ throw new errors_1.AuthImplicitGrantRedirectError(params.error_description || 'Error in URL with unspecified error_description', {
+ error: params.error || 'unspecified_error',
+ code: params.error_code || 'unspecified_code',
+ });
+ }
+ // Checks for mismatches between the flowType initialised in the client and the URL parameters
+ switch (callbackUrlType) {
+ case 'implicit':
+ if (this.flowType === 'pkce') {
+ throw new errors_1.AuthPKCEGrantCodeExchangeError('Not a valid PKCE flow url.');
+ }
+ break;
+ case 'pkce':
+ if (this.flowType === 'implicit') {
+ throw new errors_1.AuthImplicitGrantRedirectError('Not a valid implicit grant flow url.');
+ }
+ break;
+ default:
+ // there's no mismatch so we continue
+ }
+ // Since this is a redirect for PKCE, we attempt to retrieve the code from the URL for the code exchange
+ if (callbackUrlType === 'pkce') {
+ this._debug('#_initialize()', 'begin', 'is PKCE flow', true);
+ if (!params.code)
+ throw new errors_1.AuthPKCEGrantCodeExchangeError('No code detected.');
+ const { data, error } = await this._exchangeCodeForSession(params.code);
+ if (error)
+ throw error;
+ const url = new URL(window.location.href);
+ url.searchParams.delete('code');
+ window.history.replaceState(window.history.state, '', url.toString());
+ return { data: { session: data.session, redirectType: null }, error: null };
+ }
+ const { provider_token, provider_refresh_token, access_token, refresh_token, expires_in, expires_at, token_type, } = params;
+ if (!access_token || !expires_in || !refresh_token || !token_type) {
+ throw new errors_1.AuthImplicitGrantRedirectError('No session defined in URL');
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresIn = parseInt(expires_in);
+ let expiresAt = timeNow + expiresIn;
+ if (expires_at) {
+ expiresAt = parseInt(expires_at);
+ }
+ const actuallyExpiresIn = expiresAt - timeNow;
+ if (actuallyExpiresIn * 1000 <= constants_1.AUTO_REFRESH_TICK_DURATION_MS) {
+ console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${actuallyExpiresIn}s, should have been closer to ${expiresIn}s`);
+ }
+ const issuedAt = expiresAt - expiresIn;
+ if (timeNow - issuedAt >= 120) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale', issuedAt, expiresAt, timeNow);
+ }
+ else if (timeNow - issuedAt < 0) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew', issuedAt, expiresAt, timeNow);
+ }
+ const { data, error } = await this._getUser(access_token);
+ if (error)
+ throw error;
+ const session = {
+ provider_token,
+ provider_refresh_token,
+ access_token,
+ expires_in: expiresIn,
+ expires_at: expiresAt,
+ refresh_token,
+ token_type: token_type,
+ user: data.user,
+ };
+ // Remove tokens from URL
+ window.location.hash = '';
+ this._debug('#_getSessionFromURL()', 'clearing window.location.hash');
+ return this._returnResult({ data: { session, redirectType: params.type }, error: null });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { session: null, redirectType: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ _isImplicitGrantCallback(params) {
+ return Boolean(params.access_token || params.error_description);
+ }
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ async _isPKCECallback(params) {
+ const currentStorageContent = await (0, helpers_1.getItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ return !!(params.code && currentStorageContent);
+ }
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ async signOut(options = { scope: 'global' }) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._signOut(options);
+ });
+ }
+ async _signOut({ scope } = { scope: 'global' }) {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ error: sessionError });
+ }
+ const accessToken = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token;
+ if (accessToken) {
+ const { error } = await this.admin.signOut(accessToken, scope);
+ if (error) {
+ // ignore 404s since user might not exist anymore
+ // ignore 401s since an invalid or expired JWT should sign out the current session
+ if (!((0, errors_1.isAuthApiError)(error) &&
+ (error.status === 404 || error.status === 401 || error.status === 403))) {
+ return this._returnResult({ error });
+ }
+ }
+ }
+ if (scope !== 'others') {
+ await this._removeSession();
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return this._returnResult({ error: null });
+ });
+ }
+ onAuthStateChange(callback) {
+ const id = (0, helpers_1.generateCallbackId)();
+ const subscription = {
+ id,
+ callback,
+ unsubscribe: () => {
+ this._debug('#unsubscribe()', 'state change callback with id removed', id);
+ this.stateChangeEmitters.delete(id);
+ },
+ };
+ this._debug('#onAuthStateChange()', 'registered callback with id', id);
+ this.stateChangeEmitters.set(id, subscription);
+ (async () => {
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ this._emitInitialSession(id);
+ });
+ })();
+ return { data: { subscription } };
+ }
+ async _emitInitialSession(id) {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ try {
+ const { data: { session }, error, } = result;
+ if (error)
+ throw error;
+ await ((_a = this.stateChangeEmitters.get(id)) === null || _a === void 0 ? void 0 : _a.callback('INITIAL_SESSION', session));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'session', session);
+ }
+ catch (err) {
+ await ((_b = this.stateChangeEmitters.get(id)) === null || _b === void 0 ? void 0 : _b.callback('INITIAL_SESSION', null));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'error', err);
+ console.error(err);
+ }
+ });
+ }
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ async resetPasswordForEmail(email, options = {}) {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey, true // isPasswordRecovery
+ );
+ }
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/recover`, {
+ body: {
+ email,
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ gotrue_meta_security: { captcha_token: options.captchaToken },
+ },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ });
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets all the identities linked to a user.
+ */
+ async getUserIdentities() {
+ var _a;
+ try {
+ const { data, error } = await this.getUser();
+ if (error)
+ throw error;
+ return this._returnResult({ data: { identities: (_a = data.user.identities) !== null && _a !== void 0 ? _a : [] }, error: null });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async linkIdentity(credentials) {
+ if ('token' in credentials) {
+ return this.linkIdentityIdToken(credentials);
+ }
+ return this.linkIdentityOAuth(credentials);
+ }
+ async linkIdentityOAuth(credentials) {
+ var _a;
+ try {
+ const { data, error } = await this._useSession(async (result) => {
+ var _a, _b, _c, _d, _e;
+ const { data, error } = result;
+ if (error)
+ throw error;
+ const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: true,
+ });
+ return await (0, fetch_1._request)(this.fetch, 'GET', url, {
+ headers: this.headers,
+ jwt: (_e = (_d = data.session) === null || _d === void 0 ? void 0 : _d.access_token) !== null && _e !== void 0 ? _e : undefined,
+ });
+ });
+ if (error)
+ throw error;
+ if ((0, helpers_1.isBrowser)() && !((_a = credentials.options) === null || _a === void 0 ? void 0 : _a.skipBrowserRedirect)) {
+ window.location.assign(data === null || data === void 0 ? void 0 : data.url);
+ }
+ return this._returnResult({
+ data: { provider: credentials.provider, url: data === null || data === void 0 ? void 0 : data.url },
+ error: null,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { provider: credentials.provider, url: null }, error });
+ }
+ throw error;
+ }
+ }
+ async linkIdentityIdToken(credentials) {
+ return await this._useSession(async (result) => {
+ var _a;
+ try {
+ const { error: sessionError, data: { session }, } = result;
+ if (sessionError)
+ throw sessionError;
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ jwt: (_a = session === null || session === void 0 ? void 0 : session.access_token) !== null && _a !== void 0 ? _a : undefined,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ link_identity: true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ return this._returnResult({
+ data: { user: null, session: null },
+ error: new errors_1.AuthInvalidTokenResponseError(),
+ });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('USER_UPDATED', data.session);
+ }
+ return this._returnResult({ data, error });
+ }
+ catch (error) {
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ async unlinkIdentity(identity) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/user/identities/${identity.identity_id}`, {
+ headers: this.headers,
+ jwt: (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : undefined,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ async _refreshAccessToken(refreshToken) {
+ const debugName = `#_refreshAccessToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ const startedAt = Date.now();
+ // will attempt to refresh the token with exponential backoff
+ return await (0, helpers_1.retryable)(async (attempt) => {
+ if (attempt > 0) {
+ await (0, helpers_1.sleep)(200 * Math.pow(2, attempt - 1)); // 200, 400, 800, ...
+ }
+ this._debug(debugName, 'refreshing attempt', attempt);
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=refresh_token`, {
+ body: { refresh_token: refreshToken },
+ headers: this.headers,
+ xform: fetch_1._sessionResponse,
+ });
+ }, (attempt, error) => {
+ const nextBackOffInterval = 200 * Math.pow(2, attempt);
+ return (error &&
+ (0, errors_1.isAuthRetryableFetchError)(error) &&
+ // retryable only if the request can be sent before the backoff overflows the tick duration
+ Date.now() + nextBackOffInterval - startedAt < constants_1.AUTO_REFRESH_TICK_DURATION_MS);
+ });
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: { session: null, user: null }, error });
+ }
+ throw error;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ _isValidSession(maybeSession) {
+ const isValidSession = typeof maybeSession === 'object' &&
+ maybeSession !== null &&
+ 'access_token' in maybeSession &&
+ 'refresh_token' in maybeSession &&
+ 'expires_at' in maybeSession;
+ return isValidSession;
+ }
+ async _handleProviderSignIn(provider, options) {
+ const url = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
+ redirectTo: options.redirectTo,
+ scopes: options.scopes,
+ queryParams: options.queryParams,
+ });
+ this._debug('#_handleProviderSignIn()', 'provider', provider, 'options', options, 'url', url);
+ // try to open on the browser
+ if ((0, helpers_1.isBrowser)() && !options.skipBrowserRedirect) {
+ window.location.assign(url);
+ }
+ return { data: { provider, url }, error: null };
+ }
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ async _recoverAndRefresh() {
+ var _a, _b;
+ const debugName = '#_recoverAndRefresh()';
+ this._debug(debugName, 'begin');
+ try {
+ const currentSession = (await (0, helpers_1.getItemAsync)(this.storage, this.storageKey));
+ if (currentSession && this.userStorage) {
+ let maybeUser = (await (0, helpers_1.getItemAsync)(this.userStorage, this.storageKey + '-user'));
+ if (!this.storage.isServer && Object.is(this.storage, this.userStorage) && !maybeUser) {
+ // storage and userStorage are the same storage medium, for example
+ // window.localStorage if userStorage does not have the user from
+ // storage stored, store it first thereby migrating the user object
+ // from storage -> userStorage
+ maybeUser = { user: currentSession.user };
+ await (0, helpers_1.setItemAsync)(this.userStorage, this.storageKey + '-user', maybeUser);
+ }
+ currentSession.user = (_a = maybeUser === null || maybeUser === void 0 ? void 0 : maybeUser.user) !== null && _a !== void 0 ? _a : (0, helpers_1.userNotAvailableProxy)();
+ }
+ else if (currentSession && !currentSession.user) {
+ // user storage is not set, let's check if it was previously enabled so
+ // we bring back the storage as it should be
+ if (!currentSession.user) {
+ // test if userStorage was previously enabled and the storage medium was the same, to move the user back under the same key
+ const separateUser = (await (0, helpers_1.getItemAsync)(this.storage, this.storageKey + '-user'));
+ if (separateUser && (separateUser === null || separateUser === void 0 ? void 0 : separateUser.user)) {
+ currentSession.user = separateUser.user;
+ await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey + '-user');
+ await (0, helpers_1.setItemAsync)(this.storage, this.storageKey, currentSession);
+ }
+ else {
+ currentSession.user = (0, helpers_1.userNotAvailableProxy)();
+ }
+ }
+ }
+ this._debug(debugName, 'session from storage', currentSession);
+ if (!this._isValidSession(currentSession)) {
+ this._debug(debugName, 'session is not valid');
+ if (currentSession !== null) {
+ await this._removeSession();
+ }
+ return;
+ }
+ const expiresWithMargin = ((_b = currentSession.expires_at) !== null && _b !== void 0 ? _b : Infinity) * 1000 - Date.now() < constants_1.EXPIRY_MARGIN_MS;
+ this._debug(debugName, `session has${expiresWithMargin ? '' : ' not'} expired with margin of ${constants_1.EXPIRY_MARGIN_MS}s`);
+ if (expiresWithMargin) {
+ if (this.autoRefreshToken && currentSession.refresh_token) {
+ const { error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ console.error(error);
+ if (!(0, errors_1.isAuthRetryableFetchError)(error)) {
+ this._debug(debugName, 'refresh failed with a non-retryable error, removing the session', error);
+ await this._removeSession();
+ }
+ }
+ }
+ }
+ else if (currentSession.user &&
+ currentSession.user.__isUserNotAvailableProxy === true) {
+ // If we have a proxy user, try to get the real user data
+ try {
+ const { data, error: userError } = await this._getUser(currentSession.access_token);
+ if (!userError && (data === null || data === void 0 ? void 0 : data.user)) {
+ currentSession.user = data.user;
+ await this._saveSession(currentSession);
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ else {
+ this._debug(debugName, 'could not get user data, skipping SIGNED_IN notification');
+ }
+ }
+ catch (getUserError) {
+ console.error('Error getting user data:', getUserError);
+ this._debug(debugName, 'error getting user data, skipping SIGNED_IN notification', getUserError);
+ }
+ }
+ else {
+ // no need to persist currentSession again, as we just loaded it from
+ // local storage; persisting it again may overwrite a value saved by
+ // another client with access to the same local storage
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ }
+ catch (err) {
+ this._debug(debugName, 'error', err);
+ console.error(err);
+ return;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ async _callRefreshToken(refreshToken) {
+ var _a, _b;
+ if (!refreshToken) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ // refreshing is already in progress
+ if (this.refreshingDeferred) {
+ return this.refreshingDeferred.promise;
+ }
+ const debugName = `#_callRefreshToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ this.refreshingDeferred = new helpers_1.Deferred();
+ const { data, error } = await this._refreshAccessToken(refreshToken);
+ if (error)
+ throw error;
+ if (!data.session)
+ throw new errors_1.AuthSessionMissingError();
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('TOKEN_REFRESHED', data.session);
+ const result = { data: data.session, error: null };
+ this.refreshingDeferred.resolve(result);
+ return result;
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if ((0, errors_1.isAuthError)(error)) {
+ const result = { data: null, error };
+ if (!(0, errors_1.isAuthRetryableFetchError)(error)) {
+ await this._removeSession();
+ }
+ (_a = this.refreshingDeferred) === null || _a === void 0 ? void 0 : _a.resolve(result);
+ return result;
+ }
+ (_b = this.refreshingDeferred) === null || _b === void 0 ? void 0 : _b.reject(error);
+ throw error;
+ }
+ finally {
+ this.refreshingDeferred = null;
+ this._debug(debugName, 'end');
+ }
+ }
+ async _notifyAllSubscribers(event, session, broadcast = true) {
+ const debugName = `#_notifyAllSubscribers(${event})`;
+ this._debug(debugName, 'begin', session, `broadcast = ${broadcast}`);
+ try {
+ if (this.broadcastChannel && broadcast) {
+ this.broadcastChannel.postMessage({ event, session });
+ }
+ const errors = [];
+ const promises = Array.from(this.stateChangeEmitters.values()).map(async (x) => {
+ try {
+ await x.callback(event, session);
+ }
+ catch (e) {
+ errors.push(e);
+ }
+ });
+ await Promise.all(promises);
+ if (errors.length > 0) {
+ for (let i = 0; i < errors.length; i += 1) {
+ console.error(errors[i]);
+ }
+ throw errors[0];
+ }
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ async _saveSession(session) {
+ this._debug('#_saveSession()', session);
+ // _saveSession is always called whenever a new session has been acquired
+ // so we can safely suppress the warning returned by future getSession calls
+ this.suppressGetSessionWarning = true;
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ // Create a shallow copy to work with, to avoid mutating the original session object if it's used elsewhere
+ const sessionToProcess = Object.assign({}, session);
+ const userIsProxy = sessionToProcess.user && sessionToProcess.user.__isUserNotAvailableProxy === true;
+ if (this.userStorage) {
+ if (!userIsProxy && sessionToProcess.user) {
+ // If it's a real user object, save it to userStorage.
+ await (0, helpers_1.setItemAsync)(this.userStorage, this.storageKey + '-user', {
+ user: sessionToProcess.user,
+ });
+ }
+ else if (userIsProxy) {
+ // If it's the proxy, it means user was not found in userStorage.
+ // We should ensure no stale user data for this key exists in userStorage if we were to save null,
+ // or simply not save the proxy. For now, we don't save the proxy here.
+ // If there's a need to clear userStorage if user becomes proxy, that logic would go here.
+ }
+ // Prepare the main session data for primary storage: remove the user property before cloning
+ // This is important because the original session.user might be the proxy
+ const mainSessionData = Object.assign({}, sessionToProcess);
+ delete mainSessionData.user; // Remove user (real or proxy) before cloning for main storage
+ const clonedMainSessionData = (0, helpers_1.deepClone)(mainSessionData);
+ await (0, helpers_1.setItemAsync)(this.storage, this.storageKey, clonedMainSessionData);
+ }
+ else {
+ // No userStorage is configured.
+ // In this case, session.user should ideally not be a proxy.
+ // If it were, structuredClone would fail. This implies an issue elsewhere if user is a proxy here
+ const clonedSession = (0, helpers_1.deepClone)(sessionToProcess); // sessionToProcess still has its original user property
+ await (0, helpers_1.setItemAsync)(this.storage, this.storageKey, clonedSession);
+ }
+ }
+ async _removeSession() {
+ this._debug('#_removeSession()');
+ this.suppressGetSessionWarning = false;
+ await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey);
+ await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey + '-code-verifier');
+ await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey + '-user');
+ if (this.userStorage) {
+ await (0, helpers_1.removeItemAsync)(this.userStorage, this.storageKey + '-user');
+ }
+ await this._notifyAllSubscribers('SIGNED_OUT', null);
+ }
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ _removeVisibilityChangedCallback() {
+ this._debug('#_removeVisibilityChangedCallback()');
+ const callback = this.visibilityChangedCallback;
+ this.visibilityChangedCallback = null;
+ try {
+ if (callback && (0, helpers_1.isBrowser)() && (window === null || window === void 0 ? void 0 : window.removeEventListener)) {
+ window.removeEventListener('visibilitychange', callback);
+ }
+ }
+ catch (e) {
+ console.error('removing visibilitychange callback failed', e);
+ }
+ }
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ async _startAutoRefresh() {
+ await this._stopAutoRefresh();
+ this._debug('#_startAutoRefresh()');
+ const ticker = setInterval(() => this._autoRefreshTokenTick(), constants_1.AUTO_REFRESH_TICK_DURATION_MS);
+ this.autoRefreshTicker = ticker;
+ if (ticker && typeof ticker === 'object' && typeof ticker.unref === 'function') {
+ // ticker is a NodeJS Timeout object that has an `unref` method
+ // https://nodejs.org/api/timers.html#timeoutunref
+ // When auto refresh is used in NodeJS (like for testing) the
+ // `setInterval` is preventing the process from being marked as
+ // finished and tests run endlessly. This can be prevented by calling
+ // `unref()` on the returned object.
+ ticker.unref();
+ // @ts-expect-error TS has no context of Deno
+ }
+ else if (typeof Deno !== 'undefined' && typeof Deno.unrefTimer === 'function') {
+ // similar like for NodeJS, but with the Deno API
+ // https://deno.land/api@latest?unstable&s=Deno.unrefTimer
+ // @ts-expect-error TS has no context of Deno
+ Deno.unrefTimer(ticker);
+ }
+ // run the tick immediately, but in the next pass of the event loop so that
+ // #_initialize can be allowed to complete without recursively waiting on
+ // itself
+ setTimeout(async () => {
+ await this.initializePromise;
+ await this._autoRefreshTokenTick();
+ }, 0);
+ }
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ async _stopAutoRefresh() {
+ this._debug('#_stopAutoRefresh()');
+ const ticker = this.autoRefreshTicker;
+ this.autoRefreshTicker = null;
+ if (ticker) {
+ clearInterval(ticker);
+ }
+ }
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ async startAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._startAutoRefresh();
+ }
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ async stopAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._stopAutoRefresh();
+ }
+ /**
+ * Runs the auto refresh token tick.
+ */
+ async _autoRefreshTokenTick() {
+ this._debug('#_autoRefreshTokenTick()', 'begin');
+ try {
+ await this._acquireLock(0, async () => {
+ try {
+ const now = Date.now();
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, } = result;
+ if (!session || !session.refresh_token || !session.expires_at) {
+ this._debug('#_autoRefreshTokenTick()', 'no session');
+ return;
+ }
+ // session will expire in this many ticks (or has already expired if <= 0)
+ const expiresInTicks = Math.floor((session.expires_at * 1000 - now) / constants_1.AUTO_REFRESH_TICK_DURATION_MS);
+ this._debug('#_autoRefreshTokenTick()', `access token expires in ${expiresInTicks} ticks, a tick lasts ${constants_1.AUTO_REFRESH_TICK_DURATION_MS}ms, refresh threshold is ${constants_1.AUTO_REFRESH_TICK_THRESHOLD} ticks`);
+ if (expiresInTicks <= constants_1.AUTO_REFRESH_TICK_THRESHOLD) {
+ await this._callRefreshToken(session.refresh_token);
+ }
+ });
+ }
+ catch (e) {
+ console.error('Auto refresh tick failed with error. This is likely a transient error.', e);
+ }
+ }
+ finally {
+ this._debug('#_autoRefreshTokenTick()', 'end');
+ }
+ });
+ }
+ catch (e) {
+ if (e.isAcquireTimeout || e instanceof locks_1.LockAcquireTimeoutError) {
+ this._debug('auto refresh token tick lock not available');
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ async _handleVisibilityChange() {
+ this._debug('#_handleVisibilityChange()');
+ if (!(0, helpers_1.isBrowser)() || !(window === null || window === void 0 ? void 0 : window.addEventListener)) {
+ if (this.autoRefreshToken) {
+ // in non-browser environments the refresh token ticker runs always
+ this.startAutoRefresh();
+ }
+ return false;
+ }
+ try {
+ this.visibilityChangedCallback = async () => await this._onVisibilityChanged(false);
+ window === null || window === void 0 ? void 0 : window.addEventListener('visibilitychange', this.visibilityChangedCallback);
+ // now immediately call the visbility changed callback to setup with the
+ // current visbility state
+ await this._onVisibilityChanged(true); // initial call
+ }
+ catch (error) {
+ console.error('_handleVisibilityChange', error);
+ }
+ }
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ async _onVisibilityChanged(calledFromInitialize) {
+ const methodName = `#_onVisibilityChanged(${calledFromInitialize})`;
+ this._debug(methodName, 'visibilityState', document.visibilityState);
+ if (document.visibilityState === 'visible') {
+ if (this.autoRefreshToken) {
+ // in browser environments the refresh token ticker runs only on focused tabs
+ // which prevents race conditions
+ this._startAutoRefresh();
+ }
+ if (!calledFromInitialize) {
+ // called when the visibility has changed, i.e. the browser
+ // transitioned from hidden -> visible so we need to see if the session
+ // should be recovered immediately... but to do that we need to acquire
+ // the lock first asynchronously
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ if (document.visibilityState !== 'visible') {
+ this._debug(methodName, 'acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting');
+ // visibility has changed while waiting for the lock, abort
+ return;
+ }
+ // recover the session
+ await this._recoverAndRefresh();
+ });
+ }
+ }
+ else if (document.visibilityState === 'hidden') {
+ if (this.autoRefreshToken) {
+ this._stopAutoRefresh();
+ }
+ }
+ }
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ async _getUrlForProvider(url, provider, options) {
+ const urlParams = [`provider=${encodeURIComponent(provider)}`];
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`);
+ }
+ if (options === null || options === void 0 ? void 0 : options.scopes) {
+ urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);
+ }
+ if (this.flowType === 'pkce') {
+ const [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ const flowParams = new URLSearchParams({
+ code_challenge: `${encodeURIComponent(codeChallenge)}`,
+ code_challenge_method: `${encodeURIComponent(codeChallengeMethod)}`,
+ });
+ urlParams.push(flowParams.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.queryParams) {
+ const query = new URLSearchParams(options.queryParams);
+ urlParams.push(query.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.skipBrowserRedirect) {
+ urlParams.push(`skip_http_redirect=${options.skipBrowserRedirect}`);
+ }
+ return `${url}?${urlParams.join('&')}`;
+ }
+ async _unenroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/factors/${params.factorId}`, {
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async _enroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const body = Object.assign({ friendly_name: params.friendlyName, factor_type: params.factorType }, (params.factorType === 'phone'
+ ? { phone: params.phone }
+ : params.factorType === 'totp'
+ ? { issuer: params.issuer }
+ : {}));
+ const { data, error } = (await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ }));
+ if (error) {
+ return this._returnResult({ data: null, error });
+ }
+ if (params.factorType === 'totp' && data.type === 'totp' && ((_b = data === null || data === void 0 ? void 0 : data.totp) === null || _b === void 0 ? void 0 : _b.qr_code)) {
+ data.totp.qr_code = `data:image/svg+xml;utf-8,${data.totp.qr_code}`;
+ }
+ return this._returnResult({ data, error: null });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async _verify(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const body = Object.assign({ challenge_id: params.challengeId }, ('webauthn' in params
+ ? {
+ webauthn: Object.assign(Object.assign({}, params.webauthn), { credential_response: params.webauthn.type === 'create'
+ ? (0, webauthn_1.serializeCredentialCreationResponse)(params.webauthn.credential_response)
+ : (0, webauthn_1.serializeCredentialRequestResponse)(params.webauthn.credential_response) }),
+ }
+ : { code: params.code }));
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/verify`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return this._returnResult({ data: null, error });
+ }
+ await this._saveSession(Object.assign({ expires_at: Math.round(Date.now() / 1000) + data.expires_in }, data));
+ await this._notifyAllSubscribers('MFA_CHALLENGE_VERIFIED', data);
+ return this._returnResult({ data, error });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ });
+ }
+ async _challenge(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const response = (await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/challenge`, {
+ body: params,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ }));
+ if (response.error) {
+ return response;
+ }
+ const { data } = response;
+ if (data.type !== 'webauthn') {
+ return { data, error: null };
+ }
+ switch (data.webauthn.type) {
+ case 'create':
+ return {
+ data: Object.assign(Object.assign({}, data), { webauthn: Object.assign(Object.assign({}, data.webauthn), { credential_options: Object.assign(Object.assign({}, data.webauthn.credential_options), { publicKey: (0, webauthn_1.deserializeCredentialCreationOptions)(data.webauthn.credential_options.publicKey) }) }) }),
+ error: null,
+ };
+ case 'request':
+ return {
+ data: Object.assign(Object.assign({}, data), { webauthn: Object.assign(Object.assign({}, data.webauthn), { credential_options: Object.assign(Object.assign({}, data.webauthn.credential_options), { publicKey: (0, webauthn_1.deserializeCredentialRequestOptions)(data.webauthn.credential_options.publicKey) }) }) }),
+ error: null,
+ };
+ }
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ async _challengeAndVerify(params) {
+ // both _challenge and _verify independently acquire the lock, so no need
+ // to acquire it here
+ const { data: challengeData, error: challengeError } = await this._challenge({
+ factorId: params.factorId,
+ });
+ if (challengeError) {
+ return this._returnResult({ data: null, error: challengeError });
+ }
+ return await this._verify({
+ factorId: params.factorId,
+ challengeId: challengeData.id,
+ code: params.code,
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ async _listFactors() {
+ var _a;
+ // use #getUser instead of #_getUser as the former acquires a lock
+ const { data: { user }, error: userError, } = await this.getUser();
+ if (userError) {
+ return { data: null, error: userError };
+ }
+ const data = {
+ all: [],
+ phone: [],
+ totp: [],
+ webauthn: [],
+ };
+ // loop over the factors ONCE
+ for (const factor of (_a = user === null || user === void 0 ? void 0 : user.factors) !== null && _a !== void 0 ? _a : []) {
+ data.all.push(factor);
+ if (factor.status === 'verified') {
+ ;
+ data[factor.factor_type].push(factor);
+ }
+ }
+ return {
+ data,
+ error: null,
+ };
+ }
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ async _getAuthenticatorAssuranceLevel() {
+ var _a, _b;
+ const { data: { session }, error: sessionError, } = await this.getSession();
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return {
+ data: { currentLevel: null, nextLevel: null, currentAuthenticationMethods: [] },
+ error: null,
+ };
+ }
+ const { payload } = (0, helpers_1.decodeJWT)(session.access_token);
+ let currentLevel = null;
+ if (payload.aal) {
+ currentLevel = payload.aal;
+ }
+ let nextLevel = currentLevel;
+ const verifiedFactors = (_b = (_a = session.user.factors) === null || _a === void 0 ? void 0 : _a.filter((factor) => factor.status === 'verified')) !== null && _b !== void 0 ? _b : [];
+ if (verifiedFactors.length > 0) {
+ nextLevel = 'aal2';
+ }
+ const currentAuthenticationMethods = payload.amr || [];
+ return { data: { currentLevel, nextLevel, currentAuthenticationMethods }, error: null };
+ }
+ /**
+ * Retrieves details about an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * Returns authorization details including client info, scopes, and user information.
+ * If the API returns a redirect_uri, it means consent was already given - the caller
+ * should handle the redirect manually if needed.
+ */
+ async _getAuthorizationDetails(authorizationId) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError() });
+ }
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/oauth/authorizations/${authorizationId}`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ xform: (data) => ({ data, error: null }),
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Approves an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _approveAuthorization(authorizationId, options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError() });
+ }
+ const response = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/oauth/authorizations/${authorizationId}/consent`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ body: { action: 'approve' },
+ xform: (data) => ({ data, error: null }),
+ });
+ if (response.data && response.data.redirect_url) {
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if ((0, helpers_1.isBrowser)() && !(options === null || options === void 0 ? void 0 : options.skipBrowserRedirect)) {
+ window.location.assign(response.data.redirect_url);
+ }
+ }
+ return response;
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Denies an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _denyAuthorization(authorizationId, options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError() });
+ }
+ const response = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/oauth/authorizations/${authorizationId}/consent`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ body: { action: 'deny' },
+ xform: (data) => ({ data, error: null }),
+ });
+ if (response.data && response.data.redirect_url) {
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if ((0, helpers_1.isBrowser)() && !(options === null || options === void 0 ? void 0 : options.skipBrowserRedirect)) {
+ window.location.assign(response.data.redirect_url);
+ }
+ }
+ return response;
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Lists all OAuth grants that the authenticated user has authorized.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _listOAuthGrants() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError() });
+ }
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/user/oauth/grants`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ xform: (data) => ({ data, error: null }),
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Revokes a user's OAuth grant for a specific client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _revokeOAuthGrant(options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError() });
+ }
+ await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/user/oauth/grants`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ query: { client_id: options.clientId },
+ noResolveJson: true,
+ });
+ return { data: {}, error: null };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async fetchJwk(kid, jwks = { keys: [] }) {
+ // try fetching from the supplied jwks
+ let jwk = jwks.keys.find((key) => key.kid === kid);
+ if (jwk) {
+ return jwk;
+ }
+ const now = Date.now();
+ // try fetching from cache
+ jwk = this.jwks.keys.find((key) => key.kid === kid);
+ // jwk exists and jwks isn't stale
+ if (jwk && this.jwks_cached_at + constants_1.JWKS_TTL > now) {
+ return jwk;
+ }
+ // jwk isn't cached in memory so we need to fetch it from the well-known endpoint
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/.well-known/jwks.json`, {
+ headers: this.headers,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data.keys || data.keys.length === 0) {
+ return null;
+ }
+ this.jwks = data;
+ this.jwks_cached_at = now;
+ // Find the signing key
+ jwk = data.keys.find((key) => key.kid === kid);
+ if (!jwk) {
+ return null;
+ }
+ return jwk;
+ }
+ /**
+ * Extracts the JWT claims present in the access token by first verifying the
+ * JWT against the server's JSON Web Key Set endpoint
+ * `/.well-known/jwks.json` which is often cached, resulting in significantly
+ * faster responses. Prefer this method over {@link #getUser} which always
+ * sends a request to the Auth server for each JWT.
+ *
+ * If the project is not using an asymmetric JWT signing key (like ECC or
+ * RSA) it always sends a request to the Auth server (similar to {@link
+ * #getUser}) to verify the JWT.
+ *
+ * @param jwt An optional specific JWT you wish to verify, not the one you
+ * can obtain from {@link #getSession}.
+ * @param options Various additional options that allow you to customize the
+ * behavior of this method.
+ */
+ async getClaims(jwt, options = {}) {
+ try {
+ let token = jwt;
+ if (!token) {
+ const { data, error } = await this.getSession();
+ if (error || !data.session) {
+ return this._returnResult({ data: null, error });
+ }
+ token = data.session.access_token;
+ }
+ const { header, payload, signature, raw: { header: rawHeader, payload: rawPayload }, } = (0, helpers_1.decodeJWT)(token);
+ if (!(options === null || options === void 0 ? void 0 : options.allowExpired)) {
+ // Reject expired JWTs should only happen if jwt argument was passed
+ (0, helpers_1.validateExp)(payload.exp);
+ }
+ const signingKey = !header.alg ||
+ header.alg.startsWith('HS') ||
+ !header.kid ||
+ !('crypto' in globalThis && 'subtle' in globalThis.crypto)
+ ? null
+ : await this.fetchJwk(header.kid, (options === null || options === void 0 ? void 0 : options.keys) ? { keys: options.keys } : options === null || options === void 0 ? void 0 : options.jwks);
+ // If symmetric algorithm or WebCrypto API is unavailable, fallback to getUser()
+ if (!signingKey) {
+ const { error } = await this.getUser(token);
+ if (error) {
+ throw error;
+ }
+ // getUser succeeds so the claims in the JWT can be trusted
+ return {
+ data: {
+ claims: payload,
+ header,
+ signature,
+ },
+ error: null,
+ };
+ }
+ const algorithm = (0, helpers_1.getAlgorithm)(header.alg);
+ // Convert JWK to CryptoKey
+ const publicKey = await crypto.subtle.importKey('jwk', signingKey, algorithm, true, [
+ 'verify',
+ ]);
+ // Verify the signature
+ const isValid = await crypto.subtle.verify(algorithm, publicKey, signature, (0, base64url_1.stringToUint8Array)(`${rawHeader}.${rawPayload}`));
+ if (!isValid) {
+ throw new errors_1.AuthInvalidJwtError('Invalid JWT signature');
+ }
+ // If verification succeeds, decode and return claims
+ return {
+ data: {
+ claims: payload,
+ header,
+ signature,
+ },
+ error: null,
+ };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+}
+GoTrueClient.nextInstanceID = {};
+exports.default = GoTrueClient;
+//# sourceMappingURL=GoTrueClient.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map
new file mode 100644
index 0000000..3bee7c2
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueClient.js","sourceRoot":"","sources":["../../src/GoTrue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L,IAAI,EAAE;wBACJ,MAAM,EAAE,OAAO;wBACf,MAAM;wBACN,SAAS;qBACV;oBACD,KAAK,EAAE,IAAI;iBACZ,CAAA;YACH,CAAC;YAED,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAE1C,2BAA2B;YAC3B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE;gBAClF,QAAQ;aACT,CAAC,CAAA;YAEF,uBAAuB;YACvB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CACxC,SAAS,EACT,SAAS,EACT,SAAS,EACT,IAAA,8BAAkB,EAAC,GAAG,SAAS,IAAI,UAAU,EAAE,CAAC,CACjD,CAAA;YAED,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,4BAAmB,CAAC,uBAAuB,CAAC,CAAA;YACxD,CAAC;YAED,qDAAqD;YACrD,OAAO;gBACL,IAAI,EAAE;oBACJ,MAAM,EAAE,OAAO;oBACf,MAAM;oBACN,SAAS;iBACV;gBACD,KAAK,EAAE,IAAI;aACZ,CAAA;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;YAClD,CAAC;YACD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;;AAziHc,2BAAc,GAA2B,EAAE,AAA7B,CAA6B;kBADvC,YAAY"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts
new file mode 100644
index 0000000..62b23d0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts
@@ -0,0 +1,9 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import GoTrueClient from './GoTrueClient';
+import AuthAdminApi from './AuthAdminApi';
+import AuthClient from './AuthClient';
+export { GoTrueAdminApi, GoTrueClient, AuthAdminApi, AuthClient };
+export * from './lib/types';
+export * from './lib/errors';
+export { navigatorLock, NavigatorLockAcquireTimeoutError, internals as lockInternals, processLock, } from './lib/locks';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts.map
new file mode 100644
index 0000000..884248d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA;AACjE,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,SAAS,IAAI,aAAa,EAC1B,WAAW,GACZ,MAAM,aAAa,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/index.js b/backend/node_modules/@supabase/auth-js/dist/main/index.js
new file mode 100644
index 0000000..27f9e50
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/index.js
@@ -0,0 +1,20 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.processLock = exports.lockInternals = exports.NavigatorLockAcquireTimeoutError = exports.navigatorLock = exports.AuthClient = exports.AuthAdminApi = exports.GoTrueClient = exports.GoTrueAdminApi = void 0;
+const tslib_1 = require("tslib");
+const GoTrueAdminApi_1 = tslib_1.__importDefault(require("./GoTrueAdminApi"));
+exports.GoTrueAdminApi = GoTrueAdminApi_1.default;
+const GoTrueClient_1 = tslib_1.__importDefault(require("./GoTrueClient"));
+exports.GoTrueClient = GoTrueClient_1.default;
+const AuthAdminApi_1 = tslib_1.__importDefault(require("./AuthAdminApi"));
+exports.AuthAdminApi = AuthAdminApi_1.default;
+const AuthClient_1 = tslib_1.__importDefault(require("./AuthClient"));
+exports.AuthClient = AuthClient_1.default;
+tslib_1.__exportStar(require("./lib/types"), exports);
+tslib_1.__exportStar(require("./lib/errors"), exports);
+var locks_1 = require("./lib/locks");
+Object.defineProperty(exports, "navigatorLock", { enumerable: true, get: function () { return locks_1.navigatorLock; } });
+Object.defineProperty(exports, "NavigatorLockAcquireTimeoutError", { enumerable: true, get: function () { return locks_1.NavigatorLockAcquireTimeoutError; } });
+Object.defineProperty(exports, "lockInternals", { enumerable: true, get: function () { return locks_1.internals; } });
+Object.defineProperty(exports, "processLock", { enumerable: true, get: function () { return locks_1.processLock; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/index.js.map b/backend/node_modules/@supabase/auth-js/dist/main/index.js.map
new file mode 100644
index 0000000..ca499bc
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,8EAA6C;AAIpC,yBAJF,wBAAc,CAIE;AAHvB,0EAAyC;AAGhB,uBAHlB,sBAAY,CAGkB;AAFrC,0EAAyC;AAEF,uBAFhC,sBAAY,CAEgC;AADnD,sEAAqC;AACgB,qBAD9C,oBAAU,CAC8C;AAC/D,sDAA2B;AAC3B,uDAA4B;AAC5B,qCAKoB;AAJlB,sGAAA,aAAa,OAAA;AACb,yHAAA,gCAAgC,OAAA;AAChC,sGAAA,SAAS,OAAiB;AAC1B,oGAAA,WAAW,OAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts
new file mode 100644
index 0000000..62276a3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts
@@ -0,0 +1,76 @@
+/**
+ * Avoid modifying this file. It's part of
+ * https://github.com/supabase-community/base64url-js. Submit all fixes on
+ * that repo!
+ */
+import { Uint8Array_ } from './webauthn.dom';
+/**
+ * Converts a byte to a Base64-URL string.
+ *
+ * @param byte The byte to convert, or null to flush at the end of the byte sequence.
+ * @param state The Base64 conversion state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next Base64 character when ready.
+ */
+export declare function byteToBase64URL(byte: number | null, state: {
+ queue: number;
+ queuedBits: number;
+}, emit: (char: string) => void): void;
+/**
+ * Converts a String char code (extracted using `string.charCodeAt(position)`) to a sequence of Base64-URL characters.
+ *
+ * @param charCode The char code of the JavaScript string.
+ * @param state The Base64 state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next byte.
+ */
+export declare function byteFromBase64URL(charCode: number, state: {
+ queue: number;
+ queuedBits: number;
+}, emit: (byte: number) => void): void;
+/**
+ * Converts a JavaScript string (which may include any valid character) into a
+ * Base64-URL encoded string. The string is first encoded in UTF-8 which is
+ * then encoded as Base64-URL.
+ *
+ * @param str The string to convert.
+ */
+export declare function stringToBase64URL(str: string): string;
+/**
+ * Converts a Base64-URL encoded string into a JavaScript string. It is assumed
+ * that the underlying string has been encoded as UTF-8.
+ *
+ * @param str The Base64-URL encoded string.
+ */
+export declare function stringFromBase64URL(str: string): string;
+/**
+ * Converts a Unicode codepoint to a multi-byte UTF-8 sequence.
+ *
+ * @param codepoint The Unicode codepoint.
+ * @param emit Function which will be called for each UTF-8 byte that represents the codepoint.
+ */
+export declare function codepointToUTF8(codepoint: number, emit: (byte: number) => void): void;
+/**
+ * Converts a JavaScript string to a sequence of UTF-8 bytes.
+ *
+ * @param str The string to convert to UTF-8.
+ * @param emit Function which will be called for each UTF-8 byte of the string.
+ */
+export declare function stringToUTF8(str: string, emit: (byte: number) => void): void;
+/**
+ * Converts a UTF-8 byte to a Unicode codepoint.
+ *
+ * @param byte The UTF-8 byte next in the sequence.
+ * @param state The shared state between consecutive UTF-8 bytes in the
+ * sequence, an object with the shape `{ utf8seq: 0, codepoint: 0 }`.
+ * @param emit Function which will be called for each codepoint.
+ */
+export declare function stringFromUTF8(byte: number, state: {
+ utf8seq: number;
+ codepoint: number;
+}, emit: (codepoint: number) => void): void;
+/**
+ * Helper functions to convert different types of strings to Uint8Array
+ */
+export declare function base64UrlToUint8Array(str: string): Uint8Array_;
+export declare function stringToUint8Array(str: string): Uint8Array_;
+export declare function bytesToBase64URL(bytes: Uint8Array): string;
+//# sourceMappingURL=base64url.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map
new file mode 100644
index 0000000..5a7591c
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base64url.d.ts","sourceRoot":"","sources":["../../../src/lib/base64url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAoC5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAqB7B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAmB7B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,UAgB5C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,UAuB9C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAsB9E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAgBrE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC7C,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,QAuClC;AAED;;GAEG;AAEH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAa9D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAI3D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,UAcjD"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js
new file mode 100644
index 0000000..547425d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js
@@ -0,0 +1,269 @@
+"use strict";
+/**
+ * Avoid modifying this file. It's part of
+ * https://github.com/supabase-community/base64url-js. Submit all fixes on
+ * that repo!
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.byteToBase64URL = byteToBase64URL;
+exports.byteFromBase64URL = byteFromBase64URL;
+exports.stringToBase64URL = stringToBase64URL;
+exports.stringFromBase64URL = stringFromBase64URL;
+exports.codepointToUTF8 = codepointToUTF8;
+exports.stringToUTF8 = stringToUTF8;
+exports.stringFromUTF8 = stringFromUTF8;
+exports.base64UrlToUint8Array = base64UrlToUint8Array;
+exports.stringToUint8Array = stringToUint8Array;
+exports.bytesToBase64URL = bytesToBase64URL;
+/**
+ * An array of characters that encode 6 bits into a Base64-URL alphabet
+ * character.
+ */
+const TO_BASE64URL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'.split('');
+/**
+ * An array of characters that can appear in a Base64-URL encoded string but
+ * should be ignored.
+ */
+const IGNORE_BASE64URL = ' \t\n\r='.split('');
+/**
+ * An array of 128 numbers that map a Base64-URL character to 6 bits, or if -2
+ * used to skip the character, or if -1 used to error out.
+ */
+const FROM_BASE64URL = (() => {
+ const charMap = new Array(128);
+ for (let i = 0; i < charMap.length; i += 1) {
+ charMap[i] = -1;
+ }
+ for (let i = 0; i < IGNORE_BASE64URL.length; i += 1) {
+ charMap[IGNORE_BASE64URL[i].charCodeAt(0)] = -2;
+ }
+ for (let i = 0; i < TO_BASE64URL.length; i += 1) {
+ charMap[TO_BASE64URL[i].charCodeAt(0)] = i;
+ }
+ return charMap;
+})();
+/**
+ * Converts a byte to a Base64-URL string.
+ *
+ * @param byte The byte to convert, or null to flush at the end of the byte sequence.
+ * @param state The Base64 conversion state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next Base64 character when ready.
+ */
+function byteToBase64URL(byte, state, emit) {
+ if (byte !== null) {
+ state.queue = (state.queue << 8) | byte;
+ state.queuedBits += 8;
+ while (state.queuedBits >= 6) {
+ const pos = (state.queue >> (state.queuedBits - 6)) & 63;
+ emit(TO_BASE64URL[pos]);
+ state.queuedBits -= 6;
+ }
+ }
+ else if (state.queuedBits > 0) {
+ state.queue = state.queue << (6 - state.queuedBits);
+ state.queuedBits = 6;
+ while (state.queuedBits >= 6) {
+ const pos = (state.queue >> (state.queuedBits - 6)) & 63;
+ emit(TO_BASE64URL[pos]);
+ state.queuedBits -= 6;
+ }
+ }
+}
+/**
+ * Converts a String char code (extracted using `string.charCodeAt(position)`) to a sequence of Base64-URL characters.
+ *
+ * @param charCode The char code of the JavaScript string.
+ * @param state The Base64 state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next byte.
+ */
+function byteFromBase64URL(charCode, state, emit) {
+ const bits = FROM_BASE64URL[charCode];
+ if (bits > -1) {
+ // valid Base64-URL character
+ state.queue = (state.queue << 6) | bits;
+ state.queuedBits += 6;
+ while (state.queuedBits >= 8) {
+ emit((state.queue >> (state.queuedBits - 8)) & 0xff);
+ state.queuedBits -= 8;
+ }
+ }
+ else if (bits === -2) {
+ // ignore spaces, tabs, newlines, =
+ return;
+ }
+ else {
+ throw new Error(`Invalid Base64-URL character "${String.fromCharCode(charCode)}"`);
+ }
+}
+/**
+ * Converts a JavaScript string (which may include any valid character) into a
+ * Base64-URL encoded string. The string is first encoded in UTF-8 which is
+ * then encoded as Base64-URL.
+ *
+ * @param str The string to convert.
+ */
+function stringToBase64URL(str) {
+ const base64 = [];
+ const emitter = (char) => {
+ base64.push(char);
+ };
+ const state = { queue: 0, queuedBits: 0 };
+ stringToUTF8(str, (byte) => {
+ byteToBase64URL(byte, state, emitter);
+ });
+ byteToBase64URL(null, state, emitter);
+ return base64.join('');
+}
+/**
+ * Converts a Base64-URL encoded string into a JavaScript string. It is assumed
+ * that the underlying string has been encoded as UTF-8.
+ *
+ * @param str The Base64-URL encoded string.
+ */
+function stringFromBase64URL(str) {
+ const conv = [];
+ const utf8Emit = (codepoint) => {
+ conv.push(String.fromCodePoint(codepoint));
+ };
+ const utf8State = {
+ utf8seq: 0,
+ codepoint: 0,
+ };
+ const b64State = { queue: 0, queuedBits: 0 };
+ const byteEmit = (byte) => {
+ stringFromUTF8(byte, utf8State, utf8Emit);
+ };
+ for (let i = 0; i < str.length; i += 1) {
+ byteFromBase64URL(str.charCodeAt(i), b64State, byteEmit);
+ }
+ return conv.join('');
+}
+/**
+ * Converts a Unicode codepoint to a multi-byte UTF-8 sequence.
+ *
+ * @param codepoint The Unicode codepoint.
+ * @param emit Function which will be called for each UTF-8 byte that represents the codepoint.
+ */
+function codepointToUTF8(codepoint, emit) {
+ if (codepoint <= 0x7f) {
+ emit(codepoint);
+ return;
+ }
+ else if (codepoint <= 0x7ff) {
+ emit(0xc0 | (codepoint >> 6));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ else if (codepoint <= 0xffff) {
+ emit(0xe0 | (codepoint >> 12));
+ emit(0x80 | ((codepoint >> 6) & 0x3f));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ else if (codepoint <= 0x10ffff) {
+ emit(0xf0 | (codepoint >> 18));
+ emit(0x80 | ((codepoint >> 12) & 0x3f));
+ emit(0x80 | ((codepoint >> 6) & 0x3f));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ throw new Error(`Unrecognized Unicode codepoint: ${codepoint.toString(16)}`);
+}
+/**
+ * Converts a JavaScript string to a sequence of UTF-8 bytes.
+ *
+ * @param str The string to convert to UTF-8.
+ * @param emit Function which will be called for each UTF-8 byte of the string.
+ */
+function stringToUTF8(str, emit) {
+ for (let i = 0; i < str.length; i += 1) {
+ let codepoint = str.charCodeAt(i);
+ if (codepoint > 0xd7ff && codepoint <= 0xdbff) {
+ // most UTF-16 codepoints are Unicode codepoints, except values in this
+ // range where the next UTF-16 codepoint needs to be combined with the
+ // current one to get the Unicode codepoint
+ const highSurrogate = ((codepoint - 0xd800) * 0x400) & 0xffff;
+ const lowSurrogate = (str.charCodeAt(i + 1) - 0xdc00) & 0xffff;
+ codepoint = (lowSurrogate | highSurrogate) + 0x10000;
+ i += 1;
+ }
+ codepointToUTF8(codepoint, emit);
+ }
+}
+/**
+ * Converts a UTF-8 byte to a Unicode codepoint.
+ *
+ * @param byte The UTF-8 byte next in the sequence.
+ * @param state The shared state between consecutive UTF-8 bytes in the
+ * sequence, an object with the shape `{ utf8seq: 0, codepoint: 0 }`.
+ * @param emit Function which will be called for each codepoint.
+ */
+function stringFromUTF8(byte, state, emit) {
+ if (state.utf8seq === 0) {
+ if (byte <= 0x7f) {
+ emit(byte);
+ return;
+ }
+ // count the number of 1 leading bits until you reach 0
+ for (let leadingBit = 1; leadingBit < 6; leadingBit += 1) {
+ if (((byte >> (7 - leadingBit)) & 1) === 0) {
+ state.utf8seq = leadingBit;
+ break;
+ }
+ }
+ if (state.utf8seq === 2) {
+ state.codepoint = byte & 31;
+ }
+ else if (state.utf8seq === 3) {
+ state.codepoint = byte & 15;
+ }
+ else if (state.utf8seq === 4) {
+ state.codepoint = byte & 7;
+ }
+ else {
+ throw new Error('Invalid UTF-8 sequence');
+ }
+ state.utf8seq -= 1;
+ }
+ else if (state.utf8seq > 0) {
+ if (byte <= 0x7f) {
+ throw new Error('Invalid UTF-8 sequence');
+ }
+ state.codepoint = (state.codepoint << 6) | (byte & 63);
+ state.utf8seq -= 1;
+ if (state.utf8seq === 0) {
+ emit(state.codepoint);
+ }
+ }
+}
+/**
+ * Helper functions to convert different types of strings to Uint8Array
+ */
+function base64UrlToUint8Array(str) {
+ const result = [];
+ const state = { queue: 0, queuedBits: 0 };
+ const onByte = (byte) => {
+ result.push(byte);
+ };
+ for (let i = 0; i < str.length; i += 1) {
+ byteFromBase64URL(str.charCodeAt(i), state, onByte);
+ }
+ return new Uint8Array(result);
+}
+function stringToUint8Array(str) {
+ const result = [];
+ stringToUTF8(str, (byte) => result.push(byte));
+ return new Uint8Array(result);
+}
+function bytesToBase64URL(bytes) {
+ const result = [];
+ const state = { queue: 0, queuedBits: 0 };
+ const onChar = (char) => {
+ result.push(char);
+ };
+ bytes.forEach((byte) => byteToBase64URL(byte, state, onChar));
+ // always call with `null` after processing all bytes
+ byteToBase64URL(null, state, onChar);
+ return result.join('');
+}
+//# sourceMappingURL=base64url.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map
new file mode 100644
index 0000000..db9998e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base64url.js","sourceRoot":"","sources":["../../../src/lib/base64url.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA6CH,0CAwBC;AASD,8CAsBC;AASD,8CAgBC;AAQD,kDAuBC;AAQD,0CAsBC;AAQD,oCAgBC;AAUD,wCA0CC;AAMD,sDAaC;AAED,gDAIC;AAED,4CAcC;AA3SD;;;GAGG;AACH,MAAM,YAAY,GAAG,kEAAkE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEjG;;;GAGG;AACH,MAAM,gBAAgB,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAE7C;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAa,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;IAExC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,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/B,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,YAAY,CAAC,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACtD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;AAC/B,CAAC;AAED,SAAgB,gBAAgB,CAAC,KAAiB;IAChD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAA;IAEzC,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;QAC9B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;IAE7D,qDAAqD;IACrD,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAEpC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxB,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts
new file mode 100644
index 0000000..604f8d0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts
@@ -0,0 +1,26 @@
+/** Current session will be checked for refresh at this interval. */
+export declare const AUTO_REFRESH_TICK_DURATION_MS: number;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+export declare const AUTO_REFRESH_TICK_THRESHOLD = 3;
+export declare const EXPIRY_MARGIN_MS: number;
+export declare const GOTRUE_URL = "http://localhost:9999";
+export declare const STORAGE_KEY = "supabase.auth.token";
+export declare const AUDIENCE = "";
+export declare const DEFAULT_HEADERS: {
+ 'X-Client-Info': string;
+};
+export declare const NETWORK_FAILURE: {
+ MAX_RETRIES: number;
+ RETRY_INTERVAL: number;
+};
+export declare const API_VERSION_HEADER_NAME = "X-Supabase-Api-Version";
+export declare const API_VERSIONS: {
+ '2024-01-01': {
+ timestamp: number;
+ name: string;
+ };
+};
+export declare const BASE64URL_REGEX: RegExp;
+export declare const JWKS_TTL: number;
+//# sourceMappingURL=constants.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map
new file mode 100644
index 0000000..acb62eb
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,eAAO,MAAM,6BAA6B,QAAY,CAAA;AAEtD;2FAC2F;AAC3F,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAK5C,eAAO,MAAM,gBAAgB,QAA8D,CAAA;AAE3F,eAAO,MAAM,UAAU,0BAA0B,CAAA;AACjD,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,eAAO,MAAM,QAAQ,KAAK,CAAA;AAC1B,eAAO,MAAM,eAAe;;CAA8C,CAAA;AAC1E,eAAO,MAAM,eAAe;;;CAG3B,CAAA;AAED,eAAO,MAAM,uBAAuB,2BAA2B,CAAA;AAC/D,eAAO,MAAM,YAAY;;;;;CAKxB,CAAA;AAED,eAAO,MAAM,eAAe,QAAyD,CAAA;AAErF,eAAO,MAAM,QAAQ,QAAiB,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js
new file mode 100644
index 0000000..7ce758d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js
@@ -0,0 +1,31 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
+const version_1 = require("./version");
+/** Current session will be checked for refresh at this interval. */
+exports.AUTO_REFRESH_TICK_DURATION_MS = 30 * 1000;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
+/*
+ * Earliest time before an access token expires that the session should be refreshed.
+ */
+exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD * exports.AUTO_REFRESH_TICK_DURATION_MS;
+exports.GOTRUE_URL = 'http://localhost:9999';
+exports.STORAGE_KEY = 'supabase.auth.token';
+exports.AUDIENCE = '';
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `gotrue-js/${version_1.version}` };
+exports.NETWORK_FAILURE = {
+ MAX_RETRIES: 10,
+ RETRY_INTERVAL: 2, // in deciseconds
+};
+exports.API_VERSION_HEADER_NAME = 'X-Supabase-Api-Version';
+exports.API_VERSIONS = {
+ '2024-01-01': {
+ timestamp: Date.parse('2024-01-01T00:00:00.0Z'),
+ name: '2024-01-01',
+ },
+};
+exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
+exports.JWKS_TTL = 10 * 60 * 1000; // 10 minutes
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map
new file mode 100644
index 0000000..68ebf55
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,oEAAoE;AACvD,QAAA,6BAA6B,GAAG,EAAE,GAAG,IAAI,CAAA;AAEtD;2FAC2F;AAC9E,QAAA,2BAA2B,GAAG,CAAC,CAAA;AAE5C;;GAEG;AACU,QAAA,gBAAgB,GAAG,mCAA2B,GAAG,qCAA6B,CAAA;AAE9E,QAAA,UAAU,GAAG,uBAAuB,CAAA;AACpC,QAAA,WAAW,GAAG,qBAAqB,CAAA;AACnC,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,eAAe,GAAG,EAAE,eAAe,EAAE,aAAa,iBAAO,EAAE,EAAE,CAAA;AAC7D,QAAA,eAAe,GAAG;IAC7B,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,CAAC,EAAE,iBAAiB;CACrC,CAAA;AAEY,QAAA,uBAAuB,GAAG,wBAAwB,CAAA;AAClD,QAAA,YAAY,GAAG;IAC1B,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC/C,IAAI,EAAE,YAAY;KACnB;CACF,CAAA;AAEY,QAAA,eAAe,GAAG,sDAAsD,CAAA;AAExE,QAAA,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,aAAa"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts
new file mode 100644
index 0000000..668ad5b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts
@@ -0,0 +1,7 @@
+/**
+ * Known error codes. Note that the server may also return other error codes
+ * not included in this list (if the SDK is older than the version
+ * on the server).
+ */
+export type ErrorCode = 'unexpected_failure' | 'validation_failed' | 'bad_json' | 'email_exists' | 'phone_exists' | 'bad_jwt' | 'not_admin' | 'no_authorization' | 'user_not_found' | 'session_not_found' | 'session_expired' | 'refresh_token_not_found' | 'refresh_token_already_used' | 'flow_state_not_found' | 'flow_state_expired' | 'signup_disabled' | 'user_banned' | 'provider_email_needs_verification' | 'invite_not_found' | 'bad_oauth_state' | 'bad_oauth_callback' | 'oauth_provider_not_supported' | 'unexpected_audience' | 'single_identity_not_deletable' | 'email_conflict_identity_not_deletable' | 'identity_already_exists' | 'email_provider_disabled' | 'phone_provider_disabled' | 'too_many_enrolled_mfa_factors' | 'mfa_factor_name_conflict' | 'mfa_factor_not_found' | 'mfa_ip_address_mismatch' | 'mfa_challenge_expired' | 'mfa_verification_failed' | 'mfa_verification_rejected' | 'insufficient_aal' | 'captcha_failed' | 'saml_provider_disabled' | 'manual_linking_disabled' | 'sms_send_failed' | 'email_not_confirmed' | 'phone_not_confirmed' | 'reauth_nonce_missing' | 'saml_relay_state_not_found' | 'saml_relay_state_expired' | 'saml_idp_not_found' | 'saml_assertion_no_user_id' | 'saml_assertion_no_email' | 'user_already_exists' | 'sso_provider_not_found' | 'saml_metadata_fetch_failed' | 'saml_idp_already_exists' | 'sso_domain_already_exists' | 'saml_entity_id_mismatch' | 'conflict' | 'provider_disabled' | 'user_sso_managed' | 'reauthentication_needed' | 'same_password' | 'reauthentication_not_valid' | 'otp_expired' | 'otp_disabled' | 'identity_not_found' | 'weak_password' | 'over_request_rate_limit' | 'over_email_send_rate_limit' | 'over_sms_send_rate_limit' | 'bad_code_verifier' | 'anonymous_provider_disabled' | 'hook_timeout' | 'hook_timeout_after_retry' | 'hook_payload_over_size_limit' | 'hook_payload_invalid_content_type' | 'request_timeout' | 'mfa_phone_enroll_not_enabled' | 'mfa_phone_verify_not_enabled' | 'mfa_totp_enroll_not_enabled' | 'mfa_totp_verify_not_enabled' | 'mfa_webauthn_enroll_not_enabled' | 'mfa_webauthn_verify_not_enabled' | 'mfa_verified_factor_exists' | 'invalid_credentials' | 'email_address_not_authorized' | 'email_address_invalid';
+//# sourceMappingURL=error-codes.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map
new file mode 100644
index 0000000..cc88970
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB,oBAAoB,GACpB,mBAAmB,GACnB,UAAU,GACV,cAAc,GACd,cAAc,GACd,SAAS,GACT,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,yBAAyB,GACzB,4BAA4B,GAC5B,sBAAsB,GACtB,oBAAoB,GACpB,iBAAiB,GACjB,aAAa,GACb,mCAAmC,GACnC,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,8BAA8B,GAC9B,qBAAqB,GACrB,+BAA+B,GAC/B,uCAAuC,GACvC,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,0BAA0B,GAC1B,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,2BAA2B,GAC3B,kBAAkB,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,yBAAyB,GACzB,iBAAiB,GACjB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,GACzB,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,yBAAyB,GACzB,2BAA2B,GAC3B,yBAAyB,GACzB,UAAU,GACV,mBAAmB,GACnB,kBAAkB,GAClB,yBAAyB,GACzB,eAAe,GACf,4BAA4B,GAC5B,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,eAAe,GACf,yBAAyB,GACzB,4BAA4B,GAC5B,0BAA0B,GAC1B,mBAAmB,GACnB,6BAA6B,GAC7B,cAAc,GACd,0BAA0B,GAC1B,8BAA8B,GAC9B,mCAAmC,GACnC,iBAAiB,GACjB,8BAA8B,GAC9B,8BAA8B,GAC9B,6BAA6B,GAC7B,6BAA6B,GAC7B,iCAAiC,GACjC,iCAAiC,GACjC,4BAA4B,GAC5B,qBAAqB,GACrB,8BAA8B,GAC9B,uBAAuB,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js
new file mode 100644
index 0000000..afa679a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=error-codes.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map
new file mode 100644
index 0000000..a68e8e3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts
new file mode 100644
index 0000000..bec859b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts
@@ -0,0 +1,227 @@
+import { WeakPasswordReasons } from './types';
+import { ErrorCode } from './error-codes';
+/**
+ * Base error thrown by Supabase Auth helpers.
+ *
+ * @example
+ * ```ts
+ * import { AuthError } from '@supabase/auth-js'
+ *
+ * throw new AuthError('Unexpected auth error', 500, 'unexpected')
+ * ```
+ */
+export declare class AuthError extends Error {
+ /**
+ * Error code associated with the error. Most errors coming from
+ * HTTP responses will have a code, though some errors that occur
+ * before a response is received will not have one present. In that
+ * case {@link #status} will also be undefined.
+ */
+ code: ErrorCode | (string & {}) | undefined;
+ /** HTTP status code that caused the error. */
+ status: number | undefined;
+ protected __isAuthError: boolean;
+ constructor(message: string, status?: number, code?: string);
+}
+export declare function isAuthError(error: unknown): error is AuthError;
+/**
+ * Error returned directly from the GoTrue REST API.
+ *
+ * @example
+ * ```ts
+ * import { AuthApiError } from '@supabase/auth-js'
+ *
+ * throw new AuthApiError('Invalid credentials', 400, 'invalid_credentials')
+ * ```
+ */
+export declare class AuthApiError extends AuthError {
+ status: number;
+ constructor(message: string, status: number, code: string | undefined);
+}
+export declare function isAuthApiError(error: unknown): error is AuthApiError;
+/**
+ * Wraps non-standard errors so callers can inspect the root cause.
+ *
+ * @example
+ * ```ts
+ * import { AuthUnknownError } from '@supabase/auth-js'
+ *
+ * try {
+ * await someAuthCall()
+ * } catch (err) {
+ * throw new AuthUnknownError('Auth failed', err)
+ * }
+ * ```
+ */
+export declare class AuthUnknownError extends AuthError {
+ originalError: unknown;
+ constructor(message: string, originalError: unknown);
+}
+/**
+ * Flexible error class used to create named auth errors at runtime.
+ *
+ * @example
+ * ```ts
+ * import { CustomAuthError } from '@supabase/auth-js'
+ *
+ * throw new CustomAuthError('My custom auth error', 'MyAuthError', 400, 'custom_code')
+ * ```
+ */
+export declare class CustomAuthError extends AuthError {
+ name: string;
+ status: number;
+ constructor(message: string, name: string, status: number, code: string | undefined);
+}
+/**
+ * Error thrown when an operation requires a session but none is present.
+ *
+ * @example
+ * ```ts
+ * import { AuthSessionMissingError } from '@supabase/auth-js'
+ *
+ * throw new AuthSessionMissingError()
+ * ```
+ */
+export declare class AuthSessionMissingError extends CustomAuthError {
+ constructor();
+}
+export declare function isAuthSessionMissingError(error: any): error is AuthSessionMissingError;
+/**
+ * Error thrown when the token response is malformed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidTokenResponseError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidTokenResponseError()
+ * ```
+ */
+export declare class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor();
+}
+/**
+ * Error thrown when email/password credentials are invalid.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidCredentialsError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidCredentialsError('Email or password is incorrect')
+ * ```
+ */
+export declare class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message: string);
+}
+/**
+ * Error thrown when implicit grant redirects contain an error.
+ *
+ * @example
+ * ```ts
+ * import { AuthImplicitGrantRedirectError } from '@supabase/auth-js'
+ *
+ * throw new AuthImplicitGrantRedirectError('OAuth redirect failed', {
+ * error: 'access_denied',
+ * code: 'oauth_error',
+ * })
+ * ```
+ */
+export declare class AuthImplicitGrantRedirectError extends CustomAuthError {
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ constructor(message: string, details?: {
+ error: string;
+ code: string;
+ } | null);
+ toJSON(): {
+ name: string;
+ message: string;
+ status: number;
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ };
+}
+export declare function isAuthImplicitGrantRedirectError(error: any): error is AuthImplicitGrantRedirectError;
+/**
+ * Error thrown during PKCE code exchanges.
+ *
+ * @example
+ * ```ts
+ * import { AuthPKCEGrantCodeExchangeError } from '@supabase/auth-js'
+ *
+ * throw new AuthPKCEGrantCodeExchangeError('PKCE exchange failed')
+ * ```
+ */
+export declare class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ constructor(message: string, details?: {
+ error: string;
+ code: string;
+ } | null);
+ toJSON(): {
+ name: string;
+ message: string;
+ status: number;
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ };
+}
+/**
+ * Error thrown when a transient fetch issue occurs.
+ *
+ * @example
+ * ```ts
+ * import { AuthRetryableFetchError } from '@supabase/auth-js'
+ *
+ * throw new AuthRetryableFetchError('Service temporarily unavailable', 503)
+ * ```
+ */
+export declare class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message: string, status: number);
+}
+export declare function isAuthRetryableFetchError(error: unknown): error is AuthRetryableFetchError;
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+/**
+ * Error thrown when a supplied password is considered weak.
+ *
+ * @example
+ * ```ts
+ * import { AuthWeakPasswordError } from '@supabase/auth-js'
+ *
+ * throw new AuthWeakPasswordError('Password too short', 400, ['min_length'])
+ * ```
+ */
+export declare class AuthWeakPasswordError extends CustomAuthError {
+ /**
+ * Reasons why the password is deemed weak.
+ */
+ reasons: WeakPasswordReasons[];
+ constructor(message: string, status: number, reasons: WeakPasswordReasons[]);
+}
+export declare function isAuthWeakPasswordError(error: unknown): error is AuthWeakPasswordError;
+/**
+ * Error thrown when a JWT cannot be verified or parsed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidJwtError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidJwtError('Token signature is invalid')
+ * ```
+ */
+export declare class AuthInvalidJwtError extends CustomAuthError {
+ constructor(message: string);
+}
+//# sourceMappingURL=errors.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map
new file mode 100644
index 0000000..f6dd864
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,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G,KAAK,IAAI,qBAAqB,CAEtF;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,OAAO,EAAE,MAAM;CAG5B"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js
new file mode 100644
index 0000000..0489466
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js
@@ -0,0 +1,264 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.AuthInvalidJwtError = exports.AuthWeakPasswordError = exports.AuthRetryableFetchError = exports.AuthPKCEGrantCodeExchangeError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.AuthApiError = exports.AuthError = void 0;
+exports.isAuthError = isAuthError;
+exports.isAuthApiError = isAuthApiError;
+exports.isAuthSessionMissingError = isAuthSessionMissingError;
+exports.isAuthImplicitGrantRedirectError = isAuthImplicitGrantRedirectError;
+exports.isAuthRetryableFetchError = isAuthRetryableFetchError;
+exports.isAuthWeakPasswordError = isAuthWeakPasswordError;
+/**
+ * Base error thrown by Supabase Auth helpers.
+ *
+ * @example
+ * ```ts
+ * import { AuthError } from '@supabase/auth-js'
+ *
+ * throw new AuthError('Unexpected auth error', 500, 'unexpected')
+ * ```
+ */
+class AuthError extends Error {
+ constructor(message, status, code) {
+ super(message);
+ this.__isAuthError = true;
+ this.name = 'AuthError';
+ this.status = status;
+ this.code = code;
+ }
+}
+exports.AuthError = AuthError;
+function isAuthError(error) {
+ return typeof error === 'object' && error !== null && '__isAuthError' in error;
+}
+/**
+ * Error returned directly from the GoTrue REST API.
+ *
+ * @example
+ * ```ts
+ * import { AuthApiError } from '@supabase/auth-js'
+ *
+ * throw new AuthApiError('Invalid credentials', 400, 'invalid_credentials')
+ * ```
+ */
+class AuthApiError extends AuthError {
+ constructor(message, status, code) {
+ super(message, status, code);
+ this.name = 'AuthApiError';
+ this.status = status;
+ this.code = code;
+ }
+}
+exports.AuthApiError = AuthApiError;
+function isAuthApiError(error) {
+ return isAuthError(error) && error.name === 'AuthApiError';
+}
+/**
+ * Wraps non-standard errors so callers can inspect the root cause.
+ *
+ * @example
+ * ```ts
+ * import { AuthUnknownError } from '@supabase/auth-js'
+ *
+ * try {
+ * await someAuthCall()
+ * } catch (err) {
+ * throw new AuthUnknownError('Auth failed', err)
+ * }
+ * ```
+ */
+class AuthUnknownError extends AuthError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'AuthUnknownError';
+ this.originalError = originalError;
+ }
+}
+exports.AuthUnknownError = AuthUnknownError;
+/**
+ * Flexible error class used to create named auth errors at runtime.
+ *
+ * @example
+ * ```ts
+ * import { CustomAuthError } from '@supabase/auth-js'
+ *
+ * throw new CustomAuthError('My custom auth error', 'MyAuthError', 400, 'custom_code')
+ * ```
+ */
+class CustomAuthError extends AuthError {
+ constructor(message, name, status, code) {
+ super(message, status, code);
+ this.name = name;
+ this.status = status;
+ }
+}
+exports.CustomAuthError = CustomAuthError;
+/**
+ * Error thrown when an operation requires a session but none is present.
+ *
+ * @example
+ * ```ts
+ * import { AuthSessionMissingError } from '@supabase/auth-js'
+ *
+ * throw new AuthSessionMissingError()
+ * ```
+ */
+class AuthSessionMissingError extends CustomAuthError {
+ constructor() {
+ super('Auth session missing!', 'AuthSessionMissingError', 400, undefined);
+ }
+}
+exports.AuthSessionMissingError = AuthSessionMissingError;
+function isAuthSessionMissingError(error) {
+ return isAuthError(error) && error.name === 'AuthSessionMissingError';
+}
+/**
+ * Error thrown when the token response is malformed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidTokenResponseError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidTokenResponseError()
+ * ```
+ */
+class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor() {
+ super('Auth session or user missing', 'AuthInvalidTokenResponseError', 500, undefined);
+ }
+}
+exports.AuthInvalidTokenResponseError = AuthInvalidTokenResponseError;
+/**
+ * Error thrown when email/password credentials are invalid.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidCredentialsError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidCredentialsError('Email or password is incorrect')
+ * ```
+ */
+class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidCredentialsError', 400, undefined);
+ }
+}
+exports.AuthInvalidCredentialsError = AuthInvalidCredentialsError;
+/**
+ * Error thrown when implicit grant redirects contain an error.
+ *
+ * @example
+ * ```ts
+ * import { AuthImplicitGrantRedirectError } from '@supabase/auth-js'
+ *
+ * throw new AuthImplicitGrantRedirectError('OAuth redirect failed', {
+ * error: 'access_denied',
+ * code: 'oauth_error',
+ * })
+ * ```
+ */
+class AuthImplicitGrantRedirectError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthImplicitGrantRedirectError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+exports.AuthImplicitGrantRedirectError = AuthImplicitGrantRedirectError;
+function isAuthImplicitGrantRedirectError(error) {
+ return isAuthError(error) && error.name === 'AuthImplicitGrantRedirectError';
+}
+/**
+ * Error thrown during PKCE code exchanges.
+ *
+ * @example
+ * ```ts
+ * import { AuthPKCEGrantCodeExchangeError } from '@supabase/auth-js'
+ *
+ * throw new AuthPKCEGrantCodeExchangeError('PKCE exchange failed')
+ * ```
+ */
+class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthPKCEGrantCodeExchangeError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+exports.AuthPKCEGrantCodeExchangeError = AuthPKCEGrantCodeExchangeError;
+/**
+ * Error thrown when a transient fetch issue occurs.
+ *
+ * @example
+ * ```ts
+ * import { AuthRetryableFetchError } from '@supabase/auth-js'
+ *
+ * throw new AuthRetryableFetchError('Service temporarily unavailable', 503)
+ * ```
+ */
+class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message, status) {
+ super(message, 'AuthRetryableFetchError', status, undefined);
+ }
+}
+exports.AuthRetryableFetchError = AuthRetryableFetchError;
+function isAuthRetryableFetchError(error) {
+ return isAuthError(error) && error.name === 'AuthRetryableFetchError';
+}
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+/**
+ * Error thrown when a supplied password is considered weak.
+ *
+ * @example
+ * ```ts
+ * import { AuthWeakPasswordError } from '@supabase/auth-js'
+ *
+ * throw new AuthWeakPasswordError('Password too short', 400, ['min_length'])
+ * ```
+ */
+class AuthWeakPasswordError extends CustomAuthError {
+ constructor(message, status, reasons) {
+ super(message, 'AuthWeakPasswordError', status, 'weak_password');
+ this.reasons = reasons;
+ }
+}
+exports.AuthWeakPasswordError = AuthWeakPasswordError;
+function isAuthWeakPasswordError(error) {
+ return isAuthError(error) && error.name === 'AuthWeakPasswordError';
+}
+/**
+ * Error thrown when a JWT cannot be verified or parsed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidJwtError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidJwtError('Token signature is invalid')
+ * ```
+ */
+class AuthInvalidJwtError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidJwtError', 400, 'invalid_jwt');
+ }
+}
+exports.AuthInvalidJwtError = AuthInvalidJwtError;
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map
new file mode 100644
index 0000000..7d64e4f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map
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AK,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;QAEhE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CACF;AAXD,sDAWC;AAED,SAAgB,uBAAuB,CAAC,KAAc;IACpD,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,CAAA;AACrE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAa,mBAAoB,SAAQ,eAAe;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,EAAE,aAAa,CAAC,CAAA;IAC3D,CAAC;CACF;AAJD,kDAIC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts
new file mode 100644
index 0000000..4649c74
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts
@@ -0,0 +1,34 @@
+import { AuthResponse, AuthResponsePassword, SSOResponse, GenerateLinkResponse, UserResponse } from './types';
+export type Fetch = typeof fetch;
+export interface FetchOptions {
+ headers?: {
+ [key: string]: string;
+ };
+ noResolveJson?: boolean;
+}
+export interface FetchParameters {
+ signal?: AbortSignal;
+}
+export type RequestMethodType = 'GET' | 'POST' | 'PUT' | 'DELETE';
+export declare function handleError(error: unknown): Promise;
+interface GotrueRequestOptions extends FetchOptions {
+ jwt?: string;
+ redirectTo?: string;
+ body?: object;
+ query?: {
+ [key: string]: string;
+ };
+ /**
+ * Function that transforms api response from gotrue into a desirable / standardised format
+ */
+ xform?: (data: any) => any;
+}
+export declare function _request(fetcher: Fetch, method: RequestMethodType, url: string, options?: GotrueRequestOptions): Promise;
+export declare function _sessionResponse(data: any): AuthResponse;
+export declare function _sessionResponsePassword(data: any): AuthResponsePassword;
+export declare function _userResponse(data: any): UserResponse;
+export declare function _ssoResponse(data: any): SSOResponse;
+export declare function _generateLinkResponse(data: any): GenerateLinkResponse;
+export declare function _noResolveJsonResponse(data: any): Response;
+export {};
+//# sourceMappingURL=fetch.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map
new file mode 100644
index 0000000..9f607b0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/lib/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,WAAW,EAEX,oBAAoB,EAEpB,YAAY,EACb,MAAM,SAAS,CAAA;AAShB,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAA;AAEhC,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IACD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;AAOjE,wBAAsB,WAAW,CAAC,KAAK,EAAE,OAAO,iBA+D/C;AAmBD,UAAU,oBAAqB,SAAQ,YAAY;IACjD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;CAC3B;AAED,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,oBAAoB,gBAgC/B;AAwCD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAYxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAiBxE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAGrD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW,CAEnD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAmBrE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,QAAQ,CAE1D"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js
new file mode 100644
index 0000000..a7dd9d8
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js
@@ -0,0 +1,184 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.handleError = handleError;
+exports._request = _request;
+exports._sessionResponse = _sessionResponse;
+exports._sessionResponsePassword = _sessionResponsePassword;
+exports._userResponse = _userResponse;
+exports._ssoResponse = _ssoResponse;
+exports._generateLinkResponse = _generateLinkResponse;
+exports._noResolveJsonResponse = _noResolveJsonResponse;
+const tslib_1 = require("tslib");
+const constants_1 = require("./constants");
+const helpers_1 = require("./helpers");
+const errors_1 = require("./errors");
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const NETWORK_ERROR_CODES = [502, 503, 504];
+async function handleError(error) {
+ var _a;
+ if (!(0, helpers_1.looksLikeFetchResponse)(error)) {
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), 0);
+ }
+ if (NETWORK_ERROR_CODES.includes(error.status)) {
+ // status in 500...599 range - server had an error, request might be retryed.
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), error.status);
+ }
+ let data;
+ try {
+ data = await error.json();
+ }
+ catch (e) {
+ throw new errors_1.AuthUnknownError(_getErrorMessage(e), e);
+ }
+ let errorCode = undefined;
+ const responseAPIVersion = (0, helpers_1.parseResponseAPIVersion)(error);
+ if (responseAPIVersion &&
+ responseAPIVersion.getTime() >= constants_1.API_VERSIONS['2024-01-01'].timestamp &&
+ typeof data === 'object' &&
+ data &&
+ typeof data.code === 'string') {
+ errorCode = data.code;
+ }
+ else if (typeof data === 'object' && data && typeof data.error_code === 'string') {
+ errorCode = data.error_code;
+ }
+ if (!errorCode) {
+ // Legacy support for weak password errors, when there were no error codes
+ if (typeof data === 'object' &&
+ data &&
+ typeof data.weak_password === 'object' &&
+ data.weak_password &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, data.weak_password.reasons);
+ }
+ }
+ else if (errorCode === 'weak_password') {
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, ((_a = data.weak_password) === null || _a === void 0 ? void 0 : _a.reasons) || []);
+ }
+ else if (errorCode === 'session_not_found') {
+ // The `session_id` inside the JWT does not correspond to a row in the
+ // `sessions` table. This usually means the user has signed out, has been
+ // deleted, or their session has somehow been terminated.
+ throw new errors_1.AuthSessionMissingError();
+ }
+ throw new errors_1.AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
+}
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers);
+ params.body = JSON.stringify(body);
+ return Object.assign(Object.assign({}, params), parameters);
+};
+async function _request(fetcher, method, url, options) {
+ var _a;
+ const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers);
+ if (!headers[constants_1.API_VERSION_HEADER_NAME]) {
+ headers[constants_1.API_VERSION_HEADER_NAME] = constants_1.API_VERSIONS['2024-01-01'].name;
+ }
+ if (options === null || options === void 0 ? void 0 : options.jwt) {
+ headers['Authorization'] = `Bearer ${options.jwt}`;
+ }
+ const qs = (_a = options === null || options === void 0 ? void 0 : options.query) !== null && _a !== void 0 ? _a : {};
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ qs['redirect_to'] = options.redirectTo;
+ }
+ const queryString = Object.keys(qs).length ? '?' + new URLSearchParams(qs).toString() : '';
+ const data = await _handleRequest(fetcher, method, url + queryString, {
+ headers,
+ noResolveJson: options === null || options === void 0 ? void 0 : options.noResolveJson,
+ }, {}, options === null || options === void 0 ? void 0 : options.body);
+ return (options === null || options === void 0 ? void 0 : options.xform) ? options === null || options === void 0 ? void 0 : options.xform(data) : { data: Object.assign({}, data), error: null };
+}
+async function _handleRequest(fetcher, method, url, options, parameters, body) {
+ const requestParams = _getRequestParams(method, options, parameters, body);
+ let result;
+ try {
+ result = await fetcher(url, Object.assign({}, requestParams));
+ }
+ catch (e) {
+ console.error(e);
+ // fetch failed, likely due to a network or CORS error
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(e), 0);
+ }
+ if (!result.ok) {
+ await handleError(result);
+ }
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson) {
+ return result;
+ }
+ try {
+ return await result.json();
+ }
+ catch (e) {
+ await handleError(e);
+ }
+}
+function _sessionResponse(data) {
+ var _a;
+ let session = null;
+ if (hasSession(data)) {
+ session = Object.assign({}, data);
+ if (!data.expires_at) {
+ session.expires_at = (0, helpers_1.expiresAt)(data.expires_in);
+ }
+ }
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { session, user }, error: null };
+}
+function _sessionResponsePassword(data) {
+ const response = _sessionResponse(data);
+ if (!response.error &&
+ data.weak_password &&
+ typeof data.weak_password === 'object' &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.message &&
+ typeof data.weak_password.message === 'string' &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ response.data.weak_password = data.weak_password;
+ }
+ return response;
+}
+function _userResponse(data) {
+ var _a;
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { user }, error: null };
+}
+function _ssoResponse(data) {
+ return { data, error: null };
+}
+function _generateLinkResponse(data) {
+ const { action_link, email_otp, hashed_token, redirect_to, verification_type } = data, rest = tslib_1.__rest(data, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]);
+ const properties = {
+ action_link,
+ email_otp,
+ hashed_token,
+ redirect_to,
+ verification_type,
+ };
+ const user = Object.assign({}, rest);
+ return {
+ data: {
+ properties,
+ user,
+ },
+ error: null,
+ };
+}
+function _noResolveJsonResponse(data) {
+ return data;
+}
+/**
+ * hasSession checks if the response object contains a valid session
+ * @param data A response object
+ * @returns true if a session is in the response
+ */
+function hasSession(data) {
+ return data.access_token && data.refresh_token && data.expires_in;
+}
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map
new file mode 100644
index 0000000..2123852
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../src/lib/fetch.ts"],"names":[],"mappings":";;AAuCA,kCA+DC;AA8BD,4BAoCC;AAwCD,4CAYC;AAED,4DAiBC;AAED,sCAGC;AAED,oCAEC;AAED,sDAmBC;AAED,wDAEC;;AAjRD,2CAAmE;AACnE,uCAAsF;AAUtF,qCAMiB;AAiBjB,MAAM,gBAAgB,GAAG,CAAC,GAAQ,EAAU,EAA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EAAE,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,IAAI,CAAC,EAC3F,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAA;IAClD,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAgB,aAAa,CAAC,IAAS;;IACrC,MAAM,IAAI,GAAS,MAAA,IAAI,CAAC,IAAI,mCAAK,IAAa,CAAA;IAC9C,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AACxC,CAAC;AAED,SAAgB,YAAY,CAAC,IAAS;IACpC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AAC9B,CAAC;AAED,SAAgB,qBAAqB,CAAC,IAAS;IAC7C,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,KAAc,IAAI,EAAb,IAAI,kBAAK,IAAI,EAAxF,gFAAiF,CAAO,CAAA;IAE9F,MAAM,UAAU,GAA2B;QACzC,WAAW;QACX,SAAS;QACT,YAAY;QACZ,WAAW;QACX,iBAAiB;KAClB,CAAA;IAED,MAAM,IAAI,qBAAc,IAAI,CAAE,CAAA;IAC9B,OAAO;QACL,IAAI,EAAE;YACJ,UAAU;YACV,IAAI;SACL;QACD,KAAK,EAAE,IAAI;KACZ,CAAA;AACH,CAAC;AAED,SAAgB,sBAAsB,CAAC,IAAS;IAC9C,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAA;AACnE,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts
new file mode 100644
index 0000000..43fdc86
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts
@@ -0,0 +1,91 @@
+import { JwtHeader, JwtPayload, SupportedStorage, User } from './types';
+import { Uint8Array_ } from './webauthn.dom';
+export declare function expiresAt(expiresIn: number): number;
+/**
+ * Generates a unique identifier for internal callback subscriptions.
+ *
+ * This function uses JavaScript Symbols to create guaranteed-unique identifiers
+ * for auth state change callbacks. Symbols are ideal for this use case because:
+ * - They are guaranteed unique by the JavaScript runtime
+ * - They work in all environments (browser, SSR, Node.js)
+ * - They avoid issues with Next.js 16 deterministic rendering requirements
+ * - They are perfect for internal, non-serializable identifiers
+ *
+ * Note: This function is only used for internal subscription management,
+ * not for security-critical operations like session tokens.
+ */
+export declare function generateCallbackId(): symbol;
+export declare const isBrowser: () => boolean;
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+export declare const supportsLocalStorage: () => boolean;
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+export declare function parseParametersFromURL(href: string): {
+ [parameter: string]: string;
+};
+type Fetch = typeof fetch;
+export declare const resolveFetch: (customFetch?: Fetch) => Fetch;
+export declare const looksLikeFetchResponse: (maybeResponse: unknown) => maybeResponse is Response;
+export declare const setItemAsync: (storage: SupportedStorage, key: string, data: any) => Promise;
+export declare const getItemAsync: (storage: SupportedStorage, key: string) => Promise;
+export declare const removeItemAsync: (storage: SupportedStorage, key: string) => Promise;
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+export declare class Deferred {
+ static promiseConstructor: PromiseConstructor;
+ readonly promise: PromiseLike;
+ readonly resolve: (value?: T | PromiseLike) => void;
+ readonly reject: (reason?: any) => any;
+ constructor();
+}
+export declare function decodeJWT(token: string): {
+ header: JwtHeader;
+ payload: JwtPayload;
+ signature: Uint8Array_;
+ raw: {
+ header: string;
+ payload: string;
+ };
+};
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+export declare function sleep(time: number): Promise;
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+export declare function retryable(fn: (attempt: number) => Promise, isRetryable: (attempt: number, error: any | null, result?: T) => boolean): Promise;
+export declare function generatePKCEVerifier(): string;
+export declare function generatePKCEChallenge(verifier: string): Promise;
+export declare function getCodeChallengeAndMethod(storage: SupportedStorage, storageKey: string, isPasswordRecovery?: boolean): Promise;
+export declare function parseResponseAPIVersion(response: Response): Date | null;
+export declare function validateExp(exp: number): void;
+export declare function getAlgorithm(alg: 'HS256' | 'RS256' | 'ES256'): RsaHashedImportParams | EcKeyImportParams;
+export declare function validateUUID(str: string): void;
+export declare function userNotAvailableProxy(): User;
+/**
+ * Creates a proxy around a user object that warns when properties are accessed on the server.
+ * This is used to alert developers that using user data from getSession() on the server is insecure.
+ *
+ * @param user The actual user object to wrap
+ * @param suppressWarningRef An object with a 'value' property that controls warning suppression
+ * @returns A proxied user object that warns on property access
+ */
+export declare function insecureUserWarningProxy(user: User, suppressWarningRef: {
+ value: boolean;
+}): User;
+/**
+ * Deep clones a JSON-serializable object using JSON.parse(JSON.stringify(obj)).
+ * Note: Only works for JSON-safe data.
+ */
+export declare function deepClone(obj: T): T;
+export {};
+//# sourceMappingURL=helpers.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map
new file mode 100644
index 0000000..b87fd00
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AACvE,OA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GAAG,CAAC,CAEtC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js
new file mode 100644
index 0000000..0a8637f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js
@@ -0,0 +1,395 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Deferred = exports.removeItemAsync = exports.getItemAsync = exports.setItemAsync = exports.looksLikeFetchResponse = exports.resolveFetch = exports.supportsLocalStorage = exports.isBrowser = void 0;
+exports.expiresAt = expiresAt;
+exports.generateCallbackId = generateCallbackId;
+exports.parseParametersFromURL = parseParametersFromURL;
+exports.decodeJWT = decodeJWT;
+exports.sleep = sleep;
+exports.retryable = retryable;
+exports.generatePKCEVerifier = generatePKCEVerifier;
+exports.generatePKCEChallenge = generatePKCEChallenge;
+exports.getCodeChallengeAndMethod = getCodeChallengeAndMethod;
+exports.parseResponseAPIVersion = parseResponseAPIVersion;
+exports.validateExp = validateExp;
+exports.getAlgorithm = getAlgorithm;
+exports.validateUUID = validateUUID;
+exports.userNotAvailableProxy = userNotAvailableProxy;
+exports.insecureUserWarningProxy = insecureUserWarningProxy;
+exports.deepClone = deepClone;
+const constants_1 = require("./constants");
+const errors_1 = require("./errors");
+const base64url_1 = require("./base64url");
+function expiresAt(expiresIn) {
+ const timeNow = Math.round(Date.now() / 1000);
+ return timeNow + expiresIn;
+}
+/**
+ * Generates a unique identifier for internal callback subscriptions.
+ *
+ * This function uses JavaScript Symbols to create guaranteed-unique identifiers
+ * for auth state change callbacks. Symbols are ideal for this use case because:
+ * - They are guaranteed unique by the JavaScript runtime
+ * - They work in all environments (browser, SSR, Node.js)
+ * - They avoid issues with Next.js 16 deterministic rendering requirements
+ * - They are perfect for internal, non-serializable identifiers
+ *
+ * Note: This function is only used for internal subscription management,
+ * not for security-critical operations like session tokens.
+ */
+function generateCallbackId() {
+ return Symbol('auth-callback');
+}
+const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
+exports.isBrowser = isBrowser;
+const localStorageWriteTests = {
+ tested: false,
+ writable: false,
+};
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+const supportsLocalStorage = () => {
+ if (!(0, exports.isBrowser)()) {
+ return false;
+ }
+ try {
+ if (typeof globalThis.localStorage !== 'object') {
+ return false;
+ }
+ }
+ catch (e) {
+ // DOM exception when accessing `localStorage`
+ return false;
+ }
+ if (localStorageWriteTests.tested) {
+ return localStorageWriteTests.writable;
+ }
+ const randomKey = `lswt-${Math.random()}${Math.random()}`;
+ try {
+ globalThis.localStorage.setItem(randomKey, randomKey);
+ globalThis.localStorage.removeItem(randomKey);
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = true;
+ }
+ catch (e) {
+ // localStorage can't be written to
+ // https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = false;
+ }
+ return localStorageWriteTests.writable;
+};
+exports.supportsLocalStorage = supportsLocalStorage;
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+function parseParametersFromURL(href) {
+ const result = {};
+ const url = new URL(href);
+ if (url.hash && url.hash[0] === '#') {
+ try {
+ const hashSearchParams = new URLSearchParams(url.hash.substring(1));
+ hashSearchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ }
+ catch (e) {
+ // hash is not a query string
+ }
+ }
+ // search parameters take precedence over hash parameters
+ url.searchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ return result;
+}
+const resolveFetch = (customFetch) => {
+ if (customFetch) {
+ return (...args) => customFetch(...args);
+ }
+ return (...args) => fetch(...args);
+};
+exports.resolveFetch = resolveFetch;
+const looksLikeFetchResponse = (maybeResponse) => {
+ return (typeof maybeResponse === 'object' &&
+ maybeResponse !== null &&
+ 'status' in maybeResponse &&
+ 'ok' in maybeResponse &&
+ 'json' in maybeResponse &&
+ typeof maybeResponse.json === 'function');
+};
+exports.looksLikeFetchResponse = looksLikeFetchResponse;
+// Storage helpers
+const setItemAsync = async (storage, key, data) => {
+ await storage.setItem(key, JSON.stringify(data));
+};
+exports.setItemAsync = setItemAsync;
+const getItemAsync = async (storage, key) => {
+ const value = await storage.getItem(key);
+ if (!value) {
+ return null;
+ }
+ try {
+ return JSON.parse(value);
+ }
+ catch (_a) {
+ return value;
+ }
+};
+exports.getItemAsync = getItemAsync;
+const removeItemAsync = async (storage, key) => {
+ await storage.removeItem(key);
+};
+exports.removeItemAsync = removeItemAsync;
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+class Deferred {
+ constructor() {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.promise = new Deferred.promiseConstructor((res, rej) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.resolve = res;
+ this.reject = rej;
+ });
+ }
+}
+exports.Deferred = Deferred;
+Deferred.promiseConstructor = Promise;
+function decodeJWT(token) {
+ const parts = token.split('.');
+ if (parts.length !== 3) {
+ throw new errors_1.AuthInvalidJwtError('Invalid JWT structure');
+ }
+ // Regex checks for base64url format
+ for (let i = 0; i < parts.length; i++) {
+ if (!constants_1.BASE64URL_REGEX.test(parts[i])) {
+ throw new errors_1.AuthInvalidJwtError('JWT not in base64url format');
+ }
+ }
+ const data = {
+ // using base64url lib
+ header: JSON.parse((0, base64url_1.stringFromBase64URL)(parts[0])),
+ payload: JSON.parse((0, base64url_1.stringFromBase64URL)(parts[1])),
+ signature: (0, base64url_1.base64UrlToUint8Array)(parts[2]),
+ raw: {
+ header: parts[0],
+ payload: parts[1],
+ },
+ };
+ return data;
+}
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+async function sleep(time) {
+ return await new Promise((accept) => {
+ setTimeout(() => accept(null), time);
+ });
+}
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+function retryable(fn, isRetryable) {
+ const promise = new Promise((accept, reject) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ (async () => {
+ for (let attempt = 0; attempt < Infinity; attempt++) {
+ try {
+ const result = await fn(attempt);
+ if (!isRetryable(attempt, null, result)) {
+ accept(result);
+ return;
+ }
+ }
+ catch (e) {
+ if (!isRetryable(attempt, e)) {
+ reject(e);
+ return;
+ }
+ }
+ }
+ })();
+ });
+ return promise;
+}
+function dec2hex(dec) {
+ return ('0' + dec.toString(16)).substr(-2);
+}
+// Functions below taken from: https://stackoverflow.com/questions/63309409/creating-a-code-verifier-and-challenge-for-pkce-auth-on-spotify-api-in-reactjs
+function generatePKCEVerifier() {
+ const verifierLength = 56;
+ const array = new Uint32Array(verifierLength);
+ if (typeof crypto === 'undefined') {
+ const charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';
+ const charSetLen = charSet.length;
+ let verifier = '';
+ for (let i = 0; i < verifierLength; i++) {
+ verifier += charSet.charAt(Math.floor(Math.random() * charSetLen));
+ }
+ return verifier;
+ }
+ crypto.getRandomValues(array);
+ return Array.from(array, dec2hex).join('');
+}
+async function sha256(randomString) {
+ const encoder = new TextEncoder();
+ const encodedData = encoder.encode(randomString);
+ const hash = await crypto.subtle.digest('SHA-256', encodedData);
+ const bytes = new Uint8Array(hash);
+ return Array.from(bytes)
+ .map((c) => String.fromCharCode(c))
+ .join('');
+}
+async function generatePKCEChallenge(verifier) {
+ const hasCryptoSupport = typeof crypto !== 'undefined' &&
+ typeof crypto.subtle !== 'undefined' &&
+ typeof TextEncoder !== 'undefined';
+ if (!hasCryptoSupport) {
+ console.warn('WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.');
+ return verifier;
+ }
+ const hashed = await sha256(verifier);
+ return btoa(hashed).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
+}
+async function getCodeChallengeAndMethod(storage, storageKey, isPasswordRecovery = false) {
+ const codeVerifier = generatePKCEVerifier();
+ let storedCodeVerifier = codeVerifier;
+ if (isPasswordRecovery) {
+ storedCodeVerifier += '/PASSWORD_RECOVERY';
+ }
+ await (0, exports.setItemAsync)(storage, `${storageKey}-code-verifier`, storedCodeVerifier);
+ const codeChallenge = await generatePKCEChallenge(codeVerifier);
+ const codeChallengeMethod = codeVerifier === codeChallenge ? 'plain' : 's256';
+ return [codeChallenge, codeChallengeMethod];
+}
+/** Parses the API version which is 2YYY-MM-DD. */
+const API_VERSION_REGEX = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
+function parseResponseAPIVersion(response) {
+ const apiVersion = response.headers.get(constants_1.API_VERSION_HEADER_NAME);
+ if (!apiVersion) {
+ return null;
+ }
+ if (!apiVersion.match(API_VERSION_REGEX)) {
+ return null;
+ }
+ try {
+ const date = new Date(`${apiVersion}T00:00:00.0Z`);
+ return date;
+ }
+ catch (e) {
+ return null;
+ }
+}
+function validateExp(exp) {
+ if (!exp) {
+ throw new Error('Missing exp claim');
+ }
+ const timeNow = Math.floor(Date.now() / 1000);
+ if (exp <= timeNow) {
+ throw new Error('JWT has expired');
+ }
+}
+function getAlgorithm(alg) {
+ switch (alg) {
+ case 'RS256':
+ return {
+ name: 'RSASSA-PKCS1-v1_5',
+ hash: { name: 'SHA-256' },
+ };
+ case 'ES256':
+ return {
+ name: 'ECDSA',
+ namedCurve: 'P-256',
+ hash: { name: 'SHA-256' },
+ };
+ default:
+ throw new Error('Invalid alg claim');
+ }
+}
+const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
+function validateUUID(str) {
+ if (!UUID_REGEX.test(str)) {
+ throw new Error('@supabase/auth-js: Expected parameter to be UUID but is not');
+ }
+}
+function userNotAvailableProxy() {
+ const proxyTarget = {};
+ return new Proxy(proxyTarget, {
+ get: (target, prop) => {
+ if (prop === '__isUserNotAvailableProxy') {
+ return true;
+ }
+ // Preventative check for common problematic symbols during cloning/inspection
+ // These symbols might be accessed by structuredClone or other internal mechanisms.
+ if (typeof prop === 'symbol') {
+ const sProp = prop.toString();
+ if (sProp === 'Symbol(Symbol.toPrimitive)' ||
+ sProp === 'Symbol(Symbol.toStringTag)' ||
+ sProp === 'Symbol(util.inspect.custom)') {
+ // Node.js util.inspect
+ return undefined;
+ }
+ }
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${prop}" property of the session object is not supported. Please use getUser() instead.`);
+ },
+ set: (_target, prop) => {
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${prop}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`);
+ },
+ deleteProperty: (_target, prop) => {
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${prop}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`);
+ },
+ });
+}
+/**
+ * Creates a proxy around a user object that warns when properties are accessed on the server.
+ * This is used to alert developers that using user data from getSession() on the server is insecure.
+ *
+ * @param user The actual user object to wrap
+ * @param suppressWarningRef An object with a 'value' property that controls warning suppression
+ * @returns A proxied user object that warns on property access
+ */
+function insecureUserWarningProxy(user, suppressWarningRef) {
+ return new Proxy(user, {
+ get: (target, prop, receiver) => {
+ // Allow internal checks without warning
+ if (prop === '__isInsecureUserWarningProxy') {
+ return true;
+ }
+ // Preventative check for common problematic symbols during cloning/inspection
+ // These symbols might be accessed by structuredClone or other internal mechanisms
+ if (typeof prop === 'symbol') {
+ const sProp = prop.toString();
+ if (sProp === 'Symbol(Symbol.toPrimitive)' ||
+ sProp === 'Symbol(Symbol.toStringTag)' ||
+ sProp === 'Symbol(util.inspect.custom)' ||
+ sProp === 'Symbol(nodejs.util.inspect.custom)') {
+ // Return the actual value for these symbols to allow proper inspection
+ return Reflect.get(target, prop, receiver);
+ }
+ }
+ // Emit warning on first property access
+ if (!suppressWarningRef.value && typeof prop === 'string') {
+ console.warn('Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.');
+ suppressWarningRef.value = true;
+ }
+ return Reflect.get(target, prop, receiver);
+ },
+ });
+}
+/**
+ * Deep clones a JSON-serializable object using JSON.parse(JSON.stringify(obj)).
+ * Note: Only works for JSON-safe data.
+ */
+function deepClone(obj) {
+ return JSON.parse(JSON.stringify(obj));
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map
new file mode 100644
index 0000000..1528183
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/lib/helpers.ts"],"names":[],"mappings":";;;AAMA,8BAGC;AAeD,gDAEC;AAoDD,wDAsBC;AA0ED,8BAgCC;AAKD,sBAIC;AAOD,8BA0BC;AAOD,oDAcC;AAaD,sDAcC;AAED,8DAcC;AAKD,0DAiBC;AAED,kCAQC;AAED,oCAkBC;AAID,oCAIC;AAED,sDAoCC;AAUD,4DAkCC;AAMD,8BAEC;AA9cD,2CAAsE;AACtE,qCAA8C;AAC9C,2CAAwE;AAIxE,SAAgB,SAAS,CAAC,SAAiB;IACzC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IAC7C,OAAO,OAAO,GAAG,SAAS,CAAA;AAC5B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,kBAAkB;IAChC,OAAO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KAAK,4BAA4B;oBACtC,KAAK,KAAK,4BAA4B;oBACtC,KAAK,KAAK,6BAA6B;oBACvC,KAAK,KAAK,oCAAoC,EAC9C,CAAC;oBACD,uEAAuE;oBACvE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;gBAC5C,CAAC;YACH,CAAC;YAED,wCAAwC;YACxC,IAAI,CAAC,kBAAkB,CAAC,KAAK,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC1D,OAAO,CAAC,IAAI,CACV,iWAAiW,CAClW,CAAA;gBACD,kBAAkB,CAAC,KAAK,GAAG,IAAI,CAAA;YACjC,CAAC;YAED,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC5C,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAI,GAAM;IACjC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;AACxC,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts
new file mode 100644
index 0000000..05dabc3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts
@@ -0,0 +1,9 @@
+import { SupportedStorage } from './types';
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+export declare function memoryLocalStorageAdapter(store?: {
+ [key: string]: string;
+}): SupportedStorage;
+//# sourceMappingURL=local-storage.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map
new file mode 100644
index 0000000..7dc636e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../../src/lib/local-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,GAAG,gBAAgB,CAcjG"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
new file mode 100644
index 0000000..bd9e06a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.memoryLocalStorageAdapter = memoryLocalStorageAdapter;
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+function memoryLocalStorageAdapter(store = {}) {
+ return {
+ getItem: (key) => {
+ return store[key] || null;
+ },
+ setItem: (key, value) => {
+ store[key] = value;
+ },
+ removeItem: (key) => {
+ delete store[key];
+ },
+ };
+}
+//# sourceMappingURL=local-storage.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map
new file mode 100644
index 0000000..c2eb762
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"local-storage.js","sourceRoot":"","sources":["../../../src/lib/local-storage.ts"],"names":[],"mappings":";;AAMA,8DAcC;AAlBD;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,QAAmC,EAAE;IAC7E,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACf,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;QAC3B,CAAC;QAED,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACtB,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACpB,CAAC;QAED,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE;YAClB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC;KACF,CAAA;AACH,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts
new file mode 100644
index 0000000..41c5032
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts
@@ -0,0 +1,107 @@
+/**
+ * @experimental
+ */
+export declare const internals: {
+ /**
+ * @experimental
+ */
+ debug: boolean;
+};
+/**
+ * An error thrown when a lock cannot be acquired after some amount of time.
+ *
+ * Use the {@link #isAcquireTimeout} property instead of checking with `instanceof`.
+ *
+ * @example
+ * ```ts
+ * import { LockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * class CustomLockError extends LockAcquireTimeoutError {
+ * constructor() {
+ * super('Lock timed out')
+ * }
+ * }
+ * ```
+ */
+export declare abstract class LockAcquireTimeoutError extends Error {
+ readonly isAcquireTimeout = true;
+ constructor(message: string);
+}
+/**
+ * Error thrown when the browser Navigator Lock API fails to acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { NavigatorLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new NavigatorLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+export declare class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+/**
+ * Error thrown when the process-level lock helper cannot acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { ProcessLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new ProcessLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+export declare class ProcessLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+/**
+ * Implements a global exclusive lock using the Navigator LockManager API. It
+ * is available on all browsers released after 2022-03-15 with Safari being the
+ * last one to release support. If the API is not available, this function will
+ * throw. Make sure you check availablility before configuring {@link
+ * GoTrueClient}.
+ *
+ * You can turn on debugging by setting the `supabase.gotrue-js.locks.debug`
+ * local storage item to `true`.
+ *
+ * Internals:
+ *
+ * Since the LockManager API does not preserve stack traces for the async
+ * function passed in the `request` method, a trick is used where acquiring the
+ * lock releases a previously started promise to run the operation in the `fn`
+ * function. The lock waits for that promise to finish (with or without error),
+ * while the function will finally wait for the result anyway.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ * @example
+ * ```ts
+ * await navigatorLock('sync-user', 1000, async () => {
+ * await refreshSession()
+ * })
+ * ```
+ */
+export declare function navigatorLock(name: string, acquireTimeout: number, fn: () => Promise): Promise;
+/**
+ * Implements a global exclusive lock that works only in the current process.
+ * Useful for environments like React Native or other non-browser
+ * single-process (i.e. no concept of "tabs") environments.
+ *
+ * Use {@link #navigatorLock} in browser environments.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ * @example
+ * ```ts
+ * await processLock('migrate', 5000, async () => {
+ * await runMigration()
+ * })
+ * ```
+ */
+export declare function processLock(name: string, acquireTimeout: number, fn: () => Promise): Promise;
+//# sourceMappingURL=locks.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map
new file mode 100644
index 0000000..c03b579
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"locks.d.ts","sourceRoot":"","sources":["../../../src/lib/locks.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB;;OAEG;;CAOJ,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,uBAAwB,SAAQ,KAAK;IACzD,SAAgB,gBAAgB,QAAO;gBAE3B,OAAO,EAAE,MAAM;CAG5B;AAED;;;;;;;;;GASG;AACH,qBAAa,gCAAiC,SAAQ,uBAAuB;CAAG;AAChF;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,SAAQ,uBAAuB;CAAG;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,EACtB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CA0FZ;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,MAAM,EACtB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAkDZ"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js
new file mode 100644
index 0000000..d1df03e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js
@@ -0,0 +1,230 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ProcessLockAcquireTimeoutError = exports.NavigatorLockAcquireTimeoutError = exports.LockAcquireTimeoutError = exports.internals = void 0;
+exports.navigatorLock = navigatorLock;
+exports.processLock = processLock;
+const helpers_1 = require("./helpers");
+/**
+ * @experimental
+ */
+exports.internals = {
+ /**
+ * @experimental
+ */
+ debug: !!(globalThis &&
+ (0, helpers_1.supportsLocalStorage)() &&
+ globalThis.localStorage &&
+ globalThis.localStorage.getItem('supabase.gotrue-js.locks.debug') === 'true'),
+};
+/**
+ * An error thrown when a lock cannot be acquired after some amount of time.
+ *
+ * Use the {@link #isAcquireTimeout} property instead of checking with `instanceof`.
+ *
+ * @example
+ * ```ts
+ * import { LockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * class CustomLockError extends LockAcquireTimeoutError {
+ * constructor() {
+ * super('Lock timed out')
+ * }
+ * }
+ * ```
+ */
+class LockAcquireTimeoutError extends Error {
+ constructor(message) {
+ super(message);
+ this.isAcquireTimeout = true;
+ }
+}
+exports.LockAcquireTimeoutError = LockAcquireTimeoutError;
+/**
+ * Error thrown when the browser Navigator Lock API fails to acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { NavigatorLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new NavigatorLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+exports.NavigatorLockAcquireTimeoutError = NavigatorLockAcquireTimeoutError;
+/**
+ * Error thrown when the process-level lock helper cannot acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { ProcessLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new ProcessLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+class ProcessLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+exports.ProcessLockAcquireTimeoutError = ProcessLockAcquireTimeoutError;
+/**
+ * Implements a global exclusive lock using the Navigator LockManager API. It
+ * is available on all browsers released after 2022-03-15 with Safari being the
+ * last one to release support. If the API is not available, this function will
+ * throw. Make sure you check availablility before configuring {@link
+ * GoTrueClient}.
+ *
+ * You can turn on debugging by setting the `supabase.gotrue-js.locks.debug`
+ * local storage item to `true`.
+ *
+ * Internals:
+ *
+ * Since the LockManager API does not preserve stack traces for the async
+ * function passed in the `request` method, a trick is used where acquiring the
+ * lock releases a previously started promise to run the operation in the `fn`
+ * function. The lock waits for that promise to finish (with or without error),
+ * while the function will finally wait for the result anyway.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ * @example
+ * ```ts
+ * await navigatorLock('sync-user', 1000, async () => {
+ * await refreshSession()
+ * })
+ * ```
+ */
+async function navigatorLock(name, acquireTimeout, fn) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquire lock', name, acquireTimeout);
+ }
+ const abortController = new globalThis.AbortController();
+ if (acquireTimeout > 0) {
+ setTimeout(() => {
+ abortController.abort();
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock acquire timed out', name);
+ }
+ }, acquireTimeout);
+ }
+ // MDN article: https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request
+ // Wrapping navigator.locks.request() with a plain Promise is done as some
+ // libraries like zone.js patch the Promise object to track the execution
+ // context. However, it appears that most browsers use an internal promise
+ // implementation when using the navigator.locks.request() API causing them
+ // to lose context and emit confusing log messages or break certain features.
+ // This wrapping is believed to help zone.js track the execution context
+ // better.
+ return await Promise.resolve().then(() => globalThis.navigator.locks.request(name, acquireTimeout === 0
+ ? {
+ mode: 'exclusive',
+ ifAvailable: true,
+ }
+ : {
+ mode: 'exclusive',
+ signal: abortController.signal,
+ }, async (lock) => {
+ if (lock) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquired', name, lock.name);
+ }
+ try {
+ return await fn();
+ }
+ finally {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: released', name, lock.name);
+ }
+ }
+ }
+ else {
+ if (acquireTimeout === 0) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: not immediately available', name);
+ }
+ throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`);
+ }
+ else {
+ if (exports.internals.debug) {
+ try {
+ const result = await globalThis.navigator.locks.query();
+ console.log('@supabase/gotrue-js: Navigator LockManager state', JSON.stringify(result, null, ' '));
+ }
+ catch (e) {
+ console.warn('@supabase/gotrue-js: Error when querying Navigator LockManager state', e);
+ }
+ }
+ // Browser is not following the Navigator LockManager spec, it
+ // returned a null lock when we didn't use ifAvailable. So we can
+ // pretend the lock is acquired in the name of backward compatibility
+ // and user experience and just run the function.
+ console.warn('@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request');
+ return await fn();
+ }
+ }
+ }));
+}
+const PROCESS_LOCKS = {};
+/**
+ * Implements a global exclusive lock that works only in the current process.
+ * Useful for environments like React Native or other non-browser
+ * single-process (i.e. no concept of "tabs") environments.
+ *
+ * Use {@link #navigatorLock} in browser environments.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ * @example
+ * ```ts
+ * await processLock('migrate', 5000, async () => {
+ * await runMigration()
+ * })
+ * ```
+ */
+async function processLock(name, acquireTimeout, fn) {
+ var _a;
+ const previousOperation = (_a = PROCESS_LOCKS[name]) !== null && _a !== void 0 ? _a : Promise.resolve();
+ const currentOperation = Promise.race([
+ previousOperation.catch(() => {
+ // ignore error of previous operation that we're waiting to finish
+ return null;
+ }),
+ acquireTimeout >= 0
+ ? new Promise((_, reject) => {
+ setTimeout(() => {
+ reject(new ProcessLockAcquireTimeoutError(`Acquring process lock with name "${name}" timed out`));
+ }, acquireTimeout);
+ })
+ : null,
+ ].filter((x) => x))
+ .catch((e) => {
+ if (e && e.isAcquireTimeout) {
+ throw e;
+ }
+ return null;
+ })
+ .then(async () => {
+ // previous operations finished and we didn't get a race on the acquire
+ // timeout, so the current operation can finally start
+ return await fn();
+ });
+ PROCESS_LOCKS[name] = currentOperation.catch(async (e) => {
+ if (e && e.isAcquireTimeout) {
+ // if the current operation timed out, it doesn't mean that the previous
+ // operation finished, so we need contnue waiting for it to finish
+ await previousOperation;
+ return null;
+ }
+ throw e;
+ });
+ // finally wait for the current operation to finish successfully, with an
+ // error or with an acquire timeout error
+ return await currentOperation;
+}
+//# sourceMappingURL=locks.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map
new file mode 100644
index 0000000..42d12ab
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"locks.js","sourceRoot":"","sources":["../../../src/lib/locks.ts"],"names":[],"mappings":";;;AA+FA,sCA8FC;AAwBD,kCAsDC;AA3QD,uCAAgD;AAEhD;;GAEG;AACU,QAAA,SAAS,GAAG;IACvB;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC,CACP,UAAU;QACV,IAAA,8BAAoB,GAAE;QACtB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,gCAAgC,CAAC,KAAK,MAAM,CAC7E;CACF,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAsB,uBAAwB,SAAQ,KAAK;IAGzD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;QAHA,qBAAgB,GAAG,IAAI,CAAA;IAIvC,CAAC;CACF;AAND,0DAMC;AAED;;;;;;;;;GASG;AACH,MAAa,gCAAiC,SAAQ,u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,CAAC;QAED,MAAM,CAAC,CAAA;IACT,CAAC,CAAC,CAAA;IAEF,yEAAyE;IACzE,yCAAyC;IACzC,OAAO,MAAM,gBAAgB,CAAA;AAC/B,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts
new file mode 100644
index 0000000..d85562a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts
@@ -0,0 +1,5 @@
+/**
+ * https://mathiasbynens.be/notes/globalthis
+ */
+export declare function polyfillGlobalThis(): void;
+//# sourceMappingURL=polyfills.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map
new file mode 100644
index 0000000..ee5ea0f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"polyfills.d.ts","sourceRoot":"","sources":["../../../src/lib/polyfills.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,kBAAkB,SAmBjC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
new file mode 100644
index 0000000..7623d47
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
@@ -0,0 +1,29 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.polyfillGlobalThis = polyfillGlobalThis;
+/**
+ * https://mathiasbynens.be/notes/globalthis
+ */
+function polyfillGlobalThis() {
+ if (typeof globalThis === 'object')
+ return;
+ try {
+ Object.defineProperty(Object.prototype, '__magic__', {
+ get: function () {
+ return this;
+ },
+ configurable: true,
+ });
+ // @ts-expect-error 'Allow access to magic'
+ __magic__.globalThis = __magic__;
+ // @ts-expect-error 'Allow access to magic'
+ delete Object.prototype.__magic__;
+ }
+ catch (e) {
+ if (typeof self !== 'undefined') {
+ // @ts-expect-error 'Allow access to globals'
+ self.globalThis = self;
+ }
+ }
+}
+//# sourceMappingURL=polyfills.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map
new file mode 100644
index 0000000..8edc336
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"polyfills.js","sourceRoot":"","sources":["../../../src/lib/polyfills.ts"],"names":[],"mappings":";;AAGA,gDAmBC;AAtBD;;GAEG;AACH,SAAgB,kBAAkB;IAChC,IAAI,OAAO,UAAU,KAAK,QAAQ;QAAE,OAAM;IAC1C,IAAI,CAAC;QACH,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE;YACnD,GAAG,EAAE;gBACH,OAAO,IAAI,CAAA;YACb,CAAC;YACD,YAAY,EAAE,IAAI;SACnB,CAAC,CAAA;QACF,2CAA2C;QAC3C,SAAS,CAAC,UAAU,GAAG,SAAS,CAAA;QAChC,2CAA2C;QAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,SAAS,CAAA;IACnC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;YAChC,6CAA6C;YAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;QACxB,CAAC;IACH,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts
new file mode 100644
index 0000000..2f66ff4
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts
@@ -0,0 +1,1468 @@
+import { AuthError } from './errors';
+import { Fetch } from './fetch';
+import { EIP1193Provider, EthereumSignInInput, Hex } from './web3/ethereum';
+import type { SolanaSignInInput, SolanaSignInOutput } from './web3/solana';
+import { ServerCredentialCreationOptions, ServerCredentialRequestOptions, WebAuthnApi } from './webauthn';
+import { AuthenticationCredential, PublicKeyCredentialCreationOptionsFuture, PublicKeyCredentialRequestOptionsFuture, RegistrationCredential } from './webauthn.dom';
+/** One of the providers supported by GoTrue. */
+export type Provider = 'apple' | 'azure' | 'bitbucket' | 'discord' | 'facebook' | 'figma' | 'github' | 'gitlab' | 'google' | 'kakao' | 'keycloak' | 'linkedin' | 'linkedin_oidc' | 'notion' | 'slack' | 'slack_oidc' | 'spotify' | 'twitch' | 'twitter' | 'workos' | 'zoom' | 'fly';
+export type AuthChangeEventMFA = 'MFA_CHALLENGE_VERIFIED';
+export type AuthChangeEvent = 'INITIAL_SESSION' | 'PASSWORD_RECOVERY' | 'SIGNED_IN' | 'SIGNED_OUT' | 'TOKEN_REFRESHED' | 'USER_UPDATED' | AuthChangeEventMFA;
+/**
+ * Provide your own global lock implementation instead of the default
+ * implementation. The function should acquire a lock for the duration of the
+ * `fn` async function, such that no other client instances will be able to
+ * hold it at the same time.
+ *
+ * @experimental
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout should occur. If positive it
+ * should throw an Error with an `isAcquireTimeout`
+ * property set to true if the operation fails to be
+ * acquired after this much time (ms).
+ * @param fn The operation to execute when the lock is acquired.
+ */
+export type LockFunc = (name: string, acquireTimeout: number, fn: () => Promise) => Promise;
+export type GoTrueClientOptions = {
+ url?: string;
+ headers?: {
+ [key: string]: string;
+ };
+ storageKey?: string;
+ detectSessionInUrl?: boolean;
+ autoRefreshToken?: boolean;
+ persistSession?: boolean;
+ storage?: SupportedStorage;
+ /**
+ * Stores the user object in a separate storage location from the rest of the session data. When non-null, `storage` will only store a JSON object containing the access and refresh token and some adjacent metadata, while `userStorage` will only contain the user object under the key `storageKey + '-user'`.
+ *
+ * When this option is set and cookie storage is used, `getSession()` and other functions that load a session from the cookie store might not return back a user. It's very important to always use `getUser()` to fetch a user object in those scenarios.
+ *
+ * @experimental
+ */
+ userStorage?: SupportedStorage;
+ fetch?: Fetch;
+ flowType?: AuthFlowType;
+ debug?: boolean | ((message: string, ...args: any[]) => void);
+ /**
+ * Provide your own locking mechanism based on the environment. By default no locking is done at this time.
+ *
+ * @experimental
+ */
+ lock?: LockFunc;
+ /**
+ * Set to "true" if there is a custom authorization header set globally.
+ * @experimental
+ */
+ hasCustomAuthorizationHeader?: boolean;
+ /**
+ * If there is an error with the query, throwOnError will reject the promise by
+ * throwing the error instead of returning it as part of a successful response.
+ */
+ throwOnError?: boolean;
+};
+declare const WeakPasswordReasons: readonly ["length", "characters", "pwned"];
+export type WeakPasswordReasons = (typeof WeakPasswordReasons)[number];
+export type WeakPassword = {
+ reasons: WeakPasswordReasons[];
+ message: string;
+};
+/**
+ * Resolve mapped types and show the derived keys and their types when hovering in
+ * VS Code, instead of just showing the names those mapped types are defined with.
+ */
+export type Prettify = T extends Function ? T : {
+ [K in keyof T]: T[K];
+};
+/**
+ * A stricter version of TypeScript's Omit that only allows omitting keys that actually exist.
+ * This prevents typos and ensures type safety at compile time.
+ * Unlike regular Omit, this will error if you try to omit a non-existent key.
+ */
+export type StrictOmit = Omit;
+/**
+ * a shared result type that encapsulates errors instead of throwing them, allows you to optionally specify the ErrorType
+ */
+export type RequestResult = {
+ data: T;
+ error: null;
+} | {
+ data: null;
+ error: Error extends AuthError ? AuthError : ErrorType;
+};
+/**
+ * similar to RequestResult except it allows you to destructure the possible shape of the success response
+ * {@see RequestResult}
+ */
+export type RequestResultSafeDestructure = {
+ data: T;
+ error: null;
+} | {
+ data: T extends object ? {
+ [K in keyof T]: null;
+ } : null;
+ error: AuthError;
+};
+export type AuthResponse = RequestResultSafeDestructure<{
+ user: User | null;
+ session: Session | null;
+}>;
+export type AuthResponsePassword = RequestResultSafeDestructure<{
+ user: User | null;
+ session: Session | null;
+ weak_password?: WeakPassword | null;
+}>;
+/**
+ * AuthOtpResponse is returned when OTP is used.
+ *
+ * {@see AuthResponse}
+ */
+export type AuthOtpResponse = RequestResultSafeDestructure<{
+ user: null;
+ session: null;
+ messageId?: string | null;
+}>;
+export type AuthTokenResponse = RequestResultSafeDestructure<{
+ user: User;
+ session: Session;
+}>;
+export type AuthTokenResponsePassword = RequestResultSafeDestructure<{
+ user: User;
+ session: Session;
+ weakPassword?: WeakPassword;
+}>;
+export type OAuthResponse = {
+ data: {
+ provider: Provider;
+ url: string;
+ };
+ error: null;
+} | {
+ data: {
+ provider: Provider;
+ url: null;
+ };
+ error: AuthError;
+};
+export type SSOResponse = RequestResult<{
+ /**
+ * URL to open in a browser which will complete the sign-in flow by
+ * taking the user to the identity provider's authentication flow.
+ *
+ * On browsers you can set the URL to `window.location.href` to take
+ * the user to the authentication flow.
+ */
+ url: string;
+}>;
+export type UserResponse = RequestResultSafeDestructure<{
+ user: User;
+}>;
+export interface Session {
+ /**
+ * The oauth provider token. If present, this can be used to make external API requests to the oauth provider used.
+ */
+ provider_token?: string | null;
+ /**
+ * The oauth provider refresh token. If present, this can be used to refresh the provider_token via the oauth provider's API.
+ * Not all oauth providers return a provider refresh token. If the provider_refresh_token is missing, please refer to the oauth provider's documentation for information on how to obtain the provider refresh token.
+ */
+ provider_refresh_token?: string | null;
+ /**
+ * The access token jwt. It is recommended to set the JWT_EXPIRY to a shorter expiry value.
+ */
+ access_token: string;
+ /**
+ * A one-time used refresh token that never expires.
+ */
+ refresh_token: string;
+ /**
+ * The number of seconds until the token expires (since it was issued). Returned when a login is confirmed.
+ */
+ expires_in: number;
+ /**
+ * A timestamp of when the token will expire. Returned when a login is confirmed.
+ */
+ expires_at?: number;
+ token_type: 'bearer';
+ /**
+ * When using a separate user storage, accessing properties of this object will throw an error.
+ */
+ user: User;
+}
+declare const AMRMethods: readonly ["password", "otp", "oauth", "totp", "mfa/totp", "mfa/phone", "mfa/webauthn", "anonymous", "sso/saml", "magiclink", "web3"];
+export type AMRMethod = (typeof AMRMethods)[number] | (string & {});
+/**
+ * An authentication methord reference (AMR) entry.
+ *
+ * An entry designates what method was used by the user to verify their
+ * identity and at what time.
+ *
+ * @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}.
+ */
+export interface AMREntry {
+ /** Authentication method name. */
+ method: AMRMethod;
+ /**
+ * Timestamp when the method was successfully used. Represents number of
+ * seconds since 1st January 1970 (UNIX epoch) in UTC.
+ */
+ timestamp: number;
+}
+export interface UserIdentity {
+ id: string;
+ user_id: string;
+ identity_data?: {
+ [key: string]: any;
+ };
+ identity_id: string;
+ provider: string;
+ created_at?: string;
+ last_sign_in_at?: string;
+ updated_at?: string;
+}
+declare const FactorTypes: readonly ["totp", "phone", "webauthn"];
+/**
+ * Type of factor. `totp` and `phone` supported with this version
+ */
+export type FactorType = (typeof FactorTypes)[number];
+declare const FactorVerificationStatuses: readonly ["verified", "unverified"];
+/**
+ * The verification status of the factor, default is `unverified` after `.enroll()`, then `verified` after the user verifies it with `.verify()`
+ */
+type FactorVerificationStatus = (typeof FactorVerificationStatuses)[number];
+/**
+ * A MFA factor.
+ *
+ * @see {@link GoTrueMFAApi#enroll}
+ * @see {@link GoTrueMFAApi#listFactors}
+ * @see {@link GoTrueMFAAdminApi#listFactors}
+ */
+export type Factor = {
+ /** ID of the factor. */
+ id: string;
+ /** Friendly name of the factor, useful to disambiguate between multiple factors. */
+ friendly_name?: string;
+ /**
+ * Type of factor. `totp` and `phone` supported with this version
+ */
+ factor_type: Type;
+ /**
+ * The verification status of the factor, default is `unverified` after `.enroll()`, then `verified` after the user verifies it with `.verify()`
+ */
+ status: Status;
+ created_at: string;
+ updated_at: string;
+};
+export interface UserAppMetadata {
+ /**
+ * The first provider that the user used to sign up with.
+ */
+ provider?: string;
+ /**
+ * A list of all providers that the user has linked to their account.
+ */
+ providers?: string[];
+ [key: string]: any;
+}
+export interface UserMetadata {
+ [key: string]: any;
+}
+export interface User {
+ id: string;
+ app_metadata: UserAppMetadata;
+ user_metadata: UserMetadata;
+ aud: string;
+ confirmation_sent_at?: string;
+ recovery_sent_at?: string;
+ email_change_sent_at?: string;
+ new_email?: string;
+ new_phone?: string;
+ invited_at?: string;
+ action_link?: string;
+ email?: string;
+ phone?: string;
+ created_at: string;
+ confirmed_at?: string;
+ email_confirmed_at?: string;
+ phone_confirmed_at?: string;
+ last_sign_in_at?: string;
+ role?: string;
+ updated_at?: string;
+ identities?: UserIdentity[];
+ is_anonymous?: boolean;
+ is_sso_user?: boolean;
+ factors?: (Factor | Factor)[];
+ deleted_at?: string;
+}
+export interface UserAttributes {
+ /**
+ * The user's email.
+ */
+ email?: string;
+ /**
+ * The user's phone.
+ */
+ phone?: string;
+ /**
+ * The user's password.
+ */
+ password?: string;
+ /**
+ * The nonce sent for reauthentication if the user's password is to be updated.
+ *
+ * Call reauthenticate() to obtain the nonce first.
+ */
+ nonce?: string;
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ * The `data` should be a JSON object that includes user-specific info, such as their first and last name.
+ *
+ */
+ data?: object;
+}
+export interface AdminUserAttributes extends Omit {
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ *
+ * The `user_metadata` should be a JSON object that includes user-specific info, such as their first and last name.
+ *
+ * Note: When using the GoTrueAdminApi and wanting to modify a user's metadata,
+ * this attribute is used instead of UserAttributes data.
+ *
+ */
+ user_metadata?: object;
+ /**
+ * A custom data object to store the user's application specific metadata. This maps to the `auth.users.app_metadata` column.
+ *
+ * Only a service role can modify.
+ *
+ * The `app_metadata` should be a JSON object that includes app-specific info, such as identity providers, roles, and other
+ * access control information.
+ */
+ app_metadata?: object;
+ /**
+ * Confirms the user's email address if set to true.
+ *
+ * Only a service role can modify.
+ */
+ email_confirm?: boolean;
+ /**
+ * Confirms the user's phone number if set to true.
+ *
+ * Only a service role can modify.
+ */
+ phone_confirm?: boolean;
+ /**
+ * Determines how long a user is banned for.
+ *
+ * The format for the ban duration follows a strict sequence of decimal numbers with a unit suffix.
+ * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
+ *
+ * For example, some possible durations include: '300ms', '2h45m'.
+ *
+ * Setting the ban duration to 'none' lifts the ban on the user.
+ */
+ ban_duration?: string | 'none';
+ /**
+ * The `role` claim set in the user's access token JWT.
+ *
+ * When a user signs up, this role is set to `authenticated` by default. You should only modify the `role` if you need to provision several levels of admin access that have different permissions on individual columns in your database.
+ *
+ * Setting this role to `service_role` is not recommended as it grants the user admin privileges.
+ */
+ role?: string;
+ /**
+ * The `password_hash` for the user's password.
+ *
+ * Allows you to specify a password hash for the user. This is useful for migrating a user's password hash from another service.
+ *
+ * Supports bcrypt, scrypt (firebase), and argon2 password hashes.
+ */
+ password_hash?: string;
+ /**
+ * The `id` for the user.
+ *
+ * Allows you to overwrite the default `id` set for the user.
+ */
+ id?: string;
+}
+export interface Subscription {
+ /**
+ * A unique identifier for this subscription, set by the client.
+ * This is an internal identifier used for managing callbacks and should not be
+ * relied upon by application code. Use the unsubscribe() method to remove listeners.
+ */
+ id: string | symbol;
+ /**
+ * The function to call every time there is an event. eg: (eventName) => {}
+ */
+ callback: (event: AuthChangeEvent, session: Session | null) => void;
+ /**
+ * Call this to remove the listener.
+ */
+ unsubscribe: () => void;
+}
+export type SignInAnonymouslyCredentials = {
+ options?: {
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ * The `data` should be a JSON object that includes user-specific info, such as their first and last name.
+ */
+ data?: object;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+};
+export type SignUpWithPasswordCredentials = Prettify;
+type PasswordCredentialsBase = {
+ email: string;
+ password: string;
+} | {
+ phone: string;
+ password: string;
+};
+export type SignInWithPasswordCredentials = PasswordCredentialsBase & {
+ options?: {
+ captchaToken?: string;
+ };
+};
+export type SignInWithPasswordlessCredentials = {
+ /** The user's email address. */
+ email: string;
+ options?: {
+ /** The redirect url embedded in the email link */
+ emailRedirectTo?: string;
+ /** If set to false, this method will not create a new user. Defaults to true. */
+ shouldCreateUser?: boolean;
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ * The `data` should be a JSON object that includes user-specific info, such as their first and last name.
+ */
+ data?: object;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+} | {
+ /** The user's phone number. */
+ phone: string;
+ options?: {
+ /** If set to false, this method will not create a new user. Defaults to true. */
+ shouldCreateUser?: boolean;
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ * The `data` should be a JSON object that includes user-specific info, such as their first and last name.
+ */
+ data?: object;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ /** Messaging channel to use (e.g. whatsapp or sms) */
+ channel?: 'sms' | 'whatsapp';
+ };
+};
+export type AuthFlowType = 'implicit' | 'pkce';
+export type SignInWithOAuthCredentials = {
+ /** One of the providers supported by GoTrue. */
+ provider: Provider;
+ options?: {
+ /** A URL to send the user to after they are confirmed. */
+ redirectTo?: string;
+ /** A space-separated list of scopes granted to the OAuth application. */
+ scopes?: string;
+ /** An object of query params */
+ queryParams?: {
+ [key: string]: string;
+ };
+ /** If set to true does not immediately redirect the current browser context to visit the OAuth authorization page for the provider. */
+ skipBrowserRedirect?: boolean;
+ };
+};
+export type SignInWithIdTokenCredentials = {
+ /** Provider name or OIDC `iss` value identifying which provider should be used to verify the provided token. Supported names: `google`, `apple`, `azure`, `facebook`, `kakao`, `keycloak` (deprecated). */
+ provider: 'google' | 'apple' | 'azure' | 'facebook' | 'kakao' | (string & {});
+ /** OIDC ID token issued by the specified provider. The `iss` claim in the ID token must match the supplied provider. Some ID tokens contain an `at_hash` which require that you provide an `access_token` value to be accepted properly. If the token contains a `nonce` claim you must supply the nonce used to obtain the ID token. */
+ token: string;
+ /** If the ID token contains an `at_hash` claim, then the hash of this value is compared to the value in the ID token. */
+ access_token?: string;
+ /** If the ID token contains a `nonce` claim, then the hash of this value is compared to the value in the ID token. */
+ nonce?: string;
+ options?: {
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+};
+export type SolanaWallet = {
+ signIn?: (...inputs: SolanaSignInInput[]) => Promise;
+ publicKey?: {
+ toBase58: () => string;
+ } | null;
+ signMessage?: (message: Uint8Array, encoding?: 'utf8' | string) => Promise | undefined;
+};
+export type SolanaWeb3Credentials = {
+ chain: 'solana';
+ /** Wallet interface to use. If not specified will default to `window.solana`. */
+ wallet?: SolanaWallet;
+ /** Optional statement to include in the Sign in with Solana message. Must not include new line characters. Most wallets like Phantom **require specifying a statement!** */
+ statement?: string;
+ options?: {
+ /** URL to use with the wallet interface. Some wallets do not allow signing a message for URLs different from the current page. */
+ url?: string;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ signInWithSolana?: Partial>;
+ };
+} | {
+ chain: 'solana';
+ /** Sign in with Solana compatible message. Must include `Issued At`, `URI` and `Version`. */
+ message: string;
+ /** Ed25519 signature of the message. */
+ signature: Uint8Array;
+ options?: {
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+};
+export type EthereumWallet = EIP1193Provider;
+export type EthereumWeb3Credentials = {
+ chain: 'ethereum';
+ /** Wallet interface to use. If not specified will default to `window.ethereum`. */
+ wallet?: EthereumWallet;
+ /** Optional statement to include in the Sign in with Ethereum message. Must not include new line characters. Most wallets like Phantom **require specifying a statement!** */
+ statement?: string;
+ options?: {
+ /** URL to use with the wallet interface. Some wallets do not allow signing a message for URLs different from the current page. */
+ url?: string;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ signInWithEthereum?: Partial>;
+ };
+} | {
+ chain: 'ethereum';
+ /** Sign in with Ethereum compatible message. Must include `Issued At`, `URI` and `Version`. */
+ message: string;
+ /** Ethereum curve (secp256k1) signature of the message. */
+ signature: Hex;
+ options?: {
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+};
+export type Web3Credentials = SolanaWeb3Credentials | EthereumWeb3Credentials;
+export type VerifyOtpParams = VerifyMobileOtpParams | VerifyEmailOtpParams | VerifyTokenHashParams;
+export interface VerifyMobileOtpParams {
+ /** The user's phone number. */
+ phone: string;
+ /** The otp sent to the user's phone number. */
+ token: string;
+ /** The user's verification type. */
+ type: MobileOtpType;
+ options?: {
+ /** A URL to send the user to after they are confirmed. */
+ redirectTo?: string;
+ /**
+ * Verification token received when the user completes the captcha on the site.
+ *
+ * @deprecated
+ */
+ captchaToken?: string;
+ };
+}
+export interface VerifyEmailOtpParams {
+ /** The user's email address. */
+ email: string;
+ /** The otp sent to the user's email address. */
+ token: string;
+ /** The user's verification type. */
+ type: EmailOtpType;
+ options?: {
+ /** A URL to send the user to after they are confirmed. */
+ redirectTo?: string;
+ /** Verification token received when the user completes the captcha on the site.
+ *
+ * @deprecated
+ */
+ captchaToken?: string;
+ };
+}
+export interface VerifyTokenHashParams {
+ /** The token hash used in an email link */
+ token_hash: string;
+ /** The user's verification type. */
+ type: EmailOtpType;
+}
+export type MobileOtpType = 'sms' | 'phone_change';
+export type EmailOtpType = 'signup' | 'invite' | 'magiclink' | 'recovery' | 'email_change' | 'email';
+export type ResendParams = {
+ type: Extract;
+ email: string;
+ options?: {
+ /** A URL to send the user to after they have signed-in. */
+ emailRedirectTo?: string;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+} | {
+ type: Extract;
+ phone: string;
+ options?: {
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ };
+};
+export type SignInWithSSO = {
+ /** UUID of the SSO provider to invoke single-sign on to. */
+ providerId: string;
+ options?: {
+ /** A URL to send the user to after they have signed-in. */
+ redirectTo?: string;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ /**
+ * If set to true, the redirect will not happen on the client side.
+ * This parameter is used when you wish to handle the redirect yourself.
+ * Defaults to false.
+ */
+ skipBrowserRedirect?: boolean;
+ };
+} | {
+ /** Domain name of the organization for which to invoke single-sign on. */
+ domain: string;
+ options?: {
+ /** A URL to send the user to after they have signed-in. */
+ redirectTo?: string;
+ /** Verification token received when the user completes the captcha on the site. */
+ captchaToken?: string;
+ /**
+ * If set to true, the redirect will not happen on the client side.
+ * This parameter is used when you wish to handle the redirect yourself.
+ * Defaults to false.
+ */
+ skipBrowserRedirect?: boolean;
+ };
+};
+export type GenerateSignupLinkParams = {
+ type: 'signup';
+ email: string;
+ password: string;
+ options?: Pick;
+};
+export type GenerateInviteOrMagiclinkParams = {
+ type: 'invite' | 'magiclink';
+ /** The user's email */
+ email: string;
+ options?: Pick;
+};
+export type GenerateRecoveryLinkParams = {
+ type: 'recovery';
+ /** The user's email */
+ email: string;
+ options?: Pick;
+};
+export type GenerateEmailChangeLinkParams = {
+ type: 'email_change_current' | 'email_change_new';
+ /** The user's email */
+ email: string;
+ /**
+ * The user's new email. Only required if type is 'email_change_current' or 'email_change_new'.
+ */
+ newEmail: string;
+ options?: Pick;
+};
+export interface GenerateLinkOptions {
+ /**
+ * A custom data object to store the user's metadata. This maps to the `auth.users.raw_user_meta_data` column.
+ *
+ * The `data` should be a JSON object that includes user-specific info, such as their first and last name.
+ */
+ data?: object;
+ /** The URL which will be appended to the email link generated. */
+ redirectTo?: string;
+}
+export type GenerateLinkParams = GenerateSignupLinkParams | GenerateInviteOrMagiclinkParams | GenerateRecoveryLinkParams | GenerateEmailChangeLinkParams;
+export type GenerateLinkResponse = RequestResultSafeDestructure<{
+ properties: GenerateLinkProperties;
+ user: User;
+}>;
+/** The properties related to the email link generated */
+export type GenerateLinkProperties = {
+ /**
+ * The email link to send to the user.
+ * The action_link follows the following format: auth/v1/verify?type={verification_type}&token={hashed_token}&redirect_to={redirect_to}
+ * */
+ action_link: string;
+ /**
+ * The raw email OTP.
+ * You should send this in the email if you want your users to verify using an OTP instead of the action link.
+ * */
+ email_otp: string;
+ /**
+ * The hashed token appended to the action link.
+ * */
+ hashed_token: string;
+ /** The URL appended to the action link. */
+ redirect_to: string;
+ /** The verification type that the email link is associated to. */
+ verification_type: GenerateLinkType;
+};
+export type GenerateLinkType = 'signup' | 'invite' | 'magiclink' | 'recovery' | 'email_change_current' | 'email_change_new';
+export type MFAEnrollParams = MFAEnrollTOTPParams | MFAEnrollPhoneParams | MFAEnrollWebauthnParams;
+export type MFAUnenrollParams = {
+ /** ID of the factor being unenrolled. */
+ factorId: string;
+};
+type MFAVerifyParamsBase = {
+ /** ID of the factor being verified. Returned in enroll(). */
+ factorId: string;
+ /** ID of the challenge being verified. Returned in challenge(). */
+ challengeId: string;
+};
+type MFAVerifyTOTPParamFields = {
+ /** Verification code provided by the user. */
+ code: string;
+};
+export type MFAVerifyTOTPParams = Prettify;
+type MFAVerifyPhoneParamFields = MFAVerifyTOTPParamFields;
+export type MFAVerifyPhoneParams = Prettify;
+type MFAVerifyWebauthnParamFieldsBase = {
+ /** Relying party ID */
+ rpId: string;
+ /** Relying party origins */
+ rpOrigins?: string[];
+};
+type MFAVerifyWebauthnCredentialParamFields = {
+ /** Operation type */
+ type: T;
+ /** Creation response from the authenticator (for enrollment/unverified factors) */
+ credential_response: T extends 'create' ? RegistrationCredential : AuthenticationCredential;
+};
+/**
+ * WebAuthn-specific fields for MFA verification.
+ * Supports both credential creation (registration) and request (authentication) flows.
+ * @template T - Type of WebAuthn operation: 'create' for registration, 'request' for authentication
+ */
+export type MFAVerifyWebauthnParamFields = {
+ webauthn: MFAVerifyWebauthnParamFieldsBase & MFAVerifyWebauthnCredentialParamFields;
+};
+/**
+ * Parameters for WebAuthn MFA verification.
+ * Used to verify WebAuthn credentials after challenge.
+ * @template T - Type of WebAuthn operation: 'create' for registration, 'request' for authentication
+ * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying an Authentication Assertion}
+ */
+export type MFAVerifyWebauthnParams = Prettify>;
+export type MFAVerifyParams = MFAVerifyTOTPParams | MFAVerifyPhoneParams | MFAVerifyWebauthnParams;
+type MFAChallengeParamsBase = {
+ /** ID of the factor to be challenged. Returned in enroll(). */
+ factorId: string;
+};
+declare const MFATOTPChannels: readonly ["sms", "whatsapp"];
+export type MFATOTPChannel = (typeof MFATOTPChannels)[number];
+export type MFAChallengeTOTPParams = Prettify;
+type MFAChallengePhoneParamFields = {
+ /** Messaging channel to use (e.g. whatsapp or sms). Only relevant for phone factors */
+ channel: Channel;
+};
+export type MFAChallengePhoneParams = Prettify;
+/** WebAuthn parameters for WebAuthn factor challenge */
+type MFAChallengeWebauthnParamFields = {
+ webauthn: {
+ /** Relying party ID */
+ rpId: string;
+ /** Relying party origins*/
+ rpOrigins?: string[];
+ };
+};
+/**
+ * Parameters for initiating a WebAuthn MFA challenge.
+ * Includes Relying Party information needed for WebAuthn ceremonies.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-rp-operations W3C WebAuthn Spec - Relying Party Operations}
+ */
+export type MFAChallengeWebauthnParams = Prettify;
+export type MFAChallengeParams = MFAChallengeTOTPParams | MFAChallengePhoneParams | MFAChallengeWebauthnParams;
+type MFAChallengeAndVerifyParamsBase = Omit;
+type MFAChallengeAndVerifyTOTPParamFields = MFAVerifyTOTPParamFields;
+type MFAChallengeAndVerifyTOTPParams = Prettify;
+export type MFAChallengeAndVerifyParams = MFAChallengeAndVerifyTOTPParams;
+/**
+ * Data returned after successful MFA verification.
+ * Contains new session tokens and updated user information.
+ */
+export type AuthMFAVerifyResponseData = {
+ /** New access token (JWT) after successful verification. */
+ access_token: string;
+ /** Type of token, always `bearer`. */
+ token_type: 'bearer';
+ /** Number of seconds in which the access token will expire. */
+ expires_in: number;
+ /** Refresh token you can use to obtain new access tokens when expired. */
+ refresh_token: string;
+ /** Updated user profile. */
+ user: User;
+};
+/**
+ * Response type for MFA verification operations.
+ * Returns session tokens on successful verification.
+ */
+export type AuthMFAVerifyResponse = RequestResult;
+export type AuthMFAEnrollResponse = AuthMFAEnrollTOTPResponse | AuthMFAEnrollPhoneResponse | AuthMFAEnrollWebauthnResponse;
+export type AuthMFAUnenrollResponse = RequestResult<{
+ /** ID of the factor that was successfully unenrolled. */
+ id: string;
+}>;
+type AuthMFAChallengeResponseBase = {
+ /** ID of the newly created challenge. */
+ id: string;
+ /** Factor Type which generated the challenge */
+ type: T;
+ /** Timestamp in UNIX seconds when this challenge will no longer be usable. */
+ expires_at: number;
+};
+type AuthMFAChallengeTOTPResponseFields = {};
+export type AuthMFAChallengeTOTPResponse = RequestResult & AuthMFAChallengeTOTPResponseFields>>;
+type AuthMFAChallengePhoneResponseFields = {};
+export type AuthMFAChallengePhoneResponse = RequestResult & AuthMFAChallengePhoneResponseFields>>;
+type AuthMFAChallengeWebauthnResponseFields = {
+ webauthn: {
+ type: 'create';
+ credential_options: {
+ publicKey: PublicKeyCredentialCreationOptionsFuture;
+ };
+ } | {
+ type: 'request';
+ credential_options: {
+ publicKey: PublicKeyCredentialRequestOptionsFuture;
+ };
+ };
+};
+/**
+ * Response type for WebAuthn MFA challenge.
+ * Contains credential creation or request options from the server.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-credential-creation W3C WebAuthn Spec - Credential Creation}
+ */
+export type AuthMFAChallengeWebauthnResponse = RequestResult & AuthMFAChallengeWebauthnResponseFields>>;
+type AuthMFAChallengeWebauthnResponseFieldsJSON = {
+ webauthn: {
+ type: 'create';
+ credential_options: {
+ publicKey: ServerCredentialCreationOptions;
+ };
+ } | {
+ type: 'request';
+ credential_options: {
+ publicKey: ServerCredentialRequestOptions;
+ };
+ };
+};
+/**
+ * JSON-serializable version of WebAuthn challenge response.
+ * Used for server communication with base64url-encoded binary fields.
+ */
+export type AuthMFAChallengeWebauthnResponseDataJSON = Prettify & AuthMFAChallengeWebauthnResponseFieldsJSON>;
+/**
+ * Server response type for WebAuthn MFA challenge.
+ * Contains JSON-formatted WebAuthn options ready for browser API.
+ */
+export type AuthMFAChallengeWebauthnServerResponse = RequestResult;
+export type AuthMFAChallengeResponse = AuthMFAChallengeTOTPResponse | AuthMFAChallengePhoneResponse | AuthMFAChallengeWebauthnResponse;
+/** response of ListFactors, which should contain all the types of factors that are available, this ensures we always include all */
+export type AuthMFAListFactorsResponse = RequestResult<{
+ /** All available factors (verified and unverified). */
+ all: Prettify[];
+} & {
+ [K in T[number]]: Prettify>[];
+}>;
+export type AuthenticatorAssuranceLevels = 'aal1' | 'aal2';
+export type AuthMFAGetAuthenticatorAssuranceLevelResponse = RequestResult<{
+ /** Current AAL level of the session. */
+ currentLevel: AuthenticatorAssuranceLevels | null;
+ /**
+ * Next possible AAL level for the session. If the next level is higher
+ * than the current one, the user should go through MFA.
+ *
+ * @see {@link GoTrueMFAApi#challenge}
+ */
+ nextLevel: AuthenticatorAssuranceLevels | null;
+ /**
+ * A list of all authentication methods attached to this session. Use
+ * the information here to detect the last time a user verified a
+ * factor, for example if implementing a step-up scenario.
+ */
+ currentAuthenticationMethods: AMREntry[];
+}>;
+/**
+ * Contains the full multi-factor authentication API.
+ *
+ */
+export interface GoTrueMFAApi {
+ /**
+ * Starts the enrollment process for a new Multi-Factor Authentication (MFA)
+ * factor. This method creates a new `unverified` factor.
+ * To verify a factor, present the QR code or secret to the user and ask them to add it to their
+ * authenticator app.
+ * The user has to enter the code from their authenticator app to verify it.
+ *
+ * Upon verifying a factor, all other sessions are logged out and the current session's authenticator level is promoted to `aal2`.
+ */
+ enroll(params: MFAEnrollTOTPParams): Promise;
+ enroll(params: MFAEnrollPhoneParams): Promise;
+ enroll(params: MFAEnrollWebauthnParams): Promise;
+ enroll(params: MFAEnrollParams): Promise;
+ /**
+ * Prepares a challenge used to verify that a user has access to a MFA
+ * factor.
+ */
+ challenge(params: MFAChallengeTOTPParams): Promise>;
+ challenge(params: MFAChallengePhoneParams): Promise>;
+ challenge(params: MFAChallengeWebauthnParams): Promise>;
+ challenge(params: MFAChallengeParams): Promise;
+ /**
+ * Verifies a code against a challenge. The verification code is
+ * provided by the user by entering a code seen in their authenticator app.
+ */
+ verify(params: MFAVerifyTOTPParams): Promise;
+ verify(params: MFAVerifyPhoneParams): Promise;
+ verify(params: MFAVerifyWebauthnParams): Promise;
+ verify(params: MFAVerifyParams): Promise;
+ /**
+ * Unenroll removes a MFA factor.
+ * A user has to have an `aal2` authenticator level in order to unenroll a `verified` factor.
+ */
+ unenroll(params: MFAUnenrollParams): Promise;
+ /**
+ * Helper method which creates a challenge and immediately uses the given code to verify against it thereafter. The verification code is
+ * provided by the user by entering a code seen in their authenticator app.
+ */
+ challengeAndVerify(params: MFAChallengeAndVerifyParams): Promise;
+ /**
+ * Returns the list of MFA factors enabled for this user.
+ *
+ * @see {@link GoTrueMFAApi#enroll}
+ * @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ * @see {@link GoTrueClient#getUser}
+ *
+ */
+ listFactors(): Promise;
+ /**
+ * Returns the Authenticator Assurance Level (AAL) for the active session.
+ *
+ * - `aal1` (or `null`) means that the user's identity has been verified only
+ * with a conventional login (email+password, OTP, magic link, social login,
+ * etc.).
+ * - `aal2` means that the user's identity has been verified both with a conventional login and at least one MFA factor.
+ *
+ * Although this method returns a promise, it's fairly quick (microseconds)
+ * and rarely uses the network. You can use this to check whether the current
+ * user needs to be shown a screen to verify their MFA factors.
+ *
+ */
+ getAuthenticatorAssuranceLevel(): Promise;
+ webauthn: WebAuthnApi;
+}
+/**
+ * @expermental
+ */
+export type AuthMFAAdminDeleteFactorResponse = RequestResult<{
+ /** ID of the factor that was successfully deleted. */
+ id: string;
+}>;
+/**
+ * @expermental
+ */
+export type AuthMFAAdminDeleteFactorParams = {
+ /** ID of the MFA factor to delete. */
+ id: string;
+ /** ID of the user whose factor is being deleted. */
+ userId: string;
+};
+/**
+ * @expermental
+ */
+export type AuthMFAAdminListFactorsResponse = RequestResult<{
+ /** All factors attached to the user. */
+ factors: Factor[];
+}>;
+/**
+ * @expermental
+ */
+export type AuthMFAAdminListFactorsParams = {
+ /** ID of the user. */
+ userId: string;
+};
+/**
+ * Contains the full multi-factor authentication administration API.
+ *
+ * @expermental
+ */
+export interface GoTrueAdminMFAApi {
+ /**
+ * Lists all factors associated to a user.
+ *
+ */
+ listFactors(params: AuthMFAAdminListFactorsParams): Promise;
+ /**
+ * Deletes a factor on a user. This will log the user out of all active
+ * sessions if the deleted factor was verified.
+ *
+ * @see {@link GoTrueMFAApi#unenroll}
+ *
+ * @expermental
+ */
+ deleteFactor(params: AuthMFAAdminDeleteFactorParams): Promise;
+}
+type AnyFunction = (...args: any[]) => any;
+type MaybePromisify = T | Promise;
+type PromisifyMethods = {
+ [K in keyof T]: T[K] extends AnyFunction ? (...args: Parameters) => MaybePromisify> : T[K];
+};
+export type SupportedStorage = PromisifyMethods> & {
+ /**
+ * If set to `true` signals to the library that the storage medium is used
+ * on a server and the values may not be authentic, such as reading from
+ * request cookies. Implementations should not set this to true if the client
+ * is used on a server that reads storage information from authenticated
+ * sources, such as a secure database or file.
+ */
+ isServer?: boolean;
+};
+export type InitializeResult = {
+ error: AuthError | null;
+};
+export type CallRefreshTokenResult = RequestResult;
+export type Pagination = {
+ [key: string]: any;
+ nextPage: number | null;
+ lastPage: number;
+ total: number;
+};
+export type PageParams = {
+ /** The page number */
+ page?: number;
+ /** Number of items returned per page */
+ perPage?: number;
+};
+export type SignOut = {
+ /**
+ * Determines which sessions should be
+ * logged out. Global means all
+ * sessions by this account. Local
+ * means only this session. Others
+ * means all other sessions except the
+ * current one. When using others,
+ * there is no sign-out event fired on
+ * the current session!
+ */
+ scope?: 'global' | 'local' | 'others';
+};
+type MFAEnrollParamsBase = {
+ /** The type of factor being enrolled. */
+ factorType: T;
+ /** Human readable name assigned to the factor. */
+ friendlyName?: string;
+};
+type MFAEnrollTOTPParamFields = {
+ /** Domain which the user is enrolled with. */
+ issuer?: string;
+};
+export type MFAEnrollTOTPParams = Prettify & MFAEnrollTOTPParamFields>;
+type MFAEnrollPhoneParamFields = {
+ /** Phone number associated with a factor. Number should conform to E.164 format */
+ phone: string;
+};
+export type MFAEnrollPhoneParams = Prettify & MFAEnrollPhoneParamFields>;
+type MFAEnrollWebauthnFields = {};
+/**
+ * Parameters for enrolling a WebAuthn factor.
+ * Creates an unverified WebAuthn factor that must be verified with a credential.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
+ */
+export type MFAEnrollWebauthnParams = Prettify & MFAEnrollWebauthnFields>;
+type AuthMFAEnrollResponseBase = {
+ /** ID of the factor that was just enrolled (in an unverified state). */
+ id: string;
+ /** Type of MFA factor.*/
+ type: T;
+ /** Friendly name of the factor, useful for distinguishing between factors **/
+ friendly_name?: string;
+};
+type AuthMFAEnrollTOTPResponseFields = {
+ /** TOTP enrollment information. */
+ totp: {
+ /** Contains a QR code encoding the authenticator URI. You can
+ * convert it to a URL by prepending `data:image/svg+xml;utf-8,` to
+ * the value. Avoid logging this value to the console. */
+ qr_code: string;
+ /** The TOTP secret (also encoded in the QR code). Show this secret
+ * in a password-style field to the user, in case they are unable to
+ * scan the QR code. Avoid logging this value to the console. */
+ secret: string;
+ /** The authenticator URI encoded within the QR code, should you need
+ * to use it. Avoid loggin this value to the console. */
+ uri: string;
+ };
+};
+export type AuthMFAEnrollTOTPResponse = RequestResult & AuthMFAEnrollTOTPResponseFields>>;
+type AuthMFAEnrollPhoneResponseFields = {
+ /** Phone number of the MFA factor in E.164 format. Used to send messages */
+ phone: string;
+};
+export type AuthMFAEnrollPhoneResponse = RequestResult & AuthMFAEnrollPhoneResponseFields>>;
+type AuthMFAEnrollWebauthnFields = {};
+/**
+ * Response type for WebAuthn factor enrollment.
+ * Returns the enrolled factor ID and metadata.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
+ */
+export type AuthMFAEnrollWebauthnResponse = RequestResult & AuthMFAEnrollWebauthnFields>>;
+export type JwtHeader = {
+ alg: 'RS256' | 'ES256' | 'HS256';
+ kid: string;
+ typ: string;
+};
+export type RequiredClaims = {
+ iss: string;
+ sub: string;
+ aud: string | string[];
+ exp: number;
+ iat: number;
+ role: string;
+ aal: AuthenticatorAssuranceLevels;
+ session_id: string;
+};
+/**
+ * JWT Payload containing claims for Supabase authentication tokens.
+ *
+ * Required claims (iss, aud, exp, iat, sub, role, aal, session_id) are inherited from RequiredClaims.
+ * All other claims are optional as they can be customized via Custom Access Token Hooks.
+ *
+ * @see https://supabase.com/docs/guides/auth/jwt-fields
+ */
+export interface JwtPayload extends RequiredClaims {
+ email?: string;
+ phone?: string;
+ is_anonymous?: boolean;
+ jti?: string;
+ nbf?: number;
+ app_metadata?: UserAppMetadata;
+ user_metadata?: UserMetadata;
+ amr?: AMREntry[];
+ ref?: string;
+ [key: string]: any;
+}
+export interface JWK {
+ kty: 'RSA' | 'EC' | 'oct';
+ key_ops: string[];
+ alg?: string;
+ kid?: string;
+ [key: string]: any;
+}
+export declare const SIGN_OUT_SCOPES: readonly ["global", "local", "others"];
+export type SignOutScope = (typeof SIGN_OUT_SCOPES)[number];
+/**
+ * OAuth client grant types supported by the OAuth 2.1 server.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientGrantType = 'authorization_code' | 'refresh_token';
+/**
+ * OAuth client response types supported by the OAuth 2.1 server.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientResponseType = 'code';
+/**
+ * OAuth client type indicating whether the client can keep credentials confidential.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientType = 'public' | 'confidential';
+/**
+ * OAuth client registration type.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientRegistrationType = 'dynamic' | 'manual';
+/**
+ * OAuth client object returned from the OAuth 2.1 server.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClient = {
+ /** Unique identifier for the OAuth client */
+ client_id: string;
+ /** Human-readable name of the OAuth client */
+ client_name: string;
+ /** Client secret (only returned on registration and regeneration) */
+ client_secret?: string;
+ /** Type of OAuth client */
+ client_type: OAuthClientType;
+ /** Token endpoint authentication method */
+ token_endpoint_auth_method: string;
+ /** Registration type of the client */
+ registration_type: OAuthClientRegistrationType;
+ /** URI of the OAuth client */
+ client_uri?: string;
+ /** URI of the OAuth client's logo */
+ logo_uri?: string;
+ /** Array of allowed redirect URIs */
+ redirect_uris: string[];
+ /** Array of allowed grant types */
+ grant_types: OAuthClientGrantType[];
+ /** Array of allowed response types */
+ response_types: OAuthClientResponseType[];
+ /** Scope of the OAuth client */
+ scope?: string;
+ /** Timestamp when the client was created */
+ created_at: string;
+ /** Timestamp when the client was last updated */
+ updated_at: string;
+};
+/**
+ * Parameters for creating a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type CreateOAuthClientParams = {
+ /** Human-readable name of the OAuth client */
+ client_name: string;
+ /** URI of the OAuth client */
+ client_uri?: string;
+ /** Array of allowed redirect URIs */
+ redirect_uris: string[];
+ /** Array of allowed grant types (optional, defaults to authorization_code and refresh_token) */
+ grant_types?: OAuthClientGrantType[];
+ /** Array of allowed response types (optional, defaults to code) */
+ response_types?: OAuthClientResponseType[];
+ /** Scope of the OAuth client */
+ scope?: string;
+};
+/**
+ * Parameters for updating an existing OAuth client.
+ * All fields are optional. Only provided fields will be updated.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type UpdateOAuthClientParams = {
+ /** Human-readable name of the OAuth client */
+ client_name?: string;
+ /** URI of the OAuth client */
+ client_uri?: string;
+ /** URI of the OAuth client's logo */
+ logo_uri?: string;
+ /** Array of allowed redirect URIs */
+ redirect_uris?: string[];
+ /** Array of allowed grant types */
+ grant_types?: OAuthClientGrantType[];
+};
+/**
+ * Response type for OAuth client operations.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientResponse = RequestResult;
+/**
+ * Response type for listing OAuth clients.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthClientListResponse = {
+ data: {
+ clients: OAuthClient[];
+ aud: string;
+ } & Pagination;
+ error: null;
+} | {
+ data: {
+ clients: [];
+ };
+ error: AuthError;
+};
+/**
+ * Contains all OAuth client administration methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export interface GoTrueAdminOAuthApi {
+ /**
+ * Lists all OAuth clients with optional pagination.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ listClients(params?: PageParams): Promise;
+ /**
+ * Creates a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ createClient(params: CreateOAuthClientParams): Promise;
+ /**
+ * Gets details of a specific OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ getClient(clientId: string): Promise;
+ /**
+ * Updates an existing OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ updateClient(clientId: string, params: UpdateOAuthClientParams): Promise;
+ /**
+ * Deletes an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ deleteClient(clientId: string): Promise<{
+ data: null;
+ error: AuthError | null;
+ }>;
+ /**
+ * Regenerates the secret for an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ regenerateClientSecret(clientId: string): Promise;
+}
+/**
+ * OAuth client details in an authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthAuthorizationClient = {
+ /** Unique identifier for the OAuth client (UUID) */
+ id: string;
+ /** Human-readable name of the OAuth client */
+ name: string;
+ /** URI of the OAuth client's website */
+ uri: string;
+ /** URI of the OAuth client's logo */
+ logo_uri: string;
+};
+/**
+ * OAuth authorization details for the consent flow.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthAuthorizationDetails = {
+ /** The authorization ID */
+ authorization_id: string;
+ /** Redirect URL - present if user already consented (can be used to trigger immediate redirect) */
+ redirect_url?: string;
+ /** OAuth client requesting authorization */
+ client: OAuthAuthorizationClient;
+ /** User object associated with the authorization */
+ user: {
+ /** User ID (UUID) */
+ id: string;
+ /** User email */
+ email: string;
+ };
+ /** Space-separated list of requested scopes */
+ scope: string;
+};
+/**
+ * Response type for getting OAuth authorization details.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type AuthOAuthAuthorizationDetailsResponse = RequestResult;
+/**
+ * Response type for OAuth consent decision (approve/deny).
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type AuthOAuthConsentResponse = RequestResult<{
+ /** URL to redirect the user back to the OAuth client */
+ redirect_url: string;
+}>;
+/**
+ * An OAuth grant representing a user's authorization of an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type OAuthGrant = {
+ /** OAuth client information */
+ client: OAuthAuthorizationClient;
+ /** Array of scopes granted to this client */
+ scopes: string[];
+ /** Timestamp when the grant was created (ISO 8601 date-time) */
+ granted_at: string;
+};
+/**
+ * Response type for listing user's OAuth grants.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type AuthOAuthGrantsResponse = RequestResult;
+/**
+ * Response type for revoking an OAuth grant.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+export type AuthOAuthRevokeGrantResponse = RequestResult<{}>;
+/**
+ * Contains all OAuth 2.1 authorization server user-facing methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * These methods are used to implement the consent page.
+ */
+export interface AuthOAuthServerApi {
+ /**
+ * Retrieves details about an OAuth authorization request.
+ * Used to display consent information to the user.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This method returns authorization details including client info, scopes, and user information.
+ * If the response includes a redirect_uri, it means consent was already given - the caller
+ * should handle the redirect manually if needed.
+ *
+ * @param authorizationId - The authorization ID from the authorization request
+ * @returns Authorization details including client info and requested scopes
+ */
+ getAuthorizationDetails(authorizationId: string): Promise;
+ /**
+ * Approves an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * @param authorizationId - The authorization ID to approve
+ * @param options - Optional parameters including skipBrowserRedirect
+ * @returns Redirect URL to send the user back to the OAuth client
+ */
+ approveAuthorization(authorizationId: string, options?: {
+ skipBrowserRedirect?: boolean;
+ }): Promise;
+ /**
+ * Denies an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * @param authorizationId - The authorization ID to deny
+ * @param options - Optional parameters including skipBrowserRedirect
+ * @returns Redirect URL to send the user back to the OAuth client
+ */
+ denyAuthorization(authorizationId: string, options?: {
+ skipBrowserRedirect?: boolean;
+ }): Promise;
+ /**
+ * Lists all OAuth grants that the authenticated user has authorized.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * @returns Response with array of OAuth grants with client information and granted scopes
+ */
+ listGrants(): Promise;
+ /**
+ * Revokes a user's OAuth grant for a specific client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * Revocation marks consent as revoked, deletes active sessions for that OAuth client,
+ * and invalidates associated refresh tokens.
+ *
+ * @param options - Revocation options
+ * @param options.clientId - The OAuth client identifier (UUID) to revoke access for
+ * @returns Empty response on successful revocation
+ */
+ revokeGrant(options: {
+ clientId: string;
+ }): Promise;
+}
+export {};
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map
new file mode 100644
index 0000000..ba89c28
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,WAAW,EACZ,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,wBAAwB,EACxB,wCAAwC,EACxC,uCAAuC,EACvC,sBAAsB,EACvB,MAAM,gBAAgB,CAAA;AAEvB,gDAAgD;AAChD,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,OAAO,GACP,WAAW,GACX,SAAS,GACT,UAAU,GACV,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,UAAU,GACV,UAAU,GACV,eAAe,GACf,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,MAAM,GACN,KAAK,CAAA;AAET,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,mBAAmB,GACnB,WAAW,GACX,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,kBAAkB,CAAA;AAEtB;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc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/node_modules/@supabase/auth-js/dist/main/lib/types.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.js
new file mode 100644
index 0000000..c48f360
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.js
@@ -0,0 +1,22 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SIGN_OUT_SCOPES = void 0;
+const WeakPasswordReasons = ['length', 'characters', 'pwned'];
+const AMRMethods = [
+ 'password',
+ 'otp',
+ 'oauth',
+ 'totp',
+ 'mfa/totp',
+ 'mfa/phone',
+ 'mfa/webauthn',
+ 'anonymous',
+ 'sso/saml',
+ 'magiclink',
+ 'web3',
+];
+const FactorTypes = ['totp', 'phone', 'webauthn'];
+const FactorVerificationStatuses = ['verified', 'unverified'];
+const MFATOTPChannels = ['sms', 'whatsapp'];
+exports.SIGN_OUT_SCOPES = ['global', 'local', 'others'];
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/types.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.js.map
new file mode 100644
index 0000000..401c59a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":";;;AAoHA,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAU,CAAA;AA+ItE,MAAM,UAAU,GAAG;IACjB,UAAU;IACV,KAAK;IACL,OAAO;IACP,MAAM;IACN,UAAU;IACV,WAAW;IACX,cAAc;IACd,WAAW;IACX,UAAU;IACV,WAAW;IACX,MAAM;CACE,CAAA;AAoCV,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU,CAAA;AAO1D,MAAM,0BAA0B,GAAG,CAAC,UAAU,EAAE,YAAY,CAAU,CAAA;AA2oBtE,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,UAAU,CAAU,CAAA;AAqhBvC,QAAA,eAAe,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts
new file mode 100644
index 0000000..da11aac
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts
@@ -0,0 +1,2 @@
+export declare const version = "2.87.1";
+//# sourceMappingURL=version.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map
new file mode 100644
index 0000000..a4c2b72
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,WAAW,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js
new file mode 100644
index 0000000..31bcb0a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+// Generated automatically during releases by scripts/update-version-files.ts
+// This file provides runtime access to the package version for:
+// - HTTP request headers (e.g., X-Client-Info header for API requests)
+// - Debugging and support (identifying which version is running)
+// - Telemetry and logging (version reporting in errors/analytics)
+// - Ensuring build artifacts match the published package version
+exports.version = '2.87.1';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js.map
new file mode 100644
index 0000000..e9f984c
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/version.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACpD,QAAA,OAAO,GAAG,QAAQ,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts
new file mode 100644
index 0000000..71f4b6e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts
@@ -0,0 +1,96 @@
+export type Hex = `0x${string}`;
+export type Address = Hex;
+export type EIP1193EventMap = {
+ accountsChanged(accounts: Address[]): void;
+ chainChanged(chainId: string): void;
+ connect(connectInfo: {
+ chainId: string;
+ }): void;
+ disconnect(error: {
+ code: number;
+ message: string;
+ }): void;
+ message(message: {
+ type: string;
+ data: unknown;
+ }): void;
+};
+export type EIP1193Events = {
+ on(event: event, listener: EIP1193EventMap[event]): void;
+ removeListener(event: event, listener: EIP1193EventMap[event]): void;
+};
+export type EIP1193RequestFn = (args: {
+ method: string;
+ params?: unknown;
+}) => Promise;
+export type EIP1193Provider = EIP1193Events & {
+ address: string;
+ request: EIP1193RequestFn;
+};
+export type EthereumWallet = EIP1193Provider;
+/**
+ * EIP-4361 message fields
+ */
+export type SiweMessage = {
+ /**
+ * The Ethereum address performing the signing.
+ */
+ address: Address;
+ /**
+ * The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) Chain ID to which the session is bound,
+ */
+ chainId: number;
+ /**
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority that is requesting the signing.
+ */
+ domain: string;
+ /**
+ * Time when the signed authentication message is no longer valid.
+ */
+ expirationTime?: Date | undefined;
+ /**
+ * Time when the message was generated, typically the current time.
+ */
+ issuedAt?: Date | undefined;
+ /**
+ * A random string typically chosen by the relying party and used to prevent replay attacks.
+ */
+ nonce?: string;
+ /**
+ * Time when the signed authentication message will become valid.
+ */
+ notBefore?: Date | undefined;
+ /**
+ * A system-specific identifier that may be used to uniquely refer to the sign-in request.
+ */
+ requestId?: string | undefined;
+ /**
+ * A list of information or references to information the user wishes to have resolved as part of authentication by the relying party.
+ */
+ resources?: string[] | undefined;
+ /**
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme of the origin of the request.
+ */
+ scheme?: string | undefined;
+ /**
+ * A human-readable ASCII assertion that the user will sign.
+ */
+ statement?: string | undefined;
+ /**
+ * [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) URI referring to the resource that is the subject of the signing (as in the subject of a claim).
+ */
+ uri: string;
+ /**
+ * The current version of the SIWE Message.
+ */
+ version: '1';
+};
+export type EthereumSignInInput = SiweMessage;
+export declare function getAddress(address: string): Address;
+export declare function fromHex(hex: Hex): number;
+export declare function toHex(value: string): Hex;
+/**
+ * Creates EIP-4361 formatted message.
+ */
+export declare function createSiweMessage(parameters: SiweMessage): string;
+//# sourceMappingURL=ethereum.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map
new file mode 100644
index 0000000..7b3ac39
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"ethereum.d.ts","sourceRoot":"","sources":["../../../../src/lib/web3/ethereum.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAA;AAE/B,MAAM,MAAM,OAAO,GAAG,GAAG,CAAA;AAEzB,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,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SAAS,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,EAAE,GAAG,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAA;AAE7C,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAExC;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAIxC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,CAwEjE"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js
new file mode 100644
index 0000000..2e299a7
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js
@@ -0,0 +1,66 @@
+"use strict";
+// types and functions copied over from viem so this library doesn't depend on it
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getAddress = getAddress;
+exports.fromHex = fromHex;
+exports.toHex = toHex;
+exports.createSiweMessage = createSiweMessage;
+function getAddress(address) {
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address)) {
+ throw new Error(`@supabase/auth-js: Address "${address}" is invalid.`);
+ }
+ return address.toLowerCase();
+}
+function fromHex(hex) {
+ return parseInt(hex, 16);
+}
+function toHex(value) {
+ const bytes = new TextEncoder().encode(value);
+ const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, '0')).join('');
+ return ('0x' + hex);
+}
+/**
+ * Creates EIP-4361 formatted message.
+ */
+function createSiweMessage(parameters) {
+ var _a;
+ const { chainId, domain, expirationTime, issuedAt = new Date(), nonce, notBefore, requestId, resources, scheme, uri, version, } = parameters;
+ // Validate fields
+ {
+ if (!Number.isInteger(chainId))
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${chainId}`);
+ if (!domain)
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);
+ if (nonce && nonce.length < 8)
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${nonce}`);
+ if (!uri)
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);
+ if (version !== '1')
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${version}`);
+ if ((_a = parameters.statement) === null || _a === void 0 ? void 0 : _a.includes('\n'))
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${parameters.statement}`);
+ }
+ // Construct message
+ const address = getAddress(parameters.address);
+ const origin = scheme ? `${scheme}://${domain}` : domain;
+ const statement = parameters.statement ? `${parameters.statement}\n` : '';
+ const prefix = `${origin} wants you to sign in with your Ethereum account:\n${address}\n\n${statement}`;
+ let suffix = `URI: ${uri}\nVersion: ${version}\nChain ID: ${chainId}${nonce ? `\nNonce: ${nonce}` : ''}\nIssued At: ${issuedAt.toISOString()}`;
+ if (expirationTime)
+ suffix += `\nExpiration Time: ${expirationTime.toISOString()}`;
+ if (notBefore)
+ suffix += `\nNot Before: ${notBefore.toISOString()}`;
+ if (requestId)
+ suffix += `\nRequest ID: ${requestId}`;
+ if (resources) {
+ let content = '\nResources:';
+ for (const resource of resources) {
+ if (!resource || typeof resource !== 'string')
+ throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${resource}`);
+ content += `\n- ${resource}`;
+ }
+ suffix += content;
+ }
+ return `${prefix}\n${suffix}`;
+}
+//# sourceMappingURL=ethereum.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map
new file mode 100644
index 0000000..1a279ee
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../../../../src/lib/web3/ethereum.ts"],"names":[],"mappings":";AAAA,iFAAiF;;AA2FjF,gCAKC;AAED,0BAEC;AAED,sBAIC;AAKD,8CAwEC;AA5FD,SAAgB,UAAU,CAAC,OAAe;IACxC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,+BAA+B,OAAO,eAAe,CAAC,CAAA;IACxE,CAAC;IACD,OAAO,OAAO,CAAC,WAAW,EAAa,CAAA;AACzC,CAAC;AAED,SAAgB,OAAO,CAAC,GAAQ;IAC9B,OAAO,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAC1B,CAAC;AAED,SAAgB,KAAK,CAAC,KAAa;IACjC,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ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AAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IACzE,MAAM,MAAM,GAAG,GAAG,MAAM,sDAAsD,OAAO,OAAO,SAAS,EAAE,CAAA;IAEvG,IAAI,MAAM,GAAG,QAAQ,GAAG,cAAc,OAAO,eAAe,OAAO,GACjE,KAAK,CAAC,CAAC,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,EAChC,gBAAgB,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAA;IAExC,IAAI,cAAc;QAAE,MAAM,IAAI,sBAAsB,cAAc,CAAC,WAAW,EAAE,EAAE,CAAA;IAClF,IAAI,SAAS;QAAE,MAAM,IAAI,iBAAiB,SAAS,CAAC,WAAW,EAAE,EAAE,CAAA;IACnE,IAAI,SAAS;QAAE,MAAM,IAAI,iBAAiB,SAAS,EAAE,CAAA;IACrD,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,OAAO,GAAG,cAAc,CAAA;QAC5B,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;gBAC3C,MAAM,IAAI,KAAK,CACb,qHAAqH,QAAQ,EAAE,CAChI,CAAA;YACH,OAAO,IAAI,OAAO,QAAQ,EAAE,CAAA;QAC9B,CAAC;QACD,MAAM,IAAI,OAAO,CAAA;IACnB,CAAC;IAED,OAAO,GAAG,MAAM,KAAK,MAAM,EAAE,CAAA;AAC/B,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts
new file mode 100644
index 0000000..1fa5b62
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts
@@ -0,0 +1,160 @@
+/**
+ * A namespaced identifier in the format `${namespace}:${reference}`.
+ *
+ * Used by {@link IdentifierArray} and {@link IdentifierRecord}.
+ *
+ * @group Identifier
+ */
+export type IdentifierString = `${string}:${string}`;
+/**
+ * A read-only array of namespaced identifiers in the format `${namespace}:${reference}`.
+ *
+ * Used by {@link Wallet.chains | Wallet::chains}, {@link WalletAccount.chains | WalletAccount::chains}, and
+ * {@link WalletAccount.features | WalletAccount::features}.
+ *
+ * @group Identifier
+ */
+export type IdentifierArray = readonly IdentifierString[];
+/**
+ * Version of the Wallet Standard implemented by a {@link Wallet}.
+ *
+ * Used by {@link Wallet.version | Wallet::version}.
+ *
+ * Note that this is _NOT_ a version of the Wallet, but a version of the Wallet Standard itself that the Wallet
+ * supports.
+ *
+ * This may be used by the app to determine compatibility and feature detect.
+ *
+ * @group Wallet
+ */
+export type WalletVersion = '1.0.0';
+/**
+ * A data URI containing a base64-encoded SVG, WebP, PNG, or GIF image.
+ *
+ * Used by {@link Wallet.icon | Wallet::icon} and {@link WalletAccount.icon | WalletAccount::icon}.
+ *
+ * @group Wallet
+ */
+export type WalletIcon = `data:image/${'svg+xml' | 'webp' | 'png' | 'gif'};base64,${string}`;
+/**
+ * Interface of a **WalletAccount**, also referred to as an **Account**.
+ *
+ * An account is a _read-only data object_ that is provided from the Wallet to the app, authorizing the app to use it.
+ *
+ * The app can use an account to display and query information from a chain.
+ *
+ * The app can also act using an account by passing it to {@link Wallet.features | features} of the Wallet.
+ *
+ * Wallets may use or extend {@link "@wallet-standard/wallet".ReadonlyWalletAccount} which implements this interface.
+ *
+ * @group Wallet
+ */
+export interface WalletAccount {
+ /** Address of the account, corresponding with a public key. */
+ readonly address: string;
+ /** Public key of the account, corresponding with a secret key to use. */
+ readonly publicKey: Uint8Array;
+ /**
+ * Chains supported by the account.
+ *
+ * This must be a subset of the {@link Wallet.chains | chains} of the Wallet.
+ */
+ readonly chains: IdentifierArray;
+ /**
+ * Feature names supported by the account.
+ *
+ * This must be a subset of the names of {@link Wallet.features | features} of the Wallet.
+ */
+ readonly features: IdentifierArray;
+ /** Optional user-friendly descriptive label or name for the account. This may be displayed by the app. */
+ readonly label?: string;
+ /** Optional user-friendly icon for the account. This may be displayed by the app. */
+ readonly icon?: WalletIcon;
+}
+/** Input for signing in. */
+export interface SolanaSignInInput {
+ /**
+ * Optional EIP-4361 Domain.
+ * If not provided, the wallet must determine the Domain to include in the message.
+ */
+ readonly domain?: string;
+ /**
+ * Optional EIP-4361 Address.
+ * If not provided, the wallet must determine the Address to include in the message.
+ */
+ readonly address?: string;
+ /**
+ * Optional EIP-4361 Statement.
+ * If not provided, the wallet must not include Statement in the message.
+ */
+ readonly statement?: string;
+ /**
+ * Optional EIP-4361 URI.
+ * If not provided, the wallet must not include URI in the message.
+ */
+ readonly uri?: string;
+ /**
+ * Optional EIP-4361 Version.
+ * If not provided, the wallet must not include Version in the message.
+ */
+ readonly version?: string;
+ /**
+ * Optional EIP-4361 Chain ID.
+ * If not provided, the wallet must not include Chain ID in the message.
+ */
+ readonly chainId?: string;
+ /**
+ * Optional EIP-4361 Nonce.
+ * If not provided, the wallet must not include Nonce in the message.
+ */
+ readonly nonce?: string;
+ /**
+ * Optional EIP-4361 Issued At.
+ * If not provided, the wallet must not include Issued At in the message.
+ */
+ readonly issuedAt?: string;
+ /**
+ * Optional EIP-4361 Expiration Time.
+ * If not provided, the wallet must not include Expiration Time in the message.
+ */
+ readonly expirationTime?: string;
+ /**
+ * Optional EIP-4361 Not Before.
+ * If not provided, the wallet must not include Not Before in the message.
+ */
+ readonly notBefore?: string;
+ /**
+ * Optional EIP-4361 Request ID.
+ * If not provided, the wallet must not include Request ID in the message.
+ */
+ readonly requestId?: string;
+ /**
+ * Optional EIP-4361 Resources.
+ * If not provided, the wallet must not include Resources in the message.
+ */
+ readonly resources?: readonly string[];
+}
+/** Output of signing in. */
+export interface SolanaSignInOutput {
+ /**
+ * Account that was signed in.
+ * The address of the account may be different from the provided input Address.
+ */
+ readonly account: WalletAccount;
+ /**
+ * Message bytes that were signed.
+ * The wallet may prefix or otherwise modify the message before signing it.
+ */
+ readonly signedMessage: Uint8Array;
+ /**
+ * Message signature produced.
+ * If the signature type is provided, the signature must be Ed25519.
+ */
+ readonly signature: Uint8Array;
+ /**
+ * Optional type of the message signature produced.
+ * If not provided, the signature must be Ed25519.
+ */
+ readonly signatureType?: 'ed25519';
+}
+//# sourceMappingURL=solana.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map
new file mode 100644
index 0000000..447112c
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../../../src/lib/web3/solana.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAA;AAEpD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,gBAAgB,EAAE,CAAA;AAEzD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAA;AAEnC;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,WAAW,MAAM,EAAE,CAAA;AAE5F;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAA;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;IAElC,0GAA0G;IAC1G,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEvB,qFAAqF;IACrF,QAAQ,CA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/main/lib/web3/solana.js
new file mode 100644
index 0000000..c13c785
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js
@@ -0,0 +1,4 @@
+"use strict";
+// types copied over from @solana/wallet-standard-features and @wallet-standard/base so this library doesn't depend on them
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=solana.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map
new file mode 100644
index 0000000..4e2a29a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../src/lib/web3/solana.ts"],"names":[],"mappings":";AAAA,2HAA2H"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts
new file mode 100644
index 0000000..a0fd0d8
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts
@@ -0,0 +1,276 @@
+import GoTrueClient from '../GoTrueClient';
+import { AuthError } from './errors';
+import { AuthMFAEnrollWebauthnResponse, AuthMFAVerifyResponse, AuthMFAVerifyResponseData, MFAChallengeWebauthnParams, MFAEnrollWebauthnParams, MFAVerifyWebauthnParamFields, MFAVerifyWebauthnParams, RequestResult, StrictOmit } from './types';
+import type { AuthenticationCredential, AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsFuture, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsFuture, PublicKeyCredentialRequestOptionsJSON, RegistrationCredential, RegistrationResponseJSON } from './webauthn.dom';
+import { identifyAuthenticationError, identifyRegistrationError, isWebAuthnError, WebAuthnError } from './webauthn.errors';
+export { WebAuthnError, isWebAuthnError, identifyRegistrationError, identifyAuthenticationError };
+export type { RegistrationResponseJSON, AuthenticationResponseJSON };
+/**
+ * WebAuthn abort service to manage ceremony cancellation.
+ * Ensures only one WebAuthn ceremony is active at a time to prevent "operation already in progress" errors.
+ *
+ * @experimental This class is experimental and may change in future releases
+ * @see {@link https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability W3C WebAuthn Spec - Aborting Ceremonies}
+ */
+export declare class WebAuthnAbortService {
+ private controller;
+ /**
+ * Create an abort signal for a new WebAuthn operation.
+ * Automatically cancels any existing operation.
+ *
+ * @returns {AbortSignal} Signal to pass to navigator.credentials.create() or .get()
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal MDN - AbortSignal}
+ */
+ createNewAbortSignal(): AbortSignal;
+ /**
+ * Manually cancel the current WebAuthn operation.
+ * Useful for cleaning up when user cancels or navigates away.
+ *
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort MDN - AbortController.abort}
+ */
+ cancelCeremony(): void;
+}
+/**
+ * Singleton instance to ensure only one WebAuthn ceremony is active at a time.
+ * This prevents "operation already in progress" errors when retrying WebAuthn operations.
+ *
+ * @experimental This instance is experimental and may change in future releases
+ */
+export declare const webAuthnAbortService: WebAuthnAbortService;
+/**
+ * Server response format for WebAuthn credential creation options.
+ * Uses W3C standard JSON format with base64url-encoded binary fields.
+ */
+export type ServerCredentialCreationOptions = PublicKeyCredentialCreationOptionsJSON;
+/**
+ * Server response format for WebAuthn credential request options.
+ * Uses W3C standard JSON format with base64url-encoded binary fields.
+ */
+export type ServerCredentialRequestOptions = PublicKeyCredentialRequestOptionsJSON;
+/**
+ * Convert base64url encoded strings in WebAuthn credential creation options to ArrayBuffers
+ * as required by the WebAuthn browser API.
+ * Supports both native WebAuthn Level 3 parseCreationOptionsFromJSON and manual fallback.
+ *
+ * @param {ServerCredentialCreationOptions} options - JSON options from server with base64url encoded fields
+ * @returns {PublicKeyCredentialCreationOptionsFuture} Options ready for navigator.credentials.create()
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseCreationOptionsFromJSON W3C WebAuthn Spec - parseCreationOptionsFromJSON}
+ */
+export declare function deserializeCredentialCreationOptions(options: ServerCredentialCreationOptions): PublicKeyCredentialCreationOptionsFuture;
+/**
+ * Convert base64url encoded strings in WebAuthn credential request options to ArrayBuffers
+ * as required by the WebAuthn browser API.
+ * Supports both native WebAuthn Level 3 parseRequestOptionsFromJSON and manual fallback.
+ *
+ * @param {ServerCredentialRequestOptions} options - JSON options from server with base64url encoded fields
+ * @returns {PublicKeyCredentialRequestOptionsFuture} Options ready for navigator.credentials.get()
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseRequestOptionsFromJSON W3C WebAuthn Spec - parseRequestOptionsFromJSON}
+ */
+export declare function deserializeCredentialRequestOptions(options: ServerCredentialRequestOptions): PublicKeyCredentialRequestOptionsFuture;
+/**
+ * Server format for credential response with base64url-encoded binary fields
+ * Can be either a registration or authentication response
+ */
+export type ServerCredentialResponse = RegistrationResponseJSON | AuthenticationResponseJSON;
+/**
+ * Convert a registration/enrollment credential response to server format.
+ * Serializes binary fields to base64url for JSON transmission.
+ * Supports both native WebAuthn Level 3 toJSON and manual fallback.
+ *
+ * @param {RegistrationCredential} credential - Credential from navigator.credentials.create()
+ * @returns {RegistrationResponseJSON} JSON-serializable credential for server
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-tojson W3C WebAuthn Spec - toJSON}
+ */
+export declare function serializeCredentialCreationResponse(credential: RegistrationCredential): RegistrationResponseJSON;
+/**
+ * Convert an authentication/verification credential response to server format.
+ * Serializes binary fields to base64url for JSON transmission.
+ * Supports both native WebAuthn Level 3 toJSON and manual fallback.
+ *
+ * @param {AuthenticationCredential} credential - Credential from navigator.credentials.get()
+ * @returns {AuthenticationResponseJSON} JSON-serializable credential for server
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-tojson W3C WebAuthn Spec - toJSON}
+ */
+export declare function serializeCredentialRequestResponse(credential: AuthenticationCredential): AuthenticationResponseJSON;
+/**
+ * A simple test to determine if a hostname is a properly-formatted domain name.
+ * Considers localhost valid for development environments.
+ *
+ * A "valid domain" is defined here: https://url.spec.whatwg.org/#valid-domain
+ *
+ * Regex sourced from here:
+ * https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html
+ *
+ * @param {string} hostname - The hostname to validate
+ * @returns {boolean} True if valid domain or localhost
+ * @see {@link https://url.spec.whatwg.org/#valid-domain WHATWG URL Spec - Valid Domain}
+ */
+export declare function isValidDomain(hostname: string): boolean;
+/**
+ * Create a WebAuthn credential using the browser's credentials API.
+ * Wraps navigator.credentials.create() with error handling.
+ *
+ * @param {CredentialCreationOptions} options - Options including publicKey parameters
+ * @returns {Promise>} Created credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-createCredential W3C WebAuthn Spec - Create Credential}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create MDN - credentials.create}
+ */
+export declare function createCredential(options: StrictOmit & {
+ publicKey: PublicKeyCredentialCreationOptionsFuture;
+}): Promise>;
+/**
+ * Get a WebAuthn credential using the browser's credentials API.
+ * Wraps navigator.credentials.get() with error handling.
+ *
+ * @param {CredentialRequestOptions} options - Options including publicKey parameters
+ * @returns {Promise>} Retrieved credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-getAssertion W3C WebAuthn Spec - Get Assertion}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get MDN - credentials.get}
+ */
+export declare function getCredential(options: StrictOmit & {
+ publicKey: PublicKeyCredentialRequestOptionsFuture;
+}): Promise>;
+export declare const DEFAULT_CREATION_OPTIONS: Partial;
+export declare const DEFAULT_REQUEST_OPTIONS: Partial;
+/**
+ * Merges WebAuthn credential creation options with overrides.
+ * Sets sensible defaults for authenticator selection and extensions.
+ *
+ * @param {PublicKeyCredentialCreationOptionsFuture} baseOptions - The base options from the server
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides - Optional overrides to apply
+ * @param {string} friendlyName - Optional friendly name for the credential
+ * @returns {PublicKeyCredentialCreationOptionsFuture} Merged credential creation options
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-authenticatorselectioncriteria W3C WebAuthn Spec - AuthenticatorSelectionCriteria}
+ */
+export declare function mergeCredentialCreationOptions(baseOptions: PublicKeyCredentialCreationOptionsFuture, overrides?: Partial): PublicKeyCredentialCreationOptionsFuture;
+/**
+ * Merges WebAuthn credential request options with overrides.
+ * Sets sensible defaults for user verification and hints.
+ *
+ * @param {PublicKeyCredentialRequestOptionsFuture} baseOptions - The base options from the server
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides - Optional overrides to apply
+ * @returns {PublicKeyCredentialRequestOptionsFuture} Merged credential request options
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialrequestoptions W3C WebAuthn Spec - PublicKeyCredentialRequestOptions}
+ */
+export declare function mergeCredentialRequestOptions(baseOptions: PublicKeyCredentialRequestOptionsFuture, overrides?: Partial): PublicKeyCredentialRequestOptionsFuture;
+/**
+ * WebAuthn API wrapper for Supabase Auth.
+ * Provides methods for enrolling, challenging, verifying, authenticating, and registering WebAuthn credentials.
+ *
+ * @experimental This API is experimental and may change in future releases
+ * @see {@link https://w3c.github.io/webauthn/ W3C WebAuthn Specification}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API MDN - Web Authentication API}
+ */
+export declare class WebAuthnApi {
+ private client;
+ enroll: typeof WebAuthnApi.prototype._enroll;
+ challenge: typeof WebAuthnApi.prototype._challenge;
+ verify: typeof WebAuthnApi.prototype._verify;
+ authenticate: typeof WebAuthnApi.prototype._authenticate;
+ register: typeof WebAuthnApi.prototype._register;
+ constructor(client: GoTrueClient);
+ /**
+ * Enroll a new WebAuthn factor.
+ * Creates an unverified WebAuthn factor that must be verified with a credential.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Omit} params - Enrollment parameters (friendlyName required)
+ * @returns {Promise} Enrolled factor details or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
+ */
+ _enroll(params: Omit): Promise;
+ /**
+ * Challenge for WebAuthn credential creation or authentication.
+ * Combines server challenge with browser credential operations.
+ * Handles both registration (create) and authentication (request) flows.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {MFAChallengeWebauthnParams & { friendlyName?: string; signal?: AbortSignal }} params - Challenge parameters including factorId
+ * @param {Object} overrides - Allows you to override the parameters passed to navigator.credentials
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides.create - Override options for credential creation
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides.request - Override options for credential request
+ * @returns {Promise} Challenge response with credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-credential-creation W3C WebAuthn Spec - Credential Creation}
+ * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying Assertion}
+ */
+ _challenge({ factorId, webauthn, friendlyName, signal, }: MFAChallengeWebauthnParams & {
+ friendlyName?: string;
+ signal?: AbortSignal;
+ }, overrides?: {
+ create?: Partial;
+ request?: never;
+ } | {
+ create?: never;
+ request?: Partial;
+ }): Promise['webauthn'], 'rpId' | 'rpOrigins'>;
+ }, WebAuthnError | AuthError>>;
+ /**
+ * Verify a WebAuthn credential with the server.
+ * Completes the WebAuthn ceremony by sending the credential to the server for verification.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Verification parameters
+ * @param {string} params.challengeId - ID of the challenge being verified
+ * @param {string} params.factorId - ID of the WebAuthn factor
+ * @param {MFAVerifyWebauthnParams['webauthn']} params.webauthn - WebAuthn credential response
+ * @returns {Promise} Verification result with session or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying an Authentication Assertion}
+ * */
+ _verify({ challengeId, factorId, webauthn, }: {
+ challengeId: string;
+ factorId: string;
+ webauthn: MFAVerifyWebauthnParams['webauthn'];
+ }): Promise;
+ /**
+ * Complete WebAuthn authentication flow.
+ * Performs challenge and verification in a single operation for existing credentials.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Authentication parameters
+ * @param {string} params.factorId - ID of the WebAuthn factor to authenticate with
+ * @param {Object} params.webauthn - WebAuthn configuration
+ * @param {string} params.webauthn.rpId - Relying Party ID (defaults to current hostname)
+ * @param {string[]} params.webauthn.rpOrigins - Allowed origins (defaults to current origin)
+ * @param {AbortSignal} params.webauthn.signal - Optional abort signal
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides - Override options for navigator.credentials.get
+ * @returns {Promise>} Authentication result
+ * @see {@link https://w3c.github.io/webauthn/#sctn-authentication W3C WebAuthn Spec - Authentication Ceremony}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialRequestOptions MDN - PublicKeyCredentialRequestOptions}
+ */
+ _authenticate({ factorId, webauthn: { rpId, rpOrigins, signal, }, }: {
+ factorId: string;
+ webauthn?: {
+ rpId?: string;
+ rpOrigins?: string[];
+ signal?: AbortSignal;
+ };
+ }, overrides?: PublicKeyCredentialRequestOptionsFuture): Promise>;
+ /**
+ * Complete WebAuthn registration flow.
+ * Performs enrollment, challenge, and verification in a single operation for new credentials.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Registration parameters
+ * @param {string} params.friendlyName - User-friendly name for the credential
+ * @param {string} params.rpId - Relying Party ID (defaults to current hostname)
+ * @param {string[]} params.rpOrigins - Allowed origins (defaults to current origin)
+ * @param {AbortSignal} params.signal - Optional abort signal
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides - Override options for navigator.credentials.create
+ * @returns {Promise>} Registration result
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registration Ceremony}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions MDN - PublicKeyCredentialCreationOptions}
+ */
+ _register({ friendlyName, webauthn: { rpId, rpOrigins, signal, }, }: {
+ friendlyName: string;
+ webauthn?: {
+ rpId?: string;
+ rpOrigins?: string[];
+ signal?: AbortSignal;
+ };
+ }, overrides?: Partial): Promise>;
+}
+//# sourceMappingURL=webauthn.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map
new file mode 100644
index 0000000..a608276
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.d.ts","sourceRoot":"","sources":["../../../src/lib/webauthn.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,SAAS,EAAiC,MAAM,UAAU,CAAA;AACnE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,aAAa,EACb,UAAU,EACX,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE1B,wCAAwC,EACxC,sCAAsC,EAEtC,uCAAuC,EACvC,qCAAqC,EACrC,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,EACf,aAAa,EAEd,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,CAAA;AAEjG,YAAY,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,CAAA;AAEpE;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,UAAU,CAA6B;IAE/C;;;;;;OAMG;IACH,oBAAoB,IAAI,WAAW;IAanC;;;;;OAKG;IACH,cAAc,IAAI,IAAI;CAQvB;AAED;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AAE,MAAM,EAAE,CAAA;YACpB,MAAM,CAAC,EAAE,WAAW,CAAA;SACrB,CAAA;KACF,EACD,SAAS,CAAC,EAAE,OAAO,CAAC,wCAAwC,CAAC,GAC5D,OAAO,CAAC,aAAa,CAAC,yBAAyB,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC;CAwEhF"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts
new file mode 100644
index 0000000..ff0410f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts
@@ -0,0 +1,583 @@
+import { StrictOmit } from './types';
+/**
+ * A variant of PublicKeyCredentialCreationOptions suitable for JSON transmission to the browser to
+ * (eventually) get passed into navigator.credentials.create(...) in the browser.
+ *
+ * This should eventually get replaced with official TypeScript DOM types when WebAuthn Level 3 types
+ * eventually make it into the language:
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsjson W3C WebAuthn Spec - PublicKeyCredentialCreationOptionsJSON}
+ */
+export interface PublicKeyCredentialCreationOptionsJSON {
+ /**
+ * Information about the Relying Party responsible for the request.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-rp W3C - rp}
+ */
+ rp: PublicKeyCredentialRpEntity;
+ /**
+ * Information about the user account for which the credential is being created.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-user W3C - user}
+ */
+ user: PublicKeyCredentialUserEntityJSON;
+ /**
+ * A server-generated challenge in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-challenge W3C - challenge}
+ */
+ challenge: Base64URLString;
+ /**
+ * Information about desired properties of the credential to be created.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-pubkeycredparams W3C - pubKeyCredParams}
+ */
+ pubKeyCredParams: PublicKeyCredentialParameters[];
+ /**
+ * Time in milliseconds that the caller is willing to wait for the operation to complete.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-timeout W3C - timeout}
+ */
+ timeout?: number;
+ /**
+ * Credentials that the authenticator should not create a new credential for.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-excludecredentials W3C - excludeCredentials}
+ */
+ excludeCredentials?: PublicKeyCredentialDescriptorJSON[];
+ /**
+ * Criteria for authenticator selection.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-authenticatorselection W3C - authenticatorSelection}
+ */
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
+ /**
+ * Hints about what types of authenticators the user might want to use.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-hints W3C - hints}
+ */
+ hints?: PublicKeyCredentialHint[];
+ /**
+ * How the attestation statement should be transported.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-attestation W3C - attestation}
+ */
+ attestation?: AttestationConveyancePreference;
+ /**
+ * The attestation statement formats that the Relying Party will accept.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-attestationformats W3C - attestationFormats}
+ */
+ attestationFormats?: AttestationFormat[];
+ /**
+ * Additional parameters requesting additional processing by the client and authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-extensions W3C - extensions}
+ */
+ extensions?: AuthenticationExtensionsClientInputs;
+}
+/**
+ * A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
+ * (eventually) get passed into navigator.credentials.get(...) in the browser.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialrequestoptionsjson W3C WebAuthn Spec - PublicKeyCredentialRequestOptionsJSON}
+ */
+export interface PublicKeyCredentialRequestOptionsJSON {
+ /**
+ * A server-generated challenge in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-challenge W3C - challenge}
+ */
+ challenge: Base64URLString;
+ /**
+ * Time in milliseconds that the caller is willing to wait for the operation to complete.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-timeout W3C - timeout}
+ */
+ timeout?: number;
+ /**
+ * The relying party identifier claimed by the caller.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-rpid W3C - rpId}
+ */
+ rpId?: string;
+ /**
+ * A list of credentials acceptable for authentication.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-allowcredentials W3C - allowCredentials}
+ */
+ allowCredentials?: PublicKeyCredentialDescriptorJSON[];
+ /**
+ * Whether user verification should be performed by the authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-userverification W3C - userVerification}
+ */
+ userVerification?: UserVerificationRequirement;
+ /**
+ * Hints about what types of authenticators the user might want to use.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-hints W3C - hints}
+ */
+ hints?: PublicKeyCredentialHint[];
+ /**
+ * Additional parameters requesting additional processing by the client and authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-extensions W3C - extensions}
+ */
+ extensions?: AuthenticationExtensionsClientInputs;
+}
+/**
+ * Represents a public key credential descriptor in JSON format.
+ * Used to identify credentials for exclusion or allowance during WebAuthn ceremonies.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson W3C WebAuthn Spec - PublicKeyCredentialDescriptorJSON}
+ */
+export interface PublicKeyCredentialDescriptorJSON {
+ /**
+ * The credential ID in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialdescriptor-id W3C - id}
+ */
+ id: Base64URLString;
+ /**
+ * The type of the public key credential (always "public-key").
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialdescriptor-type W3C - type}
+ */
+ type: PublicKeyCredentialType;
+ /**
+ * How the authenticator communicates with clients.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialdescriptor-transports W3C - transports}
+ */
+ transports?: AuthenticatorTransportFuture[];
+}
+/**
+ * Represents user account information in JSON format for WebAuthn registration.
+ * Contains identifiers and display information for the user being registered.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson W3C WebAuthn Spec - PublicKeyCredentialUserEntityJSON}
+ */
+export interface PublicKeyCredentialUserEntityJSON {
+ /**
+ * A unique identifier for the user account (base64url encoded).
+ * Maximum 64 bytes. Should not contain PII.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-id W3C - user.id}
+ */
+ id: string;
+ /**
+ * A human-readable identifier for the account (e.g., email, username).
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name W3C - user.name}
+ */
+ name: string;
+ /**
+ * A human-friendly display name for the user (e.g., "John Doe").
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname W3C - user.displayName}
+ */
+ displayName: string;
+}
+/**
+ * Represents user account information for WebAuthn registration with binary data.
+ * Contains identifiers and display information for the user being registered.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentity W3C WebAuthn Spec - PublicKeyCredentialUserEntity}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialUserEntity MDN - PublicKeyCredentialUserEntity}
+ */
+export interface PublicKeyCredentialUserEntity {
+ /**
+ * A unique identifier for the user account.
+ * Maximum 64 bytes. Should not contain PII.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-id W3C - user.id}
+ */
+ id: BufferSource;
+ /**
+ * A human-readable identifier for the account.
+ * Typically an email, username, or phone number.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name W3C - user.name}
+ */
+ name: string;
+ /**
+ * A human-friendly display name for the user.
+ * Example: "John Doe"
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname W3C - user.displayName}
+ */
+ displayName: string;
+}
+/**
+ * The credential returned from navigator.credentials.create() during WebAuthn registration.
+ * Contains the new credential's public key and attestation information.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#registrationceremony W3C WebAuthn Spec - Registration}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential MDN - PublicKeyCredential}
+ */
+export interface RegistrationCredential extends PublicKeyCredentialFuture {
+ response: AuthenticatorAttestationResponseFuture;
+}
+/**
+ * A slightly-modified RegistrationCredential to simplify working with ArrayBuffers that
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-registrationresponsejson W3C WebAuthn Spec - RegistrationResponseJSON}
+ */
+export interface RegistrationResponseJSON {
+ /**
+ * The credential ID (same as rawId for JSON).
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-id W3C - id}
+ */
+ id: Base64URLString;
+ /**
+ * The raw credential ID in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-rawid W3C - rawId}
+ */
+ rawId: Base64URLString;
+ /**
+ * The authenticator's response to the client's request to create a credential.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-response W3C - response}
+ */
+ response: AuthenticatorAttestationResponseJSON;
+ /**
+ * The authenticator attachment modality in effect at the time of credential creation.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-authenticatorattachment W3C - authenticatorAttachment}
+ */
+ authenticatorAttachment?: AuthenticatorAttachment;
+ /**
+ * The results of processing client extensions.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-getclientextensionresults W3C - getClientExtensionResults}
+ */
+ clientExtensionResults: AuthenticationExtensionsClientOutputs;
+ /**
+ * The type of the credential (always "public-key").
+ * @see {@link https://w3c.github.io/webauthn/#dom-credential-type W3C - type}
+ */
+ type: PublicKeyCredentialType;
+}
+/**
+ * The credential returned from navigator.credentials.get() during WebAuthn authentication.
+ * Contains the assertion signature proving possession of the private key.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#authentication W3C WebAuthn Spec - Authentication}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential MDN - PublicKeyCredential}
+ */
+export interface AuthenticationCredential extends PublicKeyCredentialFuture {
+ response: AuthenticatorAssertionResponse;
+}
+/**
+ * A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson W3C WebAuthn Spec - AuthenticationResponseJSON}
+ */
+export interface AuthenticationResponseJSON {
+ /**
+ * The credential ID (same as rawId for JSON).
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-id W3C - id}
+ */
+ id: Base64URLString;
+ /**
+ * The raw credential ID in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-rawid W3C - rawId}
+ */
+ rawId: Base64URLString;
+ /**
+ * The authenticator's response to the client's request to authenticate.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-response W3C - response}
+ */
+ response: AuthenticatorAssertionResponseJSON;
+ /**
+ * The authenticator attachment modality in effect at the time of authentication.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-authenticatorattachment W3C - authenticatorAttachment}
+ */
+ authenticatorAttachment?: AuthenticatorAttachment;
+ /**
+ * The results of processing client extensions.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-getclientextensionresults W3C - getClientExtensionResults}
+ */
+ clientExtensionResults: AuthenticationExtensionsClientOutputs;
+ /**
+ * The type of the credential (always "public-key").
+ * @see {@link https://w3c.github.io/webauthn/#dom-credential-type W3C - type}
+ */
+ type: PublicKeyCredentialType;
+}
+/**
+ * A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-authenticatorattestationresponsejson W3C WebAuthn Spec - AuthenticatorAttestationResponseJSON}
+ */
+export interface AuthenticatorAttestationResponseJSON {
+ /**
+ * JSON-serialized client data passed to the authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson W3C - clientDataJSON}
+ */
+ clientDataJSON: Base64URLString;
+ /**
+ * The attestation object in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-attestationobject W3C - attestationObject}
+ */
+ attestationObject: Base64URLString;
+ /**
+ * The authenticator data contained within the attestation object.
+ * Optional in L2, but becomes required in L3. Play it safe until L3 becomes Recommendation
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-getauthenticatordata W3C - getAuthenticatorData}
+ */
+ authenticatorData?: Base64URLString;
+ /**
+ * The transports that the authenticator supports.
+ * Optional in L2, but becomes required in L3. Play it safe until L3 becomes Recommendation
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-gettransports W3C - getTransports}
+ */
+ transports?: AuthenticatorTransportFuture[];
+ /**
+ * The COSEAlgorithmIdentifier for the public key.
+ * Optional in L2, but becomes required in L3. Play it safe until L3 becomes Recommendation
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-getpublickeyalgorithm W3C - getPublicKeyAlgorithm}
+ */
+ publicKeyAlgorithm?: COSEAlgorithmIdentifier;
+ /**
+ * The public key in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-getpublickey W3C - getPublicKey}
+ */
+ publicKey?: Base64URLString;
+}
+/**
+ * A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
+ * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson W3C WebAuthn Spec - AuthenticatorAssertionResponseJSON}
+ */
+export interface AuthenticatorAssertionResponseJSON {
+ /**
+ * JSON-serialized client data passed to the authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorresponse-clientdatajson W3C - clientDataJSON}
+ */
+ clientDataJSON: Base64URLString;
+ /**
+ * The authenticator data returned by the authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorassertionresponse-authenticatordata W3C - authenticatorData}
+ */
+ authenticatorData: Base64URLString;
+ /**
+ * The signature generated by the authenticator.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorassertionresponse-signature W3C - signature}
+ */
+ signature: Base64URLString;
+ /**
+ * The user handle returned by the authenticator, if any.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorassertionresponse-userhandle W3C - userHandle}
+ */
+ userHandle?: Base64URLString;
+}
+/**
+ * Public key credential information needed to verify authentication responses.
+ * Stores the credential's public key and metadata for server-side verification.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#sctn-credential-storage-modality W3C WebAuthn Spec - Credential Storage}
+ */
+export type WebAuthnCredential = {
+ /**
+ * The credential ID in base64url format.
+ * @see {@link https://w3c.github.io/webauthn/#credential-id W3C - Credential ID}
+ */
+ id: Base64URLString;
+ /**
+ * The credential's public key.
+ * @see {@link https://w3c.github.io/webauthn/#credential-public-key W3C - Credential Public Key}
+ */
+ publicKey: Uint8Array_;
+ /**
+ * Number of times this authenticator is expected to have been used.
+ * @see {@link https://w3c.github.io/webauthn/#signature-counter W3C - Signature Counter}
+ */
+ counter: number;
+ /**
+ * The transports that the authenticator supports.
+ * From browser's `startRegistration()` -> RegistrationCredentialJSON.transports (API L2 and up)
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-gettransports W3C - getTransports}
+ */
+ transports?: AuthenticatorTransportFuture[];
+};
+/**
+ * An attempt to communicate that this isn't just any string, but a Base64URL-encoded string.
+ * Base64URL encoding is used throughout WebAuthn for binary data transmission.
+ *
+ * @see {@link https://datatracker.ietf.org/doc/html/rfc4648#section-5 RFC 4648 - Base64URL Encoding}
+ */
+export type Base64URLString = string;
+/**
+ * AuthenticatorAttestationResponse in TypeScript's DOM lib is outdated (up through v3.9.7).
+ * Maintain an augmented version here so we can implement additional properties as the WebAuthn
+ * spec evolves.
+ *
+ * Properties marked optional are not supported in all browsers.
+ *
+ * @see {@link https://www.w3.org/TR/webauthn-2/#iface-authenticatorattestationresponse W3C WebAuthn Spec - AuthenticatorAttestationResponse}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse MDN - AuthenticatorAttestationResponse}
+ */
+export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
+ /**
+ * Returns the transports that the authenticator supports.
+ * @see {@link https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-gettransports W3C - getTransports}
+ */
+ getTransports(): AuthenticatorTransportFuture[];
+}
+/**
+ * A super class of TypeScript's `AuthenticatorTransport` that includes support for the latest
+ * transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
+ * know about it (sometime after 4.6.3)
+ *
+ * @see {@link https://w3c.github.io/webauthn/#enum-transport W3C WebAuthn Spec - AuthenticatorTransport}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/getTransports MDN - getTransports}
+ */
+export type AuthenticatorTransportFuture = 'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb';
+/**
+ * A super class of TypeScript's `PublicKeyCredentialDescriptor` that knows about the latest
+ * transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
+ * know about it (sometime after 4.6.3)
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptor W3C WebAuthn Spec - PublicKeyCredentialDescriptor}
+ */
+export interface PublicKeyCredentialDescriptorFuture extends Omit {
+ /**
+ * How the authenticator communicates with clients.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialdescriptor-transports W3C - transports}
+ */
+ transports?: AuthenticatorTransportFuture[];
+}
+/**
+ * Enhanced PublicKeyCredentialCreationOptions that knows about the latest features.
+ * Used for WebAuthn registration ceremonies.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptions W3C WebAuthn Spec - PublicKeyCredentialCreationOptions}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions MDN - PublicKeyCredentialCreationOptions}
+ */
+export interface PublicKeyCredentialCreationOptionsFuture extends StrictOmit {
+ /**
+ * Credentials that the authenticator should not create a new credential for.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-excludecredentials W3C - excludeCredentials}
+ */
+ excludeCredentials?: PublicKeyCredentialDescriptorFuture[];
+ /**
+ * Information about the user account for which the credential is being created.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-user W3C - user}
+ */
+ user: PublicKeyCredentialUserEntity;
+ /**
+ * Hints about what types of authenticators the user might want to use.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-hints W3C - hints}
+ */
+ hints?: PublicKeyCredentialHint[];
+ /**
+ * Criteria for authenticator selection.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-authenticatorselection W3C - authenticatorSelection}
+ */
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
+ /**
+ * Information about desired properties of the credential to be created.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-pubkeycredparams W3C - pubKeyCredParams}
+ */
+ pubKeyCredParams: PublicKeyCredentialParameters[];
+ /**
+ * Information about the Relying Party responsible for the request.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-rp W3C - rp}
+ */
+ rp: PublicKeyCredentialRpEntity;
+}
+/**
+ * Enhanced PublicKeyCredentialRequestOptions that knows about the latest features.
+ * Used for WebAuthn authentication ceremonies.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialrequestoptions W3C WebAuthn Spec - PublicKeyCredentialRequestOptions}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialRequestOptions MDN - PublicKeyCredentialRequestOptions}
+ */
+export interface PublicKeyCredentialRequestOptionsFuture extends StrictOmit {
+ /**
+ * A list of credentials acceptable for authentication.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-allowcredentials W3C - allowCredentials}
+ */
+ allowCredentials?: PublicKeyCredentialDescriptorFuture[];
+ /**
+ * Hints about what types of authenticators the user might want to use.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialrequestoptions-hints W3C - hints}
+ */
+ hints?: PublicKeyCredentialHint[];
+ /**
+ * The attestation conveyance preference for the authentication ceremony.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredentialcreationoptions-attestation W3C - attestation}
+ */
+ attestation?: AttestationConveyancePreference;
+}
+/**
+ * Union type for all WebAuthn credential responses in JSON format.
+ * Can be either a registration response (for new credentials) or authentication response (for existing credentials).
+ */
+export type PublicKeyCredentialJSON = RegistrationResponseJSON | AuthenticationResponseJSON;
+/**
+ * A super class of TypeScript's `PublicKeyCredential` that knows about upcoming WebAuthn features.
+ * Includes WebAuthn Level 3 methods for JSON serialization and parsing.
+ *
+ * @see {@link https://w3c.github.io/webauthn/#publickeycredential W3C WebAuthn Spec - PublicKeyCredential}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential MDN - PublicKeyCredential}
+ */
+export interface PublicKeyCredentialFuture extends PublicKeyCredential {
+ /**
+ * The type of the credential (always "public-key").
+ * @see {@link https://w3c.github.io/webauthn/#dom-credential-type W3C - type}
+ */
+ type: PublicKeyCredentialType;
+ /**
+ * Checks if conditional mediation is available.
+ * @see {@link https://github.com/w3c/webauthn/issues/1745 GitHub - Conditional Mediation}
+ */
+ isConditionalMediationAvailable?(): Promise;
+ /**
+ * Parses JSON to create PublicKeyCredentialCreationOptions.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseCreationOptionsFromJSON W3C - parseCreationOptionsFromJSON}
+ */
+ parseCreationOptionsFromJSON(options: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptionsFuture;
+ /**
+ * Parses JSON to create PublicKeyCredentialRequestOptions.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseRequestOptionsFromJSON W3C - parseRequestOptionsFromJSON}
+ */
+ parseRequestOptionsFromJSON(options: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptionsFuture;
+ /**
+ * Serializes the credential to JSON format.
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-tojson W3C - toJSON}
+ */
+ toJSON(): T;
+}
+/**
+ * The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data:
+ * - `"singleDevice"` credentials will never be backed up
+ * - `"multiDevice"` credentials can be backed up
+ *
+ * @see {@link https://w3c.github.io/webauthn/#sctn-authenticator-data W3C WebAuthn Spec - Authenticator Data}
+ */
+export type CredentialDeviceType = 'singleDevice' | 'multiDevice';
+/**
+ * Categories of authenticators that Relying Parties can pass along to browsers during
+ * registration. Browsers that understand these values can optimize their modal experience to
+ * start the user off in a particular registration flow:
+ *
+ * - `hybrid`: A platform authenticator on a mobile device
+ * - `security-key`: A portable FIDO2 authenticator capable of being used on multiple devices via a USB or NFC connection
+ * - `client-device`: The device that WebAuthn is being called on. Typically synonymous with platform authenticators
+ *
+ * These values are less strict than `authenticatorAttachment`
+ *
+ * @see {@link https://w3c.github.io/webauthn/#enumdef-publickeycredentialhint W3C WebAuthn Spec - PublicKeyCredentialHint}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions#hints MDN - hints}
+ */
+export type PublicKeyCredentialHint = 'hybrid' | 'security-key' | 'client-device';
+/**
+ * Values for an attestation object's `fmt`.
+ * Defines the format of the attestation statement from the authenticator.
+ *
+ * @see {@link https://www.iana.org/assignments/webauthn/webauthn.xhtml#webauthn-attestation-statement-format-ids IANA - WebAuthn Attestation Statement Format Identifiers}
+ * @see {@link https://w3c.github.io/webauthn/#sctn-attestation-formats W3C WebAuthn Spec - Attestation Statement Formats}
+ */
+export type AttestationFormat = 'fido-u2f' | 'packed' | 'android-safetynet' | 'android-key' | 'tpm' | 'apple' | 'none';
+/**
+ * Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array` in TypeScript 5.7
+ * and beyond.
+ *
+ * **Context**
+ *
+ * `Uint8Array` became a generic type in TypeScript 5.7, requiring types defined simply as
+ * `Uint8Array` to be refactored to `Uint8Array` starting in Deno 2.2. `Uint8Array` is
+ * _not_ generic in Deno 2.1.x and earlier, though, so this type helps bridge this gap.
+ *
+ * Inspired by Deno's std library:
+ *
+ * https://github.com/denoland/std/blob/b5a5fe4f96b91c1fe8dba5cc0270092dd11d3287/bytes/_types.ts#L11
+ */
+export type Uint8Array_ = ReturnType;
+/**
+ * Specifies the preferred authenticator attachment modality.
+ * - `platform`: A platform authenticator attached to the client device (e.g., Touch ID, Windows Hello)
+ * - `cross-platform`: A roaming authenticator not attached to the client device (e.g., USB security key)
+ *
+ * @see {@link https://w3c.github.io/webauthn/#enum-attachment W3C WebAuthn Spec - AuthenticatorAttachment}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions/authenticatorSelection#authenticatorattachment MDN - authenticatorAttachment}
+ */
+export type AuthenticatorAttachment = 'cross-platform' | 'platform';
+//# sourceMappingURL=webauthn.dom.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map
new file mode 100644
index 0000000..d9d3aeb
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.dom.d.ts","sourceRoot":"","sources":["../../../src/lib/webauthn.dom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,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AAE,qCAAqC,GAC7C,uCAAuC,CAAA;IAC1C;;;OAGG;IACH,MAAM,IAAI,CAAC,CAAA;CACZ;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,aAAa,CAAA;AAEjE;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAA;AAEjF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GACzB,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,KAAK,GACL,OAAO,GACP,MAAM,CAAA;AAEV;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;AAEzD;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,UAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js
new file mode 100644
index 0000000..9d4c49a
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js
@@ -0,0 +1,4 @@
+"use strict";
+// from https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/browser/src/types/index.ts
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=webauthn.dom.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map
new file mode 100644
index 0000000..d0f8a73
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.dom.js","sourceRoot":"","sources":["../../../src/lib/webauthn.dom.ts"],"names":[],"mappings":";AAAA,oGAAoG"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts
new file mode 100644
index 0000000..5fe8218
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts
@@ -0,0 +1,80 @@
+import { StrictOmit } from './types';
+import { PublicKeyCredentialCreationOptionsFuture, PublicKeyCredentialRequestOptionsFuture } from './webauthn.dom';
+/**
+ * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented
+ * errors in the spec was raised after calling `navigator.credentials.create()` or
+ * `navigator.credentials.get()`:
+ *
+ * - `AbortError`
+ * - `ConstraintError`
+ * - `InvalidStateError`
+ * - `NotAllowedError`
+ * - `NotSupportedError`
+ * - `SecurityError`
+ * - `TypeError`
+ * - `UnknownError`
+ *
+ * Error messages were determined through investigation of the spec to determine under which
+ * scenarios a given error would be raised.
+ */
+export declare class WebAuthnError extends Error {
+ code: WebAuthnErrorCode;
+ protected __isWebAuthnError: boolean;
+ constructor({ message, code, cause, name, }: {
+ message: string;
+ code: WebAuthnErrorCode;
+ cause?: Error | unknown;
+ name?: string;
+ });
+}
+/**
+ * Error class for unknown WebAuthn errors.
+ * Wraps unexpected errors that don't match known WebAuthn error conditions.
+ */
+export declare class WebAuthnUnknownError extends WebAuthnError {
+ originalError: unknown;
+ constructor(message: string, originalError: unknown);
+}
+/**
+ * Type guard to check if an error is a WebAuthnError.
+ * @param {unknown} error - The error to check
+ * @returns {boolean} True if the error is a WebAuthnError
+ */
+export declare function isWebAuthnError(error: unknown): error is WebAuthnError;
+/**
+ * Error codes for WebAuthn operations.
+ * These codes provide specific information about why a WebAuthn ceremony failed.
+ * @see {@link https://w3c.github.io/webauthn/#sctn-defined-errors W3C WebAuthn Spec - Defined Errors}
+ */
+export type WebAuthnErrorCode = 'ERROR_CEREMONY_ABORTED' | 'ERROR_INVALID_DOMAIN' | 'ERROR_INVALID_RP_ID' | 'ERROR_INVALID_USER_ID_LENGTH' | 'ERROR_MALFORMED_PUBKEYCREDPARAMS' | 'ERROR_AUTHENTICATOR_GENERAL_ERROR' | 'ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT' | 'ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT' | 'ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED' | 'ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG' | 'ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE' | 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY';
+/**
+ * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.create()`.
+ * Maps browser errors to specific WebAuthn error codes for better debugging.
+ * @param {Object} params - Error identification parameters
+ * @param {Error} params.error - The error thrown by the browser
+ * @param {CredentialCreationOptions} params.options - The options passed to credentials.create()
+ * @returns {WebAuthnError} A WebAuthnError with a specific error code
+ * @see {@link https://w3c.github.io/webauthn/#sctn-createCredential W3C WebAuthn Spec - Create Credential}
+ */
+export declare function identifyRegistrationError({ error, options, }: {
+ error: Error;
+ options: StrictOmit & {
+ publicKey: PublicKeyCredentialCreationOptionsFuture;
+ };
+}): WebAuthnError;
+/**
+ * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.get()`.
+ * Maps browser errors to specific WebAuthn error codes for better debugging.
+ * @param {Object} params - Error identification parameters
+ * @param {Error} params.error - The error thrown by the browser
+ * @param {CredentialRequestOptions} params.options - The options passed to credentials.get()
+ * @returns {WebAuthnError} A WebAuthnError with a specific error code
+ * @see {@link https://w3c.github.io/webauthn/#sctn-getAssertion W3C WebAuthn Spec - Get Assertion}
+ */
+export declare function identifyAuthenticationError({ error, options, }: {
+ error: Error;
+ options: StrictOmit & {
+ publicKey: PublicKeyCredentialRequestOptionsFuture;
+ };
+}): WebAuthnError;
+//# sourceMappingURL=webauthn.errors.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map
new file mode 100644
index 0000000..0c057a6
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.errors.d.ts","sourceRoot":"","sources":["../../../src/lib/webauthn.errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,wCAAwC,EACxC,uCAAuC,EACxC,MAAM,gBAAgB,CAAA;AAEvB;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,IAAI,EAAE,iBAAiB,CAAA;IAEvB,SAAS,CAAC,iBAAiB,UAAO;gBAEtB,EACV,OAAO,EACP,IAAI,EACJ,KAAK,EACL,IAAI,GACL,EAAE;QACD,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,iBAAiB,CAAA;QACvB,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd;CAMF;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,aAAa,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;CASpD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACzB,wBAAwB,GACxB,sBAAsB,GACtB,qBAAqB,GACrB,8BAA8B,GAC9B,kCAAkC,GAClC,mCAAmC,GACnC,6DAA6D,GAC7D,uDAAuD,GACvD,2CAA2C,GAC3C,uDAAuD,GACvD,+CAA+C,GAC/C,sCAAsC,CAAA;AAE1C;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAAE,WAAW,CAAC,GAAG;QAC5D,SAAS,EAAE,wCAAwC,CAAA;KACpD,CAAA;CACF,GAAG,aAAa,CA8HhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAAE,WAAW,CAAC,GAAG;QAC3D,SAAS,EAAE,uCAAuC,CAAA;KACnD,CAAA;CACF,GAAG,aAAa,CA2DhB"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js
new file mode 100644
index 0000000..3987ae5
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js
@@ -0,0 +1,265 @@
+"use strict";
+/* eslint-disable @typescript-eslint/ban-ts-comment */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebAuthnUnknownError = exports.WebAuthnError = void 0;
+exports.isWebAuthnError = isWebAuthnError;
+exports.identifyRegistrationError = identifyRegistrationError;
+exports.identifyAuthenticationError = identifyAuthenticationError;
+const webauthn_1 = require("./webauthn");
+/**
+ * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented
+ * errors in the spec was raised after calling `navigator.credentials.create()` or
+ * `navigator.credentials.get()`:
+ *
+ * - `AbortError`
+ * - `ConstraintError`
+ * - `InvalidStateError`
+ * - `NotAllowedError`
+ * - `NotSupportedError`
+ * - `SecurityError`
+ * - `TypeError`
+ * - `UnknownError`
+ *
+ * Error messages were determined through investigation of the spec to determine under which
+ * scenarios a given error would be raised.
+ */
+class WebAuthnError extends Error {
+ constructor({ message, code, cause, name, }) {
+ var _a;
+ // @ts-ignore: help Rollup understand that `cause` is okay to set
+ super(message, { cause });
+ this.__isWebAuthnError = true;
+ this.name = (_a = name !== null && name !== void 0 ? name : (cause instanceof Error ? cause.name : undefined)) !== null && _a !== void 0 ? _a : 'Unknown Error';
+ this.code = code;
+ }
+}
+exports.WebAuthnError = WebAuthnError;
+/**
+ * Error class for unknown WebAuthn errors.
+ * Wraps unexpected errors that don't match known WebAuthn error conditions.
+ */
+class WebAuthnUnknownError extends WebAuthnError {
+ constructor(message, originalError) {
+ super({
+ code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',
+ cause: originalError,
+ message,
+ });
+ this.name = 'WebAuthnUnknownError';
+ this.originalError = originalError;
+ }
+}
+exports.WebAuthnUnknownError = WebAuthnUnknownError;
+/**
+ * Type guard to check if an error is a WebAuthnError.
+ * @param {unknown} error - The error to check
+ * @returns {boolean} True if the error is a WebAuthnError
+ */
+function isWebAuthnError(error) {
+ return typeof error === 'object' && error !== null && '__isWebAuthnError' in error;
+}
+/**
+ * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.create()`.
+ * Maps browser errors to specific WebAuthn error codes for better debugging.
+ * @param {Object} params - Error identification parameters
+ * @param {Error} params.error - The error thrown by the browser
+ * @param {CredentialCreationOptions} params.options - The options passed to credentials.create()
+ * @returns {WebAuthnError} A WebAuthnError with a specific error code
+ * @see {@link https://w3c.github.io/webauthn/#sctn-createCredential W3C WebAuthn Spec - Create Credential}
+ */
+function identifyRegistrationError({ error, options, }) {
+ var _a, _b, _c;
+ const { publicKey } = options;
+ if (!publicKey) {
+ throw Error('options was missing required publicKey property');
+ }
+ if (error.name === 'AbortError') {
+ if (options.signal instanceof AbortSignal) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)
+ return new WebAuthnError({
+ message: 'Registration ceremony was sent an abort signal',
+ code: 'ERROR_CEREMONY_ABORTED',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'ConstraintError') {
+ if (((_a = publicKey.authenticatorSelection) === null || _a === void 0 ? void 0 : _a.requireResidentKey) === true) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 4)
+ return new WebAuthnError({
+ message: 'Discoverable credentials were required but no available authenticator supported it',
+ code: 'ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT',
+ cause: error,
+ });
+ }
+ else if (
+ // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
+ options.mediation === 'conditional' &&
+ ((_b = publicKey.authenticatorSelection) === null || _b === void 0 ? void 0 : _b.userVerification) === 'required') {
+ // https://w3c.github.io/webauthn/#sctn-createCredential (Step 22.4)
+ return new WebAuthnError({
+ message: 'User verification was required during automatic registration but it could not be performed',
+ code: 'ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE',
+ cause: error,
+ });
+ }
+ else if (((_c = publicKey.authenticatorSelection) === null || _c === void 0 ? void 0 : _c.userVerification) === 'required') {
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 5)
+ return new WebAuthnError({
+ message: 'User verification was required but no available authenticator supported it',
+ code: 'ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'InvalidStateError') {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 20)
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 3)
+ return new WebAuthnError({
+ message: 'The authenticator was previously registered',
+ code: 'ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED',
+ cause: error,
+ });
+ }
+ else if (error.name === 'NotAllowedError') {
+ /**
+ * Pass the error directly through. Platforms are overloading this error beyond what the spec
+ * defines and we don't want to overwrite potentially useful error messages.
+ */
+ return new WebAuthnError({
+ message: error.message,
+ code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',
+ cause: error,
+ });
+ }
+ else if (error.name === 'NotSupportedError') {
+ const validPubKeyCredParams = publicKey.pubKeyCredParams.filter((param) => param.type === 'public-key');
+ if (validPubKeyCredParams.length === 0) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 10)
+ return new WebAuthnError({
+ message: 'No entry in pubKeyCredParams was of type "public-key"',
+ code: 'ERROR_MALFORMED_PUBKEYCREDPARAMS',
+ cause: error,
+ });
+ }
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 2)
+ return new WebAuthnError({
+ message: 'No available authenticator supported any of the specified pubKeyCredParams algorithms',
+ code: 'ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG',
+ cause: error,
+ });
+ }
+ else if (error.name === 'SecurityError') {
+ const effectiveDomain = window.location.hostname;
+ if (!(0, webauthn_1.isValidDomain)(effectiveDomain)) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 7)
+ return new WebAuthnError({
+ message: `${window.location.hostname} is an invalid domain`,
+ code: 'ERROR_INVALID_DOMAIN',
+ cause: error,
+ });
+ }
+ else if (publicKey.rp.id !== effectiveDomain) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 8)
+ return new WebAuthnError({
+ message: `The RP ID "${publicKey.rp.id}" is invalid for this domain`,
+ code: 'ERROR_INVALID_RP_ID',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'TypeError') {
+ if (publicKey.user.id.byteLength < 1 || publicKey.user.id.byteLength > 64) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 5)
+ return new WebAuthnError({
+ message: 'User ID was not between 1 and 64 characters',
+ code: 'ERROR_INVALID_USER_ID_LENGTH',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'UnknownError') {
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 1)
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 8)
+ return new WebAuthnError({
+ message: 'The authenticator was unable to process the specified options, or could not create a new credential',
+ code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',
+ cause: error,
+ });
+ }
+ return new WebAuthnError({
+ message: 'a Non-Webauthn related error has occurred',
+ code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',
+ cause: error,
+ });
+}
+/**
+ * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.get()`.
+ * Maps browser errors to specific WebAuthn error codes for better debugging.
+ * @param {Object} params - Error identification parameters
+ * @param {Error} params.error - The error thrown by the browser
+ * @param {CredentialRequestOptions} params.options - The options passed to credentials.get()
+ * @returns {WebAuthnError} A WebAuthnError with a specific error code
+ * @see {@link https://w3c.github.io/webauthn/#sctn-getAssertion W3C WebAuthn Spec - Get Assertion}
+ */
+function identifyAuthenticationError({ error, options, }) {
+ const { publicKey } = options;
+ if (!publicKey) {
+ throw Error('options was missing required publicKey property');
+ }
+ if (error.name === 'AbortError') {
+ if (options.signal instanceof AbortSignal) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)
+ return new WebAuthnError({
+ message: 'Authentication ceremony was sent an abort signal',
+ code: 'ERROR_CEREMONY_ABORTED',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'NotAllowedError') {
+ /**
+ * Pass the error directly through. Platforms are overloading this error beyond what the spec
+ * defines and we don't want to overwrite potentially useful error messages.
+ */
+ return new WebAuthnError({
+ message: error.message,
+ code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',
+ cause: error,
+ });
+ }
+ else if (error.name === 'SecurityError') {
+ const effectiveDomain = window.location.hostname;
+ if (!(0, webauthn_1.isValidDomain)(effectiveDomain)) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)
+ return new WebAuthnError({
+ message: `${window.location.hostname} is an invalid domain`,
+ code: 'ERROR_INVALID_DOMAIN',
+ cause: error,
+ });
+ }
+ else if (publicKey.rpId !== effectiveDomain) {
+ // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)
+ return new WebAuthnError({
+ message: `The RP ID "${publicKey.rpId}" is invalid for this domain`,
+ code: 'ERROR_INVALID_RP_ID',
+ cause: error,
+ });
+ }
+ }
+ else if (error.name === 'UnknownError') {
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)
+ // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)
+ return new WebAuthnError({
+ message: 'The authenticator was unable to process the specified options, or could not create a new assertion signature',
+ code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',
+ cause: error,
+ });
+ }
+ return new WebAuthnError({
+ message: 'a Non-Webauthn related error has occurred',
+ code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',
+ cause: error,
+ });
+}
+//# sourceMappingURL=webauthn.errors.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map
new file mode 100644
index 0000000..182a20c
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.errors.js","sourceRoot":"","sources":["../../../src/lib/webauthn.errors.ts"],"names":[],"mappings":";AAAA,sDAAsD;;;AAwEtD,0CAEC;AA8BD,8DAsIC;AAWD,kEAmEC;AAzTD,yCAA0C;AAM1C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,aAAc,SAAQ,KAAK;IAKtC,YAAY,EACV,OAAO,EACP,IAAI,EACJ,KAAK,EACL,IAAI,GAML;;QACC,iEAAiE;QACjE,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAdjB,sBAAiB,GAAG,IAAI,CAAA;QAehC,IAAI,CAAC,IAAI,GAAG,MAAA,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,mCAAI,eAAe,CAAA;QACxF,IAAI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,KAAK,eAAe,EAAE,CAAC;QAC1C,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAA;QAChD,IAAI,CAAC,IAAA,wBAAa,EAAC,eAAe,CAAC,EAAE,CAAC;YACpC,gFAAgF;YAChF,OAAO,IAAI,aAAa,CAAC;gBACvB,OAAO,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,uBAAuB;gBAC3D,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,KAAK;aACb,CAAC,CAAA;QACJ,CAAC;aAAM,IAAI,SAAS,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YAC9C,gFAAgF;YAChF,OAAO,IAAI,aAAa,CAAC;gBACvB,OAAO,EAAE,cAAc,SAAS,CAAC,IAAI,8BAA8B;gBACnE,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,KAAK;aACb,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;SAAM,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QACzC,mEAAmE;QACnE,oEAAoE;QACpE,OAAO,IAAI,aAAa,CAAC;YACvB,OAAO,EACL,8GAA8G;YAChH,IAAI,EAAE,mCAAmC;YACzC,KAAK,EAAE,KAAK;SACb,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,IAAI,aAAa,CAAC;QACvB,OAAO,EAAE,2CAA2C;QACpD,IAAI,EAAE,sCAAsC;QAC5C,KAAK,EAAE,KAAK;KACb,CAAC,CAAA;AACJ,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js
new file mode 100644
index 0000000..3be70ad
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js
@@ -0,0 +1,693 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.WebAuthnApi = exports.DEFAULT_REQUEST_OPTIONS = exports.DEFAULT_CREATION_OPTIONS = exports.webAuthnAbortService = exports.WebAuthnAbortService = exports.identifyAuthenticationError = exports.identifyRegistrationError = exports.isWebAuthnError = exports.WebAuthnError = void 0;
+exports.deserializeCredentialCreationOptions = deserializeCredentialCreationOptions;
+exports.deserializeCredentialRequestOptions = deserializeCredentialRequestOptions;
+exports.serializeCredentialCreationResponse = serializeCredentialCreationResponse;
+exports.serializeCredentialRequestResponse = serializeCredentialRequestResponse;
+exports.isValidDomain = isValidDomain;
+exports.createCredential = createCredential;
+exports.getCredential = getCredential;
+exports.mergeCredentialCreationOptions = mergeCredentialCreationOptions;
+exports.mergeCredentialRequestOptions = mergeCredentialRequestOptions;
+const tslib_1 = require("tslib");
+const base64url_1 = require("./base64url");
+const errors_1 = require("./errors");
+const helpers_1 = require("./helpers");
+const webauthn_errors_1 = require("./webauthn.errors");
+Object.defineProperty(exports, "identifyAuthenticationError", { enumerable: true, get: function () { return webauthn_errors_1.identifyAuthenticationError; } });
+Object.defineProperty(exports, "identifyRegistrationError", { enumerable: true, get: function () { return webauthn_errors_1.identifyRegistrationError; } });
+Object.defineProperty(exports, "isWebAuthnError", { enumerable: true, get: function () { return webauthn_errors_1.isWebAuthnError; } });
+Object.defineProperty(exports, "WebAuthnError", { enumerable: true, get: function () { return webauthn_errors_1.WebAuthnError; } });
+/**
+ * WebAuthn abort service to manage ceremony cancellation.
+ * Ensures only one WebAuthn ceremony is active at a time to prevent "operation already in progress" errors.
+ *
+ * @experimental This class is experimental and may change in future releases
+ * @see {@link https://w3c.github.io/webauthn/#sctn-automation-webdriver-capability W3C WebAuthn Spec - Aborting Ceremonies}
+ */
+class WebAuthnAbortService {
+ /**
+ * Create an abort signal for a new WebAuthn operation.
+ * Automatically cancels any existing operation.
+ *
+ * @returns {AbortSignal} Signal to pass to navigator.credentials.create() or .get()
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal MDN - AbortSignal}
+ */
+ createNewAbortSignal() {
+ // Abort any existing calls to navigator.credentials.create() or navigator.credentials.get()
+ if (this.controller) {
+ const abortError = new Error('Cancelling existing WebAuthn API call for new one');
+ abortError.name = 'AbortError';
+ this.controller.abort(abortError);
+ }
+ const newController = new AbortController();
+ this.controller = newController;
+ return newController.signal;
+ }
+ /**
+ * Manually cancel the current WebAuthn operation.
+ * Useful for cleaning up when user cancels or navigates away.
+ *
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort MDN - AbortController.abort}
+ */
+ cancelCeremony() {
+ if (this.controller) {
+ const abortError = new Error('Manually cancelling existing WebAuthn API call');
+ abortError.name = 'AbortError';
+ this.controller.abort(abortError);
+ this.controller = undefined;
+ }
+ }
+}
+exports.WebAuthnAbortService = WebAuthnAbortService;
+/**
+ * Singleton instance to ensure only one WebAuthn ceremony is active at a time.
+ * This prevents "operation already in progress" errors when retrying WebAuthn operations.
+ *
+ * @experimental This instance is experimental and may change in future releases
+ */
+exports.webAuthnAbortService = new WebAuthnAbortService();
+/**
+ * Convert base64url encoded strings in WebAuthn credential creation options to ArrayBuffers
+ * as required by the WebAuthn browser API.
+ * Supports both native WebAuthn Level 3 parseCreationOptionsFromJSON and manual fallback.
+ *
+ * @param {ServerCredentialCreationOptions} options - JSON options from server with base64url encoded fields
+ * @returns {PublicKeyCredentialCreationOptionsFuture} Options ready for navigator.credentials.create()
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseCreationOptionsFromJSON W3C WebAuthn Spec - parseCreationOptionsFromJSON}
+ */
+function deserializeCredentialCreationOptions(options) {
+ if (!options) {
+ throw new Error('Credential creation options are required');
+ }
+ // Check if the native parseCreationOptionsFromJSON method is available
+ if (typeof PublicKeyCredential !== 'undefined' &&
+ 'parseCreationOptionsFromJSON' in PublicKeyCredential &&
+ typeof PublicKeyCredential
+ .parseCreationOptionsFromJSON === 'function') {
+ // Use the native WebAuthn Level 3 method
+ return PublicKeyCredential.parseCreationOptionsFromJSON(
+ /** we assert the options here as typescript still doesn't know about future webauthn types */
+ options);
+ }
+ // Fallback to manual parsing for browsers that don't support the native method
+ // Destructure to separate fields that need transformation
+ const { challenge: challengeStr, user: userOpts, excludeCredentials } = options, restOptions = tslib_1.__rest(options
+ // Convert challenge from base64url to ArrayBuffer
+ , ["challenge", "user", "excludeCredentials"]);
+ // Convert challenge from base64url to ArrayBuffer
+ const challenge = (0, base64url_1.base64UrlToUint8Array)(challengeStr).buffer;
+ // Convert user.id from base64url to ArrayBuffer
+ const user = Object.assign(Object.assign({}, userOpts), { id: (0, base64url_1.base64UrlToUint8Array)(userOpts.id).buffer });
+ // Build the result object
+ const result = Object.assign(Object.assign({}, restOptions), { challenge,
+ user });
+ // Only add excludeCredentials if it exists
+ if (excludeCredentials && excludeCredentials.length > 0) {
+ result.excludeCredentials = new Array(excludeCredentials.length);
+ for (let i = 0; i < excludeCredentials.length; i++) {
+ const cred = excludeCredentials[i];
+ result.excludeCredentials[i] = Object.assign(Object.assign({}, cred), { id: (0, base64url_1.base64UrlToUint8Array)(cred.id).buffer, type: cred.type || 'public-key',
+ // Cast transports to handle future transport types like "cable"
+ transports: cred.transports });
+ }
+ }
+ return result;
+}
+/**
+ * Convert base64url encoded strings in WebAuthn credential request options to ArrayBuffers
+ * as required by the WebAuthn browser API.
+ * Supports both native WebAuthn Level 3 parseRequestOptionsFromJSON and manual fallback.
+ *
+ * @param {ServerCredentialRequestOptions} options - JSON options from server with base64url encoded fields
+ * @returns {PublicKeyCredentialRequestOptionsFuture} Options ready for navigator.credentials.get()
+ * @see {@link https://w3c.github.io/webauthn/#sctn-parseRequestOptionsFromJSON W3C WebAuthn Spec - parseRequestOptionsFromJSON}
+ */
+function deserializeCredentialRequestOptions(options) {
+ if (!options) {
+ throw new Error('Credential request options are required');
+ }
+ // Check if the native parseRequestOptionsFromJSON method is available
+ if (typeof PublicKeyCredential !== 'undefined' &&
+ 'parseRequestOptionsFromJSON' in PublicKeyCredential &&
+ typeof PublicKeyCredential
+ .parseRequestOptionsFromJSON === 'function') {
+ // Use the native WebAuthn Level 3 method
+ return PublicKeyCredential.parseRequestOptionsFromJSON(options);
+ }
+ // Fallback to manual parsing for browsers that don't support the native method
+ // Destructure to separate fields that need transformation
+ const { challenge: challengeStr, allowCredentials } = options, restOptions = tslib_1.__rest(options
+ // Convert challenge from base64url to ArrayBuffer
+ , ["challenge", "allowCredentials"]);
+ // Convert challenge from base64url to ArrayBuffer
+ const challenge = (0, base64url_1.base64UrlToUint8Array)(challengeStr).buffer;
+ // Build the result object
+ const result = Object.assign(Object.assign({}, restOptions), { challenge });
+ // Only add allowCredentials if it exists
+ if (allowCredentials && allowCredentials.length > 0) {
+ result.allowCredentials = new Array(allowCredentials.length);
+ for (let i = 0; i < allowCredentials.length; i++) {
+ const cred = allowCredentials[i];
+ result.allowCredentials[i] = Object.assign(Object.assign({}, cred), { id: (0, base64url_1.base64UrlToUint8Array)(cred.id).buffer, type: cred.type || 'public-key',
+ // Cast transports to handle future transport types like "cable"
+ transports: cred.transports });
+ }
+ }
+ return result;
+}
+/**
+ * Convert a registration/enrollment credential response to server format.
+ * Serializes binary fields to base64url for JSON transmission.
+ * Supports both native WebAuthn Level 3 toJSON and manual fallback.
+ *
+ * @param {RegistrationCredential} credential - Credential from navigator.credentials.create()
+ * @returns {RegistrationResponseJSON} JSON-serializable credential for server
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-tojson W3C WebAuthn Spec - toJSON}
+ */
+function serializeCredentialCreationResponse(credential) {
+ var _a;
+ // Check if the credential instance has the toJSON method
+ if ('toJSON' in credential && typeof credential.toJSON === 'function') {
+ // Use the native WebAuthn Level 3 method
+ return credential.toJSON();
+ }
+ const credentialWithAttachment = credential;
+ return {
+ id: credential.id,
+ rawId: credential.id,
+ response: {
+ attestationObject: (0, base64url_1.bytesToBase64URL)(new Uint8Array(credential.response.attestationObject)),
+ clientDataJSON: (0, base64url_1.bytesToBase64URL)(new Uint8Array(credential.response.clientDataJSON)),
+ },
+ type: 'public-key',
+ clientExtensionResults: credential.getClientExtensionResults(),
+ // Convert null to undefined and cast to AuthenticatorAttachment type
+ authenticatorAttachment: ((_a = credentialWithAttachment.authenticatorAttachment) !== null && _a !== void 0 ? _a : undefined),
+ };
+}
+/**
+ * Convert an authentication/verification credential response to server format.
+ * Serializes binary fields to base64url for JSON transmission.
+ * Supports both native WebAuthn Level 3 toJSON and manual fallback.
+ *
+ * @param {AuthenticationCredential} credential - Credential from navigator.credentials.get()
+ * @returns {AuthenticationResponseJSON} JSON-serializable credential for server
+ * @see {@link https://w3c.github.io/webauthn/#dom-publickeycredential-tojson W3C WebAuthn Spec - toJSON}
+ */
+function serializeCredentialRequestResponse(credential) {
+ var _a;
+ // Check if the credential instance has the toJSON method
+ if ('toJSON' in credential && typeof credential.toJSON === 'function') {
+ // Use the native WebAuthn Level 3 method
+ return credential.toJSON();
+ }
+ // Fallback to manual conversion for browsers that don't support toJSON
+ // Access authenticatorAttachment via type assertion to handle TypeScript version differences
+ // @simplewebauthn/types includes this property but base TypeScript 4.7.4 doesn't
+ const credentialWithAttachment = credential;
+ const clientExtensionResults = credential.getClientExtensionResults();
+ const assertionResponse = credential.response;
+ return {
+ id: credential.id,
+ rawId: credential.id, // W3C spec expects rawId to match id for JSON format
+ response: {
+ authenticatorData: (0, base64url_1.bytesToBase64URL)(new Uint8Array(assertionResponse.authenticatorData)),
+ clientDataJSON: (0, base64url_1.bytesToBase64URL)(new Uint8Array(assertionResponse.clientDataJSON)),
+ signature: (0, base64url_1.bytesToBase64URL)(new Uint8Array(assertionResponse.signature)),
+ userHandle: assertionResponse.userHandle
+ ? (0, base64url_1.bytesToBase64URL)(new Uint8Array(assertionResponse.userHandle))
+ : undefined,
+ },
+ type: 'public-key',
+ clientExtensionResults,
+ // Convert null to undefined and cast to AuthenticatorAttachment type
+ authenticatorAttachment: ((_a = credentialWithAttachment.authenticatorAttachment) !== null && _a !== void 0 ? _a : undefined),
+ };
+}
+/**
+ * A simple test to determine if a hostname is a properly-formatted domain name.
+ * Considers localhost valid for development environments.
+ *
+ * A "valid domain" is defined here: https://url.spec.whatwg.org/#valid-domain
+ *
+ * Regex sourced from here:
+ * https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html
+ *
+ * @param {string} hostname - The hostname to validate
+ * @returns {boolean} True if valid domain or localhost
+ * @see {@link https://url.spec.whatwg.org/#valid-domain WHATWG URL Spec - Valid Domain}
+ */
+function isValidDomain(hostname) {
+ return (
+ // Consider localhost valid as well since it's okay wrt Secure Contexts
+ hostname === 'localhost' || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(hostname));
+}
+/**
+ * Determine if the browser is capable of WebAuthn.
+ * Checks for necessary Web APIs: PublicKeyCredential and Credential Management.
+ *
+ * @returns {boolean} True if browser supports WebAuthn
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential#browser_compatibility MDN - PublicKeyCredential Browser Compatibility}
+ */
+function browserSupportsWebAuthn() {
+ var _a, _b;
+ return !!((0, helpers_1.isBrowser)() &&
+ 'PublicKeyCredential' in window &&
+ window.PublicKeyCredential &&
+ 'credentials' in navigator &&
+ typeof ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.credentials) === null || _a === void 0 ? void 0 : _a.create) === 'function' &&
+ typeof ((_b = navigator === null || navigator === void 0 ? void 0 : navigator.credentials) === null || _b === void 0 ? void 0 : _b.get) === 'function');
+}
+/**
+ * Create a WebAuthn credential using the browser's credentials API.
+ * Wraps navigator.credentials.create() with error handling.
+ *
+ * @param {CredentialCreationOptions} options - Options including publicKey parameters
+ * @returns {Promise>} Created credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-createCredential W3C WebAuthn Spec - Create Credential}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create MDN - credentials.create}
+ */
+async function createCredential(options) {
+ try {
+ const response = await navigator.credentials.create(
+ /** we assert the type here until typescript types are updated */
+ options);
+ if (!response) {
+ return {
+ data: null,
+ error: new webauthn_errors_1.WebAuthnUnknownError('Empty credential response', response),
+ };
+ }
+ if (!(response instanceof PublicKeyCredential)) {
+ return {
+ data: null,
+ error: new webauthn_errors_1.WebAuthnUnknownError('Browser returned unexpected credential type', response),
+ };
+ }
+ return { data: response, error: null };
+ }
+ catch (err) {
+ return {
+ data: null,
+ error: (0, webauthn_errors_1.identifyRegistrationError)({
+ error: err,
+ options,
+ }),
+ };
+ }
+}
+/**
+ * Get a WebAuthn credential using the browser's credentials API.
+ * Wraps navigator.credentials.get() with error handling.
+ *
+ * @param {CredentialRequestOptions} options - Options including publicKey parameters
+ * @returns {Promise>} Retrieved credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-getAssertion W3C WebAuthn Spec - Get Assertion}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get MDN - credentials.get}
+ */
+async function getCredential(options) {
+ try {
+ const response = await navigator.credentials.get(
+ /** we assert the type here until typescript types are updated */
+ options);
+ if (!response) {
+ return {
+ data: null,
+ error: new webauthn_errors_1.WebAuthnUnknownError('Empty credential response', response),
+ };
+ }
+ if (!(response instanceof PublicKeyCredential)) {
+ return {
+ data: null,
+ error: new webauthn_errors_1.WebAuthnUnknownError('Browser returned unexpected credential type', response),
+ };
+ }
+ return { data: response, error: null };
+ }
+ catch (err) {
+ return {
+ data: null,
+ error: (0, webauthn_errors_1.identifyAuthenticationError)({
+ error: err,
+ options,
+ }),
+ };
+ }
+}
+exports.DEFAULT_CREATION_OPTIONS = {
+ hints: ['security-key'],
+ authenticatorSelection: {
+ authenticatorAttachment: 'cross-platform',
+ requireResidentKey: false,
+ /** set to preferred because older yubikeys don't have PIN/Biometric */
+ userVerification: 'preferred',
+ residentKey: 'discouraged',
+ },
+ attestation: 'direct',
+};
+exports.DEFAULT_REQUEST_OPTIONS = {
+ /** set to preferred because older yubikeys don't have PIN/Biometric */
+ userVerification: 'preferred',
+ hints: ['security-key'],
+ attestation: 'direct',
+};
+function deepMerge(...sources) {
+ const isObject = (val) => val !== null && typeof val === 'object' && !Array.isArray(val);
+ const isArrayBufferLike = (val) => val instanceof ArrayBuffer || ArrayBuffer.isView(val);
+ const result = {};
+ for (const source of sources) {
+ if (!source)
+ continue;
+ for (const key in source) {
+ const value = source[key];
+ if (value === undefined)
+ continue;
+ if (Array.isArray(value)) {
+ // preserve array reference, including unions like AuthenticatorTransport[]
+ result[key] = value;
+ }
+ else if (isArrayBufferLike(value)) {
+ result[key] = value;
+ }
+ else if (isObject(value)) {
+ const existing = result[key];
+ if (isObject(existing)) {
+ result[key] = deepMerge(existing, value);
+ }
+ else {
+ result[key] = deepMerge(value);
+ }
+ }
+ else {
+ result[key] = value;
+ }
+ }
+ }
+ return result;
+}
+/**
+ * Merges WebAuthn credential creation options with overrides.
+ * Sets sensible defaults for authenticator selection and extensions.
+ *
+ * @param {PublicKeyCredentialCreationOptionsFuture} baseOptions - The base options from the server
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides - Optional overrides to apply
+ * @param {string} friendlyName - Optional friendly name for the credential
+ * @returns {PublicKeyCredentialCreationOptionsFuture} Merged credential creation options
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-authenticatorselectioncriteria W3C WebAuthn Spec - AuthenticatorSelectionCriteria}
+ */
+function mergeCredentialCreationOptions(baseOptions, overrides) {
+ return deepMerge(exports.DEFAULT_CREATION_OPTIONS, baseOptions, overrides || {});
+}
+/**
+ * Merges WebAuthn credential request options with overrides.
+ * Sets sensible defaults for user verification and hints.
+ *
+ * @param {PublicKeyCredentialRequestOptionsFuture} baseOptions - The base options from the server
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides - Optional overrides to apply
+ * @returns {PublicKeyCredentialRequestOptionsFuture} Merged credential request options
+ * @see {@link https://w3c.github.io/webauthn/#dictdef-publickeycredentialrequestoptions W3C WebAuthn Spec - PublicKeyCredentialRequestOptions}
+ */
+function mergeCredentialRequestOptions(baseOptions, overrides) {
+ return deepMerge(exports.DEFAULT_REQUEST_OPTIONS, baseOptions, overrides || {});
+}
+/**
+ * WebAuthn API wrapper for Supabase Auth.
+ * Provides methods for enrolling, challenging, verifying, authenticating, and registering WebAuthn credentials.
+ *
+ * @experimental This API is experimental and may change in future releases
+ * @see {@link https://w3c.github.io/webauthn/ W3C WebAuthn Specification}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API MDN - Web Authentication API}
+ */
+class WebAuthnApi {
+ constructor(client) {
+ this.client = client;
+ // Bind all methods so they can be destructured
+ this.enroll = this._enroll.bind(this);
+ this.challenge = this._challenge.bind(this);
+ this.verify = this._verify.bind(this);
+ this.authenticate = this._authenticate.bind(this);
+ this.register = this._register.bind(this);
+ }
+ /**
+ * Enroll a new WebAuthn factor.
+ * Creates an unverified WebAuthn factor that must be verified with a credential.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Omit} params - Enrollment parameters (friendlyName required)
+ * @returns {Promise} Enrolled factor details or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registering a New Credential}
+ */
+ async _enroll(params) {
+ return this.client.mfa.enroll(Object.assign(Object.assign({}, params), { factorType: 'webauthn' }));
+ }
+ /**
+ * Challenge for WebAuthn credential creation or authentication.
+ * Combines server challenge with browser credential operations.
+ * Handles both registration (create) and authentication (request) flows.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {MFAChallengeWebauthnParams & { friendlyName?: string; signal?: AbortSignal }} params - Challenge parameters including factorId
+ * @param {Object} overrides - Allows you to override the parameters passed to navigator.credentials
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides.create - Override options for credential creation
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides.request - Override options for credential request
+ * @returns {Promise} Challenge response with credential or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-credential-creation W3C WebAuthn Spec - Credential Creation}
+ * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying Assertion}
+ */
+ async _challenge({ factorId, webauthn, friendlyName, signal, }, overrides) {
+ try {
+ // Get challenge from server using the client's MFA methods
+ const { data: challengeResponse, error: challengeError } = await this.client.mfa.challenge({
+ factorId,
+ webauthn,
+ });
+ if (!challengeResponse) {
+ return { data: null, error: challengeError };
+ }
+ const abortSignal = signal !== null && signal !== void 0 ? signal : exports.webAuthnAbortService.createNewAbortSignal();
+ /** webauthn will fail if either of the name/displayname are blank */
+ if (challengeResponse.webauthn.type === 'create') {
+ const { user } = challengeResponse.webauthn.credential_options.publicKey;
+ if (!user.name) {
+ user.name = `${user.id}:${friendlyName}`;
+ }
+ if (!user.displayName) {
+ user.displayName = user.name;
+ }
+ }
+ switch (challengeResponse.webauthn.type) {
+ case 'create': {
+ const options = mergeCredentialCreationOptions(challengeResponse.webauthn.credential_options.publicKey, overrides === null || overrides === void 0 ? void 0 : overrides.create);
+ const { data, error } = await createCredential({
+ publicKey: options,
+ signal: abortSignal,
+ });
+ if (data) {
+ return {
+ data: {
+ factorId,
+ challengeId: challengeResponse.id,
+ webauthn: {
+ type: challengeResponse.webauthn.type,
+ credential_response: data,
+ },
+ },
+ error: null,
+ };
+ }
+ return { data: null, error };
+ }
+ case 'request': {
+ const options = mergeCredentialRequestOptions(challengeResponse.webauthn.credential_options.publicKey, overrides === null || overrides === void 0 ? void 0 : overrides.request);
+ const { data, error } = await getCredential(Object.assign(Object.assign({}, challengeResponse.webauthn.credential_options), { publicKey: options, signal: abortSignal }));
+ if (data) {
+ return {
+ data: {
+ factorId,
+ challengeId: challengeResponse.id,
+ webauthn: {
+ type: challengeResponse.webauthn.type,
+ credential_response: data,
+ },
+ },
+ error: null,
+ };
+ }
+ return { data: null, error };
+ }
+ }
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ return {
+ data: null,
+ error: new errors_1.AuthUnknownError('Unexpected error in challenge', error),
+ };
+ }
+ }
+ /**
+ * Verify a WebAuthn credential with the server.
+ * Completes the WebAuthn ceremony by sending the credential to the server for verification.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Verification parameters
+ * @param {string} params.challengeId - ID of the challenge being verified
+ * @param {string} params.factorId - ID of the WebAuthn factor
+ * @param {MFAVerifyWebauthnParams['webauthn']} params.webauthn - WebAuthn credential response
+ * @returns {Promise} Verification result with session or error
+ * @see {@link https://w3c.github.io/webauthn/#sctn-verifying-assertion W3C WebAuthn Spec - Verifying an Authentication Assertion}
+ * */
+ async _verify({ challengeId, factorId, webauthn, }) {
+ return this.client.mfa.verify({
+ factorId,
+ challengeId,
+ webauthn: webauthn,
+ });
+ }
+ /**
+ * Complete WebAuthn authentication flow.
+ * Performs challenge and verification in a single operation for existing credentials.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Authentication parameters
+ * @param {string} params.factorId - ID of the WebAuthn factor to authenticate with
+ * @param {Object} params.webauthn - WebAuthn configuration
+ * @param {string} params.webauthn.rpId - Relying Party ID (defaults to current hostname)
+ * @param {string[]} params.webauthn.rpOrigins - Allowed origins (defaults to current origin)
+ * @param {AbortSignal} params.webauthn.signal - Optional abort signal
+ * @param {PublicKeyCredentialRequestOptionsFuture} overrides - Override options for navigator.credentials.get
+ * @returns {Promise>} Authentication result
+ * @see {@link https://w3c.github.io/webauthn/#sctn-authentication W3C WebAuthn Spec - Authentication Ceremony}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialRequestOptions MDN - PublicKeyCredentialRequestOptions}
+ */
+ async _authenticate({ factorId, webauthn: { rpId = typeof window !== 'undefined' ? window.location.hostname : undefined, rpOrigins = typeof window !== 'undefined' ? [window.location.origin] : undefined, signal, } = {}, }, overrides) {
+ if (!rpId) {
+ return {
+ data: null,
+ error: new errors_1.AuthError('rpId is required for WebAuthn authentication'),
+ };
+ }
+ try {
+ if (!browserSupportsWebAuthn()) {
+ return {
+ data: null,
+ error: new errors_1.AuthUnknownError('Browser does not support WebAuthn', null),
+ };
+ }
+ // Get challenge and credential
+ const { data: challengeResponse, error: challengeError } = await this.challenge({
+ factorId,
+ webauthn: { rpId, rpOrigins },
+ signal,
+ }, { request: overrides });
+ if (!challengeResponse) {
+ return { data: null, error: challengeError };
+ }
+ const { webauthn } = challengeResponse;
+ // Verify credential
+ return this._verify({
+ factorId,
+ challengeId: challengeResponse.challengeId,
+ webauthn: {
+ type: webauthn.type,
+ rpId,
+ rpOrigins,
+ credential_response: webauthn.credential_response,
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ return {
+ data: null,
+ error: new errors_1.AuthUnknownError('Unexpected error in authenticate', error),
+ };
+ }
+ }
+ /**
+ * Complete WebAuthn registration flow.
+ * Performs enrollment, challenge, and verification in a single operation for new credentials.
+ *
+ * @experimental This method is experimental and may change in future releases
+ * @param {Object} params - Registration parameters
+ * @param {string} params.friendlyName - User-friendly name for the credential
+ * @param {string} params.rpId - Relying Party ID (defaults to current hostname)
+ * @param {string[]} params.rpOrigins - Allowed origins (defaults to current origin)
+ * @param {AbortSignal} params.signal - Optional abort signal
+ * @param {PublicKeyCredentialCreationOptionsFuture} overrides - Override options for navigator.credentials.create
+ * @returns {Promise>} Registration result
+ * @see {@link https://w3c.github.io/webauthn/#sctn-registering-a-new-credential W3C WebAuthn Spec - Registration Ceremony}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions MDN - PublicKeyCredentialCreationOptions}
+ */
+ async _register({ friendlyName, webauthn: { rpId = typeof window !== 'undefined' ? window.location.hostname : undefined, rpOrigins = typeof window !== 'undefined' ? [window.location.origin] : undefined, signal, } = {}, }, overrides) {
+ if (!rpId) {
+ return {
+ data: null,
+ error: new errors_1.AuthError('rpId is required for WebAuthn registration'),
+ };
+ }
+ try {
+ if (!browserSupportsWebAuthn()) {
+ return {
+ data: null,
+ error: new errors_1.AuthUnknownError('Browser does not support WebAuthn', null),
+ };
+ }
+ // Enroll factor
+ const { data: factor, error: enrollError } = await this._enroll({
+ friendlyName,
+ });
+ if (!factor) {
+ await this.client.mfa
+ .listFactors()
+ .then((factors) => {
+ var _a;
+ return (_a = factors.data) === null || _a === void 0 ? void 0 : _a.all.find((v) => v.factor_type === 'webauthn' &&
+ v.friendly_name === friendlyName &&
+ v.status !== 'unverified');
+ })
+ .then((factor) => (factor ? this.client.mfa.unenroll({ factorId: factor === null || factor === void 0 ? void 0 : factor.id }) : void 0));
+ return { data: null, error: enrollError };
+ }
+ // Get challenge and create credential
+ const { data: challengeResponse, error: challengeError } = await this._challenge({
+ factorId: factor.id,
+ friendlyName: factor.friendly_name,
+ webauthn: { rpId, rpOrigins },
+ signal,
+ }, {
+ create: overrides,
+ });
+ if (!challengeResponse) {
+ return { data: null, error: challengeError };
+ }
+ return this._verify({
+ factorId: factor.id,
+ challengeId: challengeResponse.challengeId,
+ webauthn: {
+ rpId,
+ rpOrigins,
+ type: challengeResponse.webauthn.type,
+ credential_response: challengeResponse.webauthn.credential_response,
+ },
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ return {
+ data: null,
+ error: new errors_1.AuthUnknownError('Unexpected error in register', error),
+ };
+ }
+ }
+}
+exports.WebAuthnApi = WebAuthnApi;
+//# sourceMappingURL=webauthn.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map
new file mode 100644
index 0000000..737bc61
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"webauthn.js","sourceRoot":"","sources":["../../../src/lib/webauthn.ts"],"names":[],"mappings":";;;AAmHA,oFA4DC;AAWD,kFAkDC;AAiBD,kFA2BC;AAWD,gFAsCC;AAeD,sCAKC;AA6BD,4CAgCC;AAWD,sCAgCC;AAoED,wEAKC;AAWD,sEAKC;;AA7hBD,2CAAqE;AACrE,qCAAmE;AAY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IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAA;YAC9C,CAAC;YAED,OAAO,IAAI,CAAC,OAAO,CAAC;gBAClB,QAAQ,EAAE,MAAM,CAAC,EAAE;gBACnB,WAAW,EAAE,iBAAiB,CAAC,WAAW;gBAC1C,QAAQ,EAAE;oBACR,IAAI;oBACJ,SAAS;oBACT,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,IAAI;oBACrC,mBAAmB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB;iBACpE;aACF,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,IAAA,oBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;YAC9B,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI,yBAAgB,CAAC,8BAA8B,EAAE,KAAK,CAAC;aACnE,CAAA;QACH,CAAC;IACH,CAAC;CACF;AA7XD,kCA6XC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts
new file mode 100644
index 0000000..aacb97d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts
@@ -0,0 +1,4 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+declare const AuthAdminApi: typeof GoTrueAdminApi;
+export default AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map
new file mode 100644
index 0000000..5c6efa8
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthAdminApi.d.ts","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,QAAA,MAAM,YAAY,uBAAiB,CAAA;AAEnC,eAAe,YAAY,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js
new file mode 100644
index 0000000..339c7ab
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js
@@ -0,0 +1,4 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+const AuthAdminApi = GoTrueAdminApi;
+export default AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map
new file mode 100644
index 0000000..bef3377
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthAdminApi.js","sourceRoot":"","sources":["../../src/AuthAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAE7C,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,eAAe,YAAY,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts
new file mode 100644
index 0000000..596eec9
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts
@@ -0,0 +1,4 @@
+import GoTrueClient from './GoTrueClient';
+declare const AuthClient: typeof GoTrueClient;
+export default AuthClient;
+//# sourceMappingURL=AuthClient.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map
new file mode 100644
index 0000000..503d802
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthClient.d.ts","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,QAAA,MAAM,UAAU,qBAAe,CAAA;AAE/B,eAAe,UAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js
new file mode 100644
index 0000000..03bd60d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js
@@ -0,0 +1,4 @@
+import GoTrueClient from './GoTrueClient';
+const AuthClient = GoTrueClient;
+export default AuthClient;
+//# sourceMappingURL=AuthClient.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map
new file mode 100644
index 0000000..aebb401
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"AuthClient.js","sourceRoot":"","sources":["../../src/AuthClient.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,UAAU,GAAG,YAAY,CAAA;AAE/B,eAAe,UAAU,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts
new file mode 100644
index 0000000..036f90b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts
@@ -0,0 +1,159 @@
+import { Fetch } from './lib/fetch';
+import { AdminUserAttributes, GenerateLinkParams, GenerateLinkResponse, Pagination, User, UserResponse, GoTrueAdminMFAApi, PageParams, SignOutScope, GoTrueAdminOAuthApi } from './lib/types';
+import { AuthError } from './lib/errors';
+export default class GoTrueAdminApi {
+ /** Contains all MFA administration methods. */
+ mfa: GoTrueAdminMFAApi;
+ /**
+ * Contains all OAuth client administration methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ oauth: GoTrueAdminOAuthApi;
+ protected url: string;
+ protected headers: {
+ [key: string]: string;
+ };
+ protected fetch: Fetch;
+ /**
+ * Creates an admin API client that can be used to manage users and OAuth clients.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueAdminApi } from '@supabase/auth-js'
+ *
+ * const admin = new GoTrueAdminApi({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { Authorization: `Bearer ${process.env.SUPABASE_SERVICE_ROLE_KEY}` },
+ * })
+ * ```
+ */
+ constructor({ url, headers, fetch, }: {
+ url: string;
+ headers?: {
+ [key: string]: string;
+ };
+ fetch?: Fetch;
+ });
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ signOut(jwt: string, scope?: SignOutScope): Promise<{
+ data: null;
+ error: AuthError | null;
+ }>;
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ inviteUserByEmail(email: string, options?: {
+ /** A custom data object to store additional metadata about the user. This maps to the `auth.users.user_metadata` column. */
+ data?: object;
+ /** The URL which will be appended to the email link sent to the user's email address. Once clicked the user will end up on this URL. */
+ redirectTo?: string;
+ }): Promise;
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ generateLink(params: GenerateLinkParams): Promise;
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ createUser(attributes: AdminUserAttributes): Promise;
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ listUsers(params?: PageParams): Promise<{
+ data: {
+ users: User[];
+ aud: string;
+ } & Pagination;
+ error: null;
+ } | {
+ data: {
+ users: [];
+ };
+ error: AuthError;
+ }>;
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ getUserById(uid: string): Promise;
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ updateUserById(uid: string, attributes: AdminUserAttributes): Promise;
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ deleteUser(id: string, shouldSoftDelete?: boolean): Promise;
+ private _listFactors;
+ private _deleteFactor;
+ /**
+ * Lists all OAuth clients with optional pagination.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _listOAuthClients;
+ /**
+ * Creates a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _createOAuthClient;
+ /**
+ * Gets details of a specific OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _getOAuthClient;
+ /**
+ * Updates an existing OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _updateOAuthClient;
+ /**
+ * Deletes an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _deleteOAuthClient;
+ /**
+ * Regenerates the secret for an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ private _regenerateOAuthClientSecret;
+}
+//# sourceMappingURL=GoTrueAdminApi.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map
new file mode 100644
index 0000000..88941da
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueAdminApi.d.ts","sourceRoot":"","sources":["../../src/GoTrueAdminApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAA;AAEpB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,iBAAiB,EAKjB,UAAU,EAEV,YAAY,EACZ,mBAAmB,EAKpB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAe,MAAM,cAAc,CAAA;AAErD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,+CAA+C;IAC/C,GAAG,EAAE,iBAAiB,CAAA;IAEtB;;;OAGG;IACH,KAAK,EAAE,mBAAmB,CAAA;IAE1B,SAAS,CAAC,GAAG,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,OAAO,EAAE;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IACD,SAAS,CAAC,KAAK,EAAE,KAAK,CAAA;IAEtB;;;;;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EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAkBzF;;;;;;;;OAQG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,UAAQ,GAAG,OAAO,CAAC,YAAY,CAAC;YAoB/D,YAAY;YA2BZ,aAAa;IA0B3B;;;;;OAKG;YACW,iBAAiB;IAmC/B;;;;;OAKG;YACW,kBAAkB;IAkBhC;;;;;OAKG;YACW,eAAe;IAiB7B;;;;;OAKG;YACW,kBAAkB;IAqBhC;;;;;OAKG;YACW,kBAAkB;IAkBhC;;;;;OAKG;YACW,4BAA4B;CAqB3C"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js
new file mode 100644
index 0000000..1a4e22b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js
@@ -0,0 +1,438 @@
+import { __rest } from "tslib";
+import { _generateLinkResponse, _noResolveJsonResponse, _request, _userResponse, } from './lib/fetch';
+import { resolveFetch, validateUUID } from './lib/helpers';
+import { SIGN_OUT_SCOPES, } from './lib/types';
+import { isAuthError } from './lib/errors';
+export default class GoTrueAdminApi {
+ /**
+ * Creates an admin API client that can be used to manage users and OAuth clients.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueAdminApi } from '@supabase/auth-js'
+ *
+ * const admin = new GoTrueAdminApi({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { Authorization: `Bearer ${process.env.SUPABASE_SERVICE_ROLE_KEY}` },
+ * })
+ * ```
+ */
+ constructor({ url = '', headers = {}, fetch, }) {
+ this.url = url;
+ this.headers = headers;
+ this.fetch = resolveFetch(fetch);
+ this.mfa = {
+ listFactors: this._listFactors.bind(this),
+ deleteFactor: this._deleteFactor.bind(this),
+ };
+ this.oauth = {
+ listClients: this._listOAuthClients.bind(this),
+ createClient: this._createOAuthClient.bind(this),
+ getClient: this._getOAuthClient.bind(this),
+ updateClient: this._updateOAuthClient.bind(this),
+ deleteClient: this._deleteOAuthClient.bind(this),
+ regenerateClientSecret: this._regenerateOAuthClientSecret.bind(this),
+ };
+ }
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ async signOut(jwt, scope = SIGN_OUT_SCOPES[0]) {
+ if (SIGN_OUT_SCOPES.indexOf(scope) < 0) {
+ throw new Error(`@supabase/auth-js: Parameter scope must be one of ${SIGN_OUT_SCOPES.join(', ')}`);
+ }
+ try {
+ await _request(this.fetch, 'POST', `${this.url}/logout?scope=${scope}`, {
+ headers: this.headers,
+ jwt,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ async inviteUserByEmail(email, options = {}) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/invite`, {
+ body: { email, data: options.data },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ async generateLink(params) {
+ try {
+ const { options } = params, rest = __rest(params, ["options"]);
+ const body = Object.assign(Object.assign({}, rest), options);
+ if ('newEmail' in rest) {
+ // replace newEmail with new_email in request body
+ body.new_email = rest === null || rest === void 0 ? void 0 : rest.newEmail;
+ delete body['newEmail'];
+ }
+ return await _request(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
+ body: body,
+ headers: this.headers,
+ xform: _generateLinkResponse,
+ redirectTo: options === null || options === void 0 ? void 0 : options.redirectTo,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return {
+ data: {
+ properties: null,
+ user: null,
+ },
+ error,
+ };
+ }
+ throw error;
+ }
+ }
+ // User Admin API
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async createUser(attributes) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/admin/users`, {
+ body: attributes,
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ async listUsers(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await _request(this.fetch, 'GET', `${this.url}/admin/users`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: _noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const users = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, users), pagination), error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { users: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async getUserById(uid) {
+ validateUUID(uid);
+ try {
+ return await _request(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async updateUserById(uid, attributes) {
+ validateUUID(uid);
+ try {
+ return await _request(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
+ body: attributes,
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async deleteUser(id, shouldSoftDelete = false) {
+ validateUUID(id);
+ try {
+ return await _request(this.fetch, 'DELETE', `${this.url}/admin/users/${id}`, {
+ headers: this.headers,
+ body: {
+ should_soft_delete: shouldSoftDelete,
+ },
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ async _listFactors(params) {
+ validateUUID(params.userId);
+ try {
+ const { data, error } = await _request(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/factors`, {
+ headers: this.headers,
+ xform: (factors) => {
+ return { data: { factors }, error: null };
+ },
+ });
+ return { data, error };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _deleteFactor(params) {
+ validateUUID(params.userId);
+ validateUUID(params.id);
+ try {
+ const data = await _request(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/factors/${params.id}`, {
+ headers: this.headers,
+ });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Lists all OAuth clients with optional pagination.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _listOAuthClients(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await _request(this.fetch, 'GET', `${this.url}/admin/oauth/clients`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: _noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const clients = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, clients), pagination), error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { clients: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _createOAuthClient(params) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/admin/oauth/clients`, {
+ body: params,
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets details of a specific OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _getOAuthClient(clientId) {
+ try {
+ return await _request(this.fetch, 'GET', `${this.url}/admin/oauth/clients/${clientId}`, {
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates an existing OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _updateOAuthClient(clientId, params) {
+ try {
+ return await _request(this.fetch, 'PUT', `${this.url}/admin/oauth/clients/${clientId}`, {
+ body: params,
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Deletes an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _deleteOAuthClient(clientId) {
+ try {
+ await _request(this.fetch, 'DELETE', `${this.url}/admin/oauth/clients/${clientId}`, {
+ headers: this.headers,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Regenerates the secret for an OAuth client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async _regenerateOAuthClientSecret(clientId) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/admin/oauth/clients/${clientId}/regenerate_secret`, {
+ headers: this.headers,
+ xform: (client) => {
+ return { data: client, error: null };
+ },
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+}
+//# sourceMappingURL=GoTrueAdminApi.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map
new file mode 100644
index 0000000..61736eb
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueAdminApi.js","sourceRoot":"","sources":["../../src/GoTrueAdminApi.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,qBAAqB,EACrB,sBAAsB,EACtB,QAAQ,EACR,aAAa,GACd,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAaL,eAAe,GAOhB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAa,WAAW,EAAE,MAAM,cAAc,CAAA;AAErD,MAAM,CAAC,OAAO,OAAO,cAAc;IAgBjC;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,GAAG,GAAG,EAAE,EACR,OAAO,GAAG,EAAE,EACZ,KAAK,GAON;QACC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,OAAO,GAAG,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ase/auth-js/dist/module/GoTrueClient.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts
new file mode 100644
index 0000000..86030f0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts
@@ -0,0 +1,608 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import { AuthError } from './lib/errors';
+import { Fetch } from './lib/fetch';
+import { Deferred } from './lib/helpers';
+import type { AuthChangeEvent, AuthFlowType, AuthOtpResponse, AuthResponse, AuthTokenResponse, AuthTokenResponsePassword, CallRefreshTokenResult, GoTrueClientOptions, GoTrueMFAApi, InitializeResult, JWK, JwtHeader, JwtPayload, LockFunc, OAuthResponse, AuthOAuthServerApi, ResendParams, Session, SignInAnonymouslyCredentials, SignInWithIdTokenCredentials, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, SignInWithSSO, SignOut, SignUpWithPasswordCredentials, SSOResponse, Subscription, SupportedStorage, User, UserAttributes, UserIdentity, UserResponse, VerifyOtpParams, Web3Credentials } from './lib/types';
+export default class GoTrueClient {
+ private static nextInstanceID;
+ private instanceID;
+ /**
+ * Namespace for the GoTrue admin methods.
+ * These methods should only be used in a trusted server-side environment.
+ */
+ admin: GoTrueAdminApi;
+ /**
+ * Namespace for the MFA methods.
+ */
+ mfa: GoTrueMFAApi;
+ /**
+ * Namespace for the OAuth 2.1 authorization server methods.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ * Used to implement the authorization code flow on the consent page.
+ */
+ oauth: AuthOAuthServerApi;
+ /**
+ * The storage key used to identify the values saved in localStorage
+ */
+ protected storageKey: string;
+ protected flowType: AuthFlowType;
+ /**
+ * The JWKS used for verifying asymmetric JWTs
+ */
+ protected get jwks(): {
+ keys: JWK[];
+ };
+ protected set jwks(value: {
+ keys: JWK[];
+ });
+ protected get jwks_cached_at(): number;
+ protected set jwks_cached_at(value: number);
+ protected autoRefreshToken: boolean;
+ protected persistSession: boolean;
+ protected storage: SupportedStorage;
+ /**
+ * @experimental
+ */
+ protected userStorage: SupportedStorage | null;
+ protected memoryStorage: {
+ [key: string]: string;
+ } | null;
+ protected stateChangeEmitters: Map;
+ protected autoRefreshTicker: ReturnType | null;
+ protected visibilityChangedCallback: (() => Promise) | null;
+ protected refreshingDeferred: Deferred | null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the auth state is known and it's safe to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ protected initializePromise: Promise | null;
+ protected detectSessionInUrl: boolean;
+ protected url: string;
+ protected headers: {
+ [key: string]: string;
+ };
+ protected hasCustomAuthorizationHeader: boolean;
+ protected suppressGetSessionWarning: boolean;
+ protected fetch: Fetch;
+ protected lock: LockFunc;
+ protected lockAcquired: boolean;
+ protected pendingInLock: Promise[];
+ protected throwOnError: boolean;
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ protected broadcastChannel: BroadcastChannel | null;
+ protected logDebugMessages: boolean;
+ protected logger: (message: string, ...args: any[]) => void;
+ /**
+ * Create a new client for use in the browser.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueClient } from '@supabase/auth-js'
+ *
+ * const auth = new GoTrueClient({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { apikey: 'public-anon-key' },
+ * storageKey: 'supabase-auth',
+ * })
+ * ```
+ */
+ constructor(options: GoTrueClientOptions);
+ /**
+ * Returns whether error throwing mode is enabled for this client.
+ */
+ isThrowOnErrorEnabled(): boolean;
+ /**
+ * Centralizes return handling with optional error throwing. When `throwOnError` is enabled
+ * and the provided result contains a non-nullish error, the error is thrown instead of
+ * being returned. This ensures consistent behavior across all public API methods.
+ */
+ private _returnResult;
+ private _logPrefix;
+ private _debug;
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ initialize(): Promise;
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ private _initialize;
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ signInAnonymously(credentials?: SignInAnonymouslyCredentials): Promise;
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ signUp(credentials: SignUpWithPasswordCredentials): Promise;
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ signInWithPassword(credentials: SignInWithPasswordCredentials): Promise;
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ signInWithOAuth(credentials: SignInWithOAuthCredentials): Promise;
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ exchangeCodeForSession(authCode: string): Promise;
+ /**
+ * Signs in a user by verifying a message signed by the user's private key.
+ * Supports Ethereum (via Sign-In-With-Ethereum) & Solana (Sign-In-With-Solana) standards,
+ * both of which derive from the EIP-4361 standard
+ * With slight variation on Solana's side.
+ * @reference https://eips.ethereum.org/EIPS/eip-4361
+ */
+ signInWithWeb3(credentials: Web3Credentials): Promise<{
+ data: {
+ session: Session;
+ user: User;
+ };
+ error: null;
+ } | {
+ data: {
+ session: null;
+ user: null;
+ };
+ error: AuthError;
+ }>;
+ private signInWithEthereum;
+ private signInWithSolana;
+ private _exchangeCodeForSession;
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ signInWithIdToken(credentials: SignInWithIdTokenCredentials): Promise;
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ signInWithOtp(credentials: SignInWithPasswordlessCredentials): Promise;
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ verifyOtp(params: VerifyOtpParams): Promise;
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ signInWithSSO(params: SignInWithSSO): Promise;
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ reauthenticate(): Promise;
+ private _reauthenticate;
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ resend(credentials: ResendParams): Promise;
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ getSession(): Promise<{
+ data: {
+ session: Session;
+ };
+ error: null;
+ } | {
+ data: {
+ session: null;
+ };
+ error: AuthError;
+ } | {
+ data: {
+ session: null;
+ };
+ error: null;
+ }>;
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ private _acquireLock;
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ private _useSession;
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ private __loadSession;
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ getUser(jwt?: string): Promise;
+ private _getUser;
+ /**
+ * Updates user data for a logged in user.
+ */
+ updateUser(attributes: UserAttributes, options?: {
+ emailRedirectTo?: string | undefined;
+ }): Promise;
+ protected _updateUser(attributes: UserAttributes, options?: {
+ emailRedirectTo?: string | undefined;
+ }): Promise;
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ setSession(currentSession: {
+ access_token: string;
+ refresh_token: string;
+ }): Promise;
+ protected _setSession(currentSession: {
+ access_token: string;
+ refresh_token: string;
+ }): Promise;
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ refreshSession(currentSession?: {
+ refresh_token: string;
+ }): Promise;
+ protected _refreshSession(currentSession?: {
+ refresh_token: string;
+ }): Promise;
+ /**
+ * Gets the session data from a URL string
+ */
+ private _getSessionFromURL;
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ private _isImplicitGrantCallback;
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ private _isPKCECallback;
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ signOut(options?: SignOut): Promise<{
+ error: AuthError | null;
+ }>;
+ protected _signOut({ scope }?: SignOut): Promise<{
+ error: AuthError | null;
+ }>;
+ /**
+ * Receive a notification every time an auth event happens.
+ * Safe to use without an async function as callback.
+ *
+ * @param callback A callback function to be invoked when an auth event happens.
+ */
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => void): {
+ data: {
+ subscription: Subscription;
+ };
+ };
+ /**
+ * Avoid using an async function inside `onAuthStateChange` as you might end
+ * up with a deadlock. The callback function runs inside an exclusive lock,
+ * so calling other Supabase Client APIs that also try to acquire the
+ * exclusive lock, might cause a deadlock. This behavior is observable across
+ * tabs. In the next major library version, this behavior will not be supported.
+ *
+ * Receive a notification every time an auth event happens.
+ *
+ * @param callback A callback function to be invoked when an auth event happens.
+ * @deprecated Due to the possibility of deadlocks with async functions as callbacks, use the version without an async function.
+ */
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => Promise): {
+ data: {
+ subscription: Subscription;
+ };
+ };
+ private _emitInitialSession;
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ resetPasswordForEmail(email: string, options?: {
+ redirectTo?: string;
+ captchaToken?: string;
+ }): Promise<{
+ data: {};
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Gets all the identities linked to a user.
+ */
+ getUserIdentities(): Promise<{
+ data: {
+ identities: UserIdentity[];
+ };
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Links an oauth identity to an existing user.
+ * This method supports the PKCE flow.
+ */
+ linkIdentity(credentials: SignInWithOAuthCredentials): Promise;
+ /**
+ * Links an OIDC identity to an existing user.
+ */
+ linkIdentity(credentials: SignInWithIdTokenCredentials): Promise;
+ private linkIdentityOAuth;
+ private linkIdentityIdToken;
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ unlinkIdentity(identity: UserIdentity): Promise<{
+ data: {};
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ }>;
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ private _refreshAccessToken;
+ private _isValidSession;
+ private _handleProviderSignIn;
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ private _recoverAndRefresh;
+ private _callRefreshToken;
+ private _notifyAllSubscribers;
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ private _saveSession;
+ private _removeSession;
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ private _removeVisibilityChangedCallback;
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ private _startAutoRefresh;
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ private _stopAutoRefresh;
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ startAutoRefresh(): Promise;
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ stopAutoRefresh(): Promise;
+ /**
+ * Runs the auto refresh token tick.
+ */
+ private _autoRefreshTokenTick;
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ private _handleVisibilityChange;
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ private _onVisibilityChanged;
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ private _getUrlForProvider;
+ private _unenroll;
+ /**
+ * {@see GoTrueMFAApi#enroll}
+ */
+ private _enroll;
+ /**
+ * {@see GoTrueMFAApi#verify}
+ */
+ private _verify;
+ /**
+ * {@see GoTrueMFAApi#challenge}
+ */
+ private _challenge;
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ private _challengeAndVerify;
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ private _listFactors;
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ private _getAuthenticatorAssuranceLevel;
+ /**
+ * Retrieves details about an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * Returns authorization details including client info, scopes, and user information.
+ * If the API returns a redirect_uri, it means consent was already given - the caller
+ * should handle the redirect manually if needed.
+ */
+ private _getAuthorizationDetails;
+ /**
+ * Approves an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _approveAuthorization;
+ /**
+ * Denies an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _denyAuthorization;
+ /**
+ * Lists all OAuth grants that the authenticated user has authorized.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _listOAuthGrants;
+ /**
+ * Revokes a user's OAuth grant for a specific client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ private _revokeOAuthGrant;
+ private fetchJwk;
+ /**
+ * Extracts the JWT claims present in the access token by first verifying the
+ * JWT against the server's JSON Web Key Set endpoint
+ * `/.well-known/jwks.json` which is often cached, resulting in significantly
+ * faster responses. Prefer this method over {@link #getUser} which always
+ * sends a request to the Auth server for each JWT.
+ *
+ * If the project is not using an asymmetric JWT signing key (like ECC or
+ * RSA) it always sends a request to the Auth server (similar to {@link
+ * #getUser}) to verify the JWT.
+ *
+ * @param jwt An optional specific JWT you wish to verify, not the one you
+ * can obtain from {@link #getSession}.
+ * @param options Various additional options that allow you to customize the
+ * behavior of this method.
+ */
+ getClaims(jwt?: string, options?: {
+ /**
+ * @deprecated Please use options.jwks instead.
+ */
+ keys?: JWK[];
+ /** If set to `true` the `exp` claim will not be validated against the current time. */
+ allowExpired?: boolean;
+ /** If set, this JSON Web Key Set is going to have precedence over the cached value available on the server. */
+ jwks?: {
+ keys: JWK[];
+ };
+ }): Promise<{
+ data: {
+ claims: JwtPayload;
+ header: JwtHeader;
+ signature: Uint8Array;
+ };
+ error: null;
+ } | {
+ data: null;
+ error: AuthError;
+ } | {
+ data: null;
+ error: null;
+ }>;
+}
+//# sourceMappingURL=GoTrueClient.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map
new file mode 100644
index 0000000..f01c185
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueClient.d.ts","sourceRoot":"","sources":["../../src/GoTrueClient.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAU7C,OAAO,EACL,SAAS,EAaV,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,KAAK,EAMN,MAAM,aAAa,CAAA;AACpB,OAAO,EAGL,QAAQ,EAgBT,MAAM,eAAe,CAAA;AAOtB,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EAcZ,eAAe,EACf,YAAY,EAEZ,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EAItB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,GAAG,EACH,SAAS,EACT,UAAU,EACV,QAAQ,EAgBR,aAAa,EACb,kBAAkB,EAOlB,YAAY,EACZ,OAAO,EACP,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,EAC7B,iCAAiC,EACjC,aAAa,EACb,OAAO,EACP,6BAA6B,EAG7B,WAAW,EAEX,YAAY,EACZ,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EAChB,MAAM,aAAa,CAAA;AAsDpB,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,MAAM,CAAC,cAAc,CAA6B;IAE1D,OAAO,CAAC,UAAU,CAAQ;IAE1B;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA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;QACvF,YAAY,CAAC,EAAE,OAAO,CAAA;QAEtB,+GAA+G;QAC/G,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,GAAG,EAAE,CAAA;SAAE,CAAA;KAClB,GACL,OAAO,CACN;QACE,IAAI,EAAE;YAAE,MAAM,EAAE,UAAU,CAAC;YAAC,MAAM,EAAE,SAAS,CAAC;YAAC,SAAS,EAAE,UAAU,CAAA;SAAE,CAAA;QACtE,KAAK,EAAE,IAAI,CAAA;KACZ,GACD;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,GAChC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,IAAI,CAAA;KAAE,CAC9B;CAmFF"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js
new file mode 100644
index 0000000..ad0f991
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js
@@ -0,0 +1,2786 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import { AUTO_REFRESH_TICK_DURATION_MS, AUTO_REFRESH_TICK_THRESHOLD, DEFAULT_HEADERS, EXPIRY_MARGIN_MS, GOTRUE_URL, JWKS_TTL, STORAGE_KEY, } from './lib/constants';
+import { AuthImplicitGrantRedirectError, AuthInvalidCredentialsError, AuthInvalidJwtError, AuthInvalidTokenResponseError, AuthPKCEGrantCodeExchangeError, AuthSessionMissingError, AuthUnknownError, isAuthApiError, isAuthError, isAuthImplicitGrantRedirectError, isAuthRetryableFetchError, isAuthSessionMissingError, } from './lib/errors';
+import { _request, _sessionResponse, _sessionResponsePassword, _ssoResponse, _userResponse, } from './lib/fetch';
+import { decodeJWT, deepClone, Deferred, generateCallbackId, getAlgorithm, getCodeChallengeAndMethod, getItemAsync, insecureUserWarningProxy, isBrowser, parseParametersFromURL, removeItemAsync, resolveFetch, retryable, setItemAsync, sleep, supportsLocalStorage, userNotAvailableProxy, validateExp, } from './lib/helpers';
+import { memoryLocalStorageAdapter } from './lib/local-storage';
+import { LockAcquireTimeoutError, navigatorLock } from './lib/locks';
+import { polyfillGlobalThis } from './lib/polyfills';
+import { version } from './lib/version';
+import { bytesToBase64URL, stringToUint8Array } from './lib/base64url';
+import { createSiweMessage, fromHex, getAddress, toHex, } from './lib/web3/ethereum';
+import { deserializeCredentialCreationOptions, deserializeCredentialRequestOptions, serializeCredentialCreationResponse, serializeCredentialRequestResponse, WebAuthnApi, } from './lib/webauthn';
+polyfillGlobalThis(); // Make "globalThis" available
+const DEFAULT_OPTIONS = {
+ url: GOTRUE_URL,
+ storageKey: STORAGE_KEY,
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ headers: DEFAULT_HEADERS,
+ flowType: 'implicit',
+ debug: false,
+ hasCustomAuthorizationHeader: false,
+ throwOnError: false,
+};
+async function lockNoOp(name, acquireTimeout, fn) {
+ return await fn();
+}
+/**
+ * Caches JWKS values for all clients created in the same environment. This is
+ * especially useful for shared-memory execution environments such as Vercel's
+ * Fluid Compute, AWS Lambda or Supabase's Edge Functions. Regardless of how
+ * many clients are created, if they share the same storage key they will use
+ * the same JWKS cache, significantly speeding up getClaims() with asymmetric
+ * JWTs.
+ */
+const GLOBAL_JWKS = {};
+class GoTrueClient {
+ /**
+ * The JWKS used for verifying asymmetric JWTs
+ */
+ get jwks() {
+ var _a, _b;
+ return (_b = (_a = GLOBAL_JWKS[this.storageKey]) === null || _a === void 0 ? void 0 : _a.jwks) !== null && _b !== void 0 ? _b : { keys: [] };
+ }
+ set jwks(value) {
+ GLOBAL_JWKS[this.storageKey] = Object.assign(Object.assign({}, GLOBAL_JWKS[this.storageKey]), { jwks: value });
+ }
+ get jwks_cached_at() {
+ var _a, _b;
+ return (_b = (_a = GLOBAL_JWKS[this.storageKey]) === null || _a === void 0 ? void 0 : _a.cachedAt) !== null && _b !== void 0 ? _b : Number.MIN_SAFE_INTEGER;
+ }
+ set jwks_cached_at(value) {
+ GLOBAL_JWKS[this.storageKey] = Object.assign(Object.assign({}, GLOBAL_JWKS[this.storageKey]), { cachedAt: value });
+ }
+ /**
+ * Create a new client for use in the browser.
+ *
+ * @example
+ * ```ts
+ * import { GoTrueClient } from '@supabase/auth-js'
+ *
+ * const auth = new GoTrueClient({
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
+ * headers: { apikey: 'public-anon-key' },
+ * storageKey: 'supabase-auth',
+ * })
+ * ```
+ */
+ constructor(options) {
+ var _a, _b, _c;
+ /**
+ * @experimental
+ */
+ this.userStorage = null;
+ this.memoryStorage = null;
+ this.stateChangeEmitters = new Map();
+ this.autoRefreshTicker = null;
+ this.visibilityChangedCallback = null;
+ this.refreshingDeferred = null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the auth state is known and it's safe to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ this.initializePromise = null;
+ this.detectSessionInUrl = true;
+ this.hasCustomAuthorizationHeader = false;
+ this.suppressGetSessionWarning = false;
+ this.lockAcquired = false;
+ this.pendingInLock = [];
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ this.broadcastChannel = null;
+ this.logger = console.log;
+ const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);
+ this.storageKey = settings.storageKey;
+ this.instanceID = (_a = GoTrueClient.nextInstanceID[this.storageKey]) !== null && _a !== void 0 ? _a : 0;
+ GoTrueClient.nextInstanceID[this.storageKey] = this.instanceID + 1;
+ this.logDebugMessages = !!settings.debug;
+ if (typeof settings.debug === 'function') {
+ this.logger = settings.debug;
+ }
+ if (this.instanceID > 0 && isBrowser()) {
+ const message = `${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;
+ console.warn(message);
+ if (this.logDebugMessages) {
+ console.trace(message);
+ }
+ }
+ this.persistSession = settings.persistSession;
+ this.autoRefreshToken = settings.autoRefreshToken;
+ this.admin = new GoTrueAdminApi({
+ url: settings.url,
+ headers: settings.headers,
+ fetch: settings.fetch,
+ });
+ this.url = settings.url;
+ this.headers = settings.headers;
+ this.fetch = resolveFetch(settings.fetch);
+ this.lock = settings.lock || lockNoOp;
+ this.detectSessionInUrl = settings.detectSessionInUrl;
+ this.flowType = settings.flowType;
+ this.hasCustomAuthorizationHeader = settings.hasCustomAuthorizationHeader;
+ this.throwOnError = settings.throwOnError;
+ if (settings.lock) {
+ this.lock = settings.lock;
+ }
+ else if (this.persistSession && isBrowser() && ((_b = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _b === void 0 ? void 0 : _b.locks)) {
+ this.lock = navigatorLock;
+ }
+ else {
+ this.lock = lockNoOp;
+ }
+ if (!this.jwks) {
+ this.jwks = { keys: [] };
+ this.jwks_cached_at = Number.MIN_SAFE_INTEGER;
+ }
+ this.mfa = {
+ verify: this._verify.bind(this),
+ enroll: this._enroll.bind(this),
+ unenroll: this._unenroll.bind(this),
+ challenge: this._challenge.bind(this),
+ listFactors: this._listFactors.bind(this),
+ challengeAndVerify: this._challengeAndVerify.bind(this),
+ getAuthenticatorAssuranceLevel: this._getAuthenticatorAssuranceLevel.bind(this),
+ webauthn: new WebAuthnApi(this),
+ };
+ this.oauth = {
+ getAuthorizationDetails: this._getAuthorizationDetails.bind(this),
+ approveAuthorization: this._approveAuthorization.bind(this),
+ denyAuthorization: this._denyAuthorization.bind(this),
+ listGrants: this._listOAuthGrants.bind(this),
+ revokeGrant: this._revokeOAuthGrant.bind(this),
+ };
+ if (this.persistSession) {
+ if (settings.storage) {
+ this.storage = settings.storage;
+ }
+ else {
+ if (supportsLocalStorage()) {
+ this.storage = globalThis.localStorage;
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
+ }
+ }
+ if (settings.userStorage) {
+ this.userStorage = settings.userStorage;
+ }
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
+ }
+ if (isBrowser() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
+ try {
+ this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
+ }
+ catch (e) {
+ console.error('Failed to create a new BroadcastChannel, multi-tab state changes will not be available', e);
+ }
+ (_c = this.broadcastChannel) === null || _c === void 0 ? void 0 : _c.addEventListener('message', async (event) => {
+ this._debug('received broadcast notification from other tab or client', event);
+ await this._notifyAllSubscribers(event.data.event, event.data.session, false); // broadcast = false so we don't get an endless loop of messages
+ });
+ }
+ this.initialize();
+ }
+ /**
+ * Returns whether error throwing mode is enabled for this client.
+ */
+ isThrowOnErrorEnabled() {
+ return this.throwOnError;
+ }
+ /**
+ * Centralizes return handling with optional error throwing. When `throwOnError` is enabled
+ * and the provided result contains a non-nullish error, the error is thrown instead of
+ * being returned. This ensures consistent behavior across all public API methods.
+ */
+ _returnResult(result) {
+ if (this.throwOnError && result && result.error) {
+ throw result.error;
+ }
+ return result;
+ }
+ _logPrefix() {
+ return ('GoTrueClient@' +
+ `${this.storageKey}:${this.instanceID} (${version}) ${new Date().toISOString()}`);
+ }
+ _debug(...args) {
+ if (this.logDebugMessages) {
+ this.logger(this._logPrefix(), ...args);
+ }
+ return this;
+ }
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ async initialize() {
+ if (this.initializePromise) {
+ return await this.initializePromise;
+ }
+ this.initializePromise = (async () => {
+ return await this._acquireLock(-1, async () => {
+ return await this._initialize();
+ });
+ })();
+ return await this.initializePromise;
+ }
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ async _initialize() {
+ var _a;
+ try {
+ let params = {};
+ let callbackUrlType = 'none';
+ if (isBrowser()) {
+ params = parseParametersFromURL(window.location.href);
+ if (this._isImplicitGrantCallback(params)) {
+ callbackUrlType = 'implicit';
+ }
+ else if (await this._isPKCECallback(params)) {
+ callbackUrlType = 'pkce';
+ }
+ }
+ /**
+ * Attempt to get the session from the URL only if these conditions are fulfilled
+ *
+ * Note: If the URL isn't one of the callback url types (implicit or pkce),
+ * then there could be an existing session so we don't want to prematurely remove it
+ */
+ if (isBrowser() && this.detectSessionInUrl && callbackUrlType !== 'none') {
+ const { data, error } = await this._getSessionFromURL(params, callbackUrlType);
+ if (error) {
+ this._debug('#_initialize()', 'error detecting session from URL', error);
+ if (isAuthImplicitGrantRedirectError(error)) {
+ const errorCode = (_a = error.details) === null || _a === void 0 ? void 0 : _a.code;
+ if (errorCode === 'identity_already_exists' ||
+ errorCode === 'identity_not_found' ||
+ errorCode === 'single_identity_not_deletable') {
+ return { error };
+ }
+ }
+ // failed login attempt via url,
+ // remove old session as in verifyOtp, signUp and signInWith*
+ await this._removeSession();
+ return { error };
+ }
+ const { session, redirectType } = data;
+ this._debug('#_initialize()', 'detected session in URL', session, 'redirect type', redirectType);
+ await this._saveSession(session);
+ setTimeout(async () => {
+ if (redirectType === 'recovery') {
+ await this._notifyAllSubscribers('PASSWORD_RECOVERY', session);
+ }
+ else {
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ }, 0);
+ return { error: null };
+ }
+ // no login attempt via callback url try to recover session from storage
+ await this._recoverAndRefresh();
+ return { error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ error });
+ }
+ return this._returnResult({
+ error: new AuthUnknownError('Unexpected error during initialization', error),
+ });
+ }
+ finally {
+ await this._handleVisibilityChange();
+ this._debug('#_initialize()', 'end');
+ }
+ }
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ async signInAnonymously(credentials) {
+ var _a, _b, _c;
+ try {
+ const res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ data: (_b = (_a = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {},
+ gotrue_meta_security: { captcha_token: (_c = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _c === void 0 ? void 0 : _c.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ const { data, error } = res;
+ if (error || !data) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ async signUp(credentials) {
+ var _a, _b, _c;
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: {
+ email,
+ password,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ xform: _sessionResponse,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ data: (_b = options === null || options === void 0 ? void 0 : options.data) !== null && _b !== void 0 ? _b : {},
+ channel: (_c = options === null || options === void 0 ? void 0 : options.channel) !== null && _c !== void 0 ? _c : 'sms',
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ }
+ else {
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error || !data) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ async signInWithPassword(credentials) {
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ email,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponsePassword,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponsePassword,
+ });
+ }
+ else {
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ const invalidTokenError = new AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({
+ data: Object.assign({ user: data.user, session: data.session }, (data.weak_password ? { weakPassword: data.weak_password } : null)),
+ error,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ async signInWithOAuth(credentials) {
+ var _a, _b, _c, _d;
+ return await this._handleProviderSignIn(credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: (_d = credentials.options) === null || _d === void 0 ? void 0 : _d.skipBrowserRedirect,
+ });
+ }
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ async exchangeCodeForSession(authCode) {
+ await this.initializePromise;
+ return this._acquireLock(-1, async () => {
+ return this._exchangeCodeForSession(authCode);
+ });
+ }
+ /**
+ * Signs in a user by verifying a message signed by the user's private key.
+ * Supports Ethereum (via Sign-In-With-Ethereum) & Solana (Sign-In-With-Solana) standards,
+ * both of which derive from the EIP-4361 standard
+ * With slight variation on Solana's side.
+ * @reference https://eips.ethereum.org/EIPS/eip-4361
+ */
+ async signInWithWeb3(credentials) {
+ const { chain } = credentials;
+ switch (chain) {
+ case 'ethereum':
+ return await this.signInWithEthereum(credentials);
+ case 'solana':
+ return await this.signInWithSolana(credentials);
+ default:
+ throw new Error(`@supabase/auth-js: Unsupported chain "${chain}"`);
+ }
+ }
+ async signInWithEthereum(credentials) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
+ // TODO: flatten type
+ let message;
+ let signature;
+ if ('message' in credentials) {
+ message = credentials.message;
+ signature = credentials.signature;
+ }
+ else {
+ const { chain, wallet, statement, options } = credentials;
+ let resolvedWallet;
+ if (!isBrowser()) {
+ if (typeof wallet !== 'object' || !(options === null || options === void 0 ? void 0 : options.url)) {
+ throw new Error('@supabase/auth-js: Both wallet and url must be specified in non-browser environments.');
+ }
+ resolvedWallet = wallet;
+ }
+ else if (typeof wallet === 'object') {
+ resolvedWallet = wallet;
+ }
+ else {
+ const windowAny = window;
+ if ('ethereum' in windowAny &&
+ typeof windowAny.ethereum === 'object' &&
+ 'request' in windowAny.ethereum &&
+ typeof windowAny.ethereum.request === 'function') {
+ resolvedWallet = windowAny.ethereum;
+ }
+ else {
+ throw new Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`);
+ }
+ }
+ const url = new URL((_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : window.location.href);
+ const accounts = await resolvedWallet
+ .request({
+ method: 'eth_requestAccounts',
+ })
+ .then((accs) => accs)
+ .catch(() => {
+ throw new Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`);
+ });
+ if (!accounts || accounts.length === 0) {
+ throw new Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);
+ }
+ const address = getAddress(accounts[0]);
+ let chainId = (_b = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _b === void 0 ? void 0 : _b.chainId;
+ if (!chainId) {
+ const chainIdHex = await resolvedWallet.request({
+ method: 'eth_chainId',
+ });
+ chainId = fromHex(chainIdHex);
+ }
+ const siweMessage = {
+ domain: url.host,
+ address: address,
+ statement: statement,
+ uri: url.href,
+ version: '1',
+ chainId: chainId,
+ nonce: (_c = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _c === void 0 ? void 0 : _c.nonce,
+ issuedAt: (_e = (_d = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _d === void 0 ? void 0 : _d.issuedAt) !== null && _e !== void 0 ? _e : new Date(),
+ expirationTime: (_f = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _f === void 0 ? void 0 : _f.expirationTime,
+ notBefore: (_g = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _g === void 0 ? void 0 : _g.notBefore,
+ requestId: (_h = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _h === void 0 ? void 0 : _h.requestId,
+ resources: (_j = options === null || options === void 0 ? void 0 : options.signInWithEthereum) === null || _j === void 0 ? void 0 : _j.resources,
+ };
+ message = createSiweMessage(siweMessage);
+ // Sign message
+ signature = (await resolvedWallet.request({
+ method: 'personal_sign',
+ params: [toHex(message), address],
+ }));
+ }
+ try {
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=web3`, {
+ headers: this.headers,
+ body: Object.assign({ chain: 'ethereum', message,
+ signature }, (((_k = credentials.options) === null || _k === void 0 ? void 0 : _k.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: (_l = credentials.options) === null || _l === void 0 ? void 0 : _l.captchaToken } }
+ : null)),
+ xform: _sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign({}, data), error });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ async signInWithSolana(credentials) {
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
+ let message;
+ let signature;
+ if ('message' in credentials) {
+ message = credentials.message;
+ signature = credentials.signature;
+ }
+ else {
+ const { chain, wallet, statement, options } = credentials;
+ let resolvedWallet;
+ if (!isBrowser()) {
+ if (typeof wallet !== 'object' || !(options === null || options === void 0 ? void 0 : options.url)) {
+ throw new Error('@supabase/auth-js: Both wallet and url must be specified in non-browser environments.');
+ }
+ resolvedWallet = wallet;
+ }
+ else if (typeof wallet === 'object') {
+ resolvedWallet = wallet;
+ }
+ else {
+ const windowAny = window;
+ if ('solana' in windowAny &&
+ typeof windowAny.solana === 'object' &&
+ (('signIn' in windowAny.solana && typeof windowAny.solana.signIn === 'function') ||
+ ('signMessage' in windowAny.solana &&
+ typeof windowAny.solana.signMessage === 'function'))) {
+ resolvedWallet = windowAny.solana;
+ }
+ else {
+ throw new Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`);
+ }
+ }
+ const url = new URL((_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : window.location.href);
+ if ('signIn' in resolvedWallet && resolvedWallet.signIn) {
+ const output = await resolvedWallet.signIn(Object.assign(Object.assign(Object.assign({ issuedAt: new Date().toISOString() }, options === null || options === void 0 ? void 0 : options.signInWithSolana), {
+ // non-overridable properties
+ version: '1', domain: url.host, uri: url.href }), (statement ? { statement } : null)));
+ let outputToProcess;
+ if (Array.isArray(output) && output[0] && typeof output[0] === 'object') {
+ outputToProcess = output[0];
+ }
+ else if (output &&
+ typeof output === 'object' &&
+ 'signedMessage' in output &&
+ 'signature' in output) {
+ outputToProcess = output;
+ }
+ else {
+ throw new Error('@supabase/auth-js: Wallet method signIn() returned unrecognized value');
+ }
+ if ('signedMessage' in outputToProcess &&
+ 'signature' in outputToProcess &&
+ (typeof outputToProcess.signedMessage === 'string' ||
+ outputToProcess.signedMessage instanceof Uint8Array) &&
+ outputToProcess.signature instanceof Uint8Array) {
+ message =
+ typeof outputToProcess.signedMessage === 'string'
+ ? outputToProcess.signedMessage
+ : new TextDecoder().decode(outputToProcess.signedMessage);
+ signature = outputToProcess.signature;
+ }
+ else {
+ throw new Error('@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields');
+ }
+ }
+ else {
+ if (!('signMessage' in resolvedWallet) ||
+ typeof resolvedWallet.signMessage !== 'function' ||
+ !('publicKey' in resolvedWallet) ||
+ typeof resolvedWallet !== 'object' ||
+ !resolvedWallet.publicKey ||
+ !('toBase58' in resolvedWallet.publicKey) ||
+ typeof resolvedWallet.publicKey.toBase58 !== 'function') {
+ throw new Error('@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API');
+ }
+ message = [
+ `${url.host} wants you to sign in with your Solana account:`,
+ resolvedWallet.publicKey.toBase58(),
+ ...(statement ? ['', statement, ''] : ['']),
+ 'Version: 1',
+ `URI: ${url.href}`,
+ `Issued At: ${(_c = (_b = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _b === void 0 ? void 0 : _b.issuedAt) !== null && _c !== void 0 ? _c : new Date().toISOString()}`,
+ ...(((_d = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _d === void 0 ? void 0 : _d.notBefore)
+ ? [`Not Before: ${options.signInWithSolana.notBefore}`]
+ : []),
+ ...(((_e = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _e === void 0 ? void 0 : _e.expirationTime)
+ ? [`Expiration Time: ${options.signInWithSolana.expirationTime}`]
+ : []),
+ ...(((_f = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _f === void 0 ? void 0 : _f.chainId)
+ ? [`Chain ID: ${options.signInWithSolana.chainId}`]
+ : []),
+ ...(((_g = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _g === void 0 ? void 0 : _g.nonce) ? [`Nonce: ${options.signInWithSolana.nonce}`] : []),
+ ...(((_h = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _h === void 0 ? void 0 : _h.requestId)
+ ? [`Request ID: ${options.signInWithSolana.requestId}`]
+ : []),
+ ...(((_k = (_j = options === null || options === void 0 ? void 0 : options.signInWithSolana) === null || _j === void 0 ? void 0 : _j.resources) === null || _k === void 0 ? void 0 : _k.length)
+ ? [
+ 'Resources',
+ ...options.signInWithSolana.resources.map((resource) => `- ${resource}`),
+ ]
+ : []),
+ ].join('\n');
+ const maybeSignature = await resolvedWallet.signMessage(new TextEncoder().encode(message), 'utf8');
+ if (!maybeSignature || !(maybeSignature instanceof Uint8Array)) {
+ throw new Error('@supabase/auth-js: Wallet signMessage() API returned an recognized value');
+ }
+ signature = maybeSignature;
+ }
+ }
+ try {
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=web3`, {
+ headers: this.headers,
+ body: Object.assign({ chain: 'solana', message, signature: bytesToBase64URL(signature) }, (((_l = credentials.options) === null || _l === void 0 ? void 0 : _l.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: (_m = credentials.options) === null || _m === void 0 ? void 0 : _m.captchaToken } }
+ : null)),
+ xform: _sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign({}, data), error });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ async _exchangeCodeForSession(authCode) {
+ const storageItem = await getItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ const [codeVerifier, redirectType] = (storageItem !== null && storageItem !== void 0 ? storageItem : '').split('/');
+ try {
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=pkce`, {
+ headers: this.headers,
+ body: {
+ auth_code: authCode,
+ code_verifier: codeVerifier,
+ },
+ xform: _sessionResponse,
+ });
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ const invalidTokenError = new AuthInvalidTokenResponseError();
+ return this._returnResult({
+ data: { user: null, session: null, redirectType: null },
+ error: invalidTokenError,
+ });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data: Object.assign(Object.assign({}, data), { redirectType: redirectType !== null && redirectType !== void 0 ? redirectType : null }), error });
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({
+ data: { user: null, session: null, redirectType: null },
+ error,
+ });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ async signInWithIdToken(credentials) {
+ try {
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ const invalidTokenError = new AuthInvalidTokenResponseError();
+ return this._returnResult({ data: { user: null, session: null }, error: invalidTokenError });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return this._returnResult({ data, error });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ async signInWithOtp(credentials) {
+ var _a, _b, _c, _d, _e;
+ try {
+ if ('email' in credentials) {
+ const { email, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ const { error } = await _request(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ email,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ create_user: (_b = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _b !== void 0 ? _b : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ if ('phone' in credentials) {
+ const { phone, options } = credentials;
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ phone,
+ data: (_c = options === null || options === void 0 ? void 0 : options.data) !== null && _c !== void 0 ? _c : {},
+ create_user: (_d = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _d !== void 0 ? _d : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ channel: (_e = options === null || options === void 0 ? void 0 : options.channel) !== null && _e !== void 0 ? _e : 'sms',
+ },
+ });
+ return this._returnResult({
+ data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id },
+ error,
+ });
+ }
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number.');
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ async verifyOtp(params) {
+ var _a, _b;
+ try {
+ let redirectTo = undefined;
+ let captchaToken = undefined;
+ if ('options' in params) {
+ redirectTo = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo;
+ captchaToken = (_b = params.options) === null || _b === void 0 ? void 0 : _b.captchaToken;
+ }
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/verify`, {
+ headers: this.headers,
+ body: Object.assign(Object.assign({}, params), { gotrue_meta_security: { captcha_token: captchaToken } }),
+ redirectTo,
+ xform: _sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data) {
+ const tokenVerificationError = new Error('An error occurred on token verification.');
+ throw tokenVerificationError;
+ }
+ const session = data.session;
+ const user = data.user;
+ if (session === null || session === void 0 ? void 0 : session.access_token) {
+ await this._saveSession(session);
+ await this._notifyAllSubscribers(params.type == 'recovery' ? 'PASSWORD_RECOVERY' : 'SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user, session }, error: null });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ async signInWithSSO(params) {
+ var _a, _b, _c, _d, _e;
+ try {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ const result = await _request(this.fetch, 'POST', `${this.url}/sso`, {
+ body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ('providerId' in params ? { provider_id: params.providerId } : null)), ('domain' in params ? { domain: params.domain } : null)), { redirect_to: (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo) !== null && _b !== void 0 ? _b : undefined }), (((_c = params === null || params === void 0 ? void 0 : params.options) === null || _c === void 0 ? void 0 : _c.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: params.options.captchaToken } }
+ : null)), { skip_http_redirect: true, code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ headers: this.headers,
+ xform: _ssoResponse,
+ });
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if (((_d = result.data) === null || _d === void 0 ? void 0 : _d.url) && isBrowser() && !((_e = params.options) === null || _e === void 0 ? void 0 : _e.skipBrowserRedirect)) {
+ window.location.assign(result.data.url);
+ }
+ return this._returnResult(result);
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ async reauthenticate() {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._reauthenticate();
+ });
+ }
+ async _reauthenticate() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError)
+ throw sessionError;
+ if (!session)
+ throw new AuthSessionMissingError();
+ const { error } = await _request(this.fetch, 'GET', `${this.url}/reauthenticate`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ async resend(credentials) {
+ try {
+ const endpoint = `${this.url}/resend`;
+ if ('email' in credentials) {
+ const { email, type, options } = credentials;
+ const { error } = await _request(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ email,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if ('phone' in credentials) {
+ const { phone, type, options } = credentials;
+ const { data, error } = await _request(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ phone,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ });
+ return this._returnResult({
+ data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id },
+ error,
+ });
+ }
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a type');
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ async getSession() {
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return this._useSession(async (result) => {
+ return result;
+ });
+ });
+ return result;
+ }
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ async _acquireLock(acquireTimeout, fn) {
+ this._debug('#_acquireLock', 'begin', acquireTimeout);
+ try {
+ if (this.lockAcquired) {
+ const last = this.pendingInLock.length
+ ? this.pendingInLock[this.pendingInLock.length - 1]
+ : Promise.resolve();
+ const result = (async () => {
+ await last;
+ return await fn();
+ })();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ return result;
+ }
+ return await this.lock(`lock:${this.storageKey}`, acquireTimeout, async () => {
+ this._debug('#_acquireLock', 'lock acquired for storage key', this.storageKey);
+ try {
+ this.lockAcquired = true;
+ const result = fn();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ await result;
+ // keep draining the queue until there's nothing to wait on
+ while (this.pendingInLock.length) {
+ const waitOn = [...this.pendingInLock];
+ await Promise.all(waitOn);
+ this.pendingInLock.splice(0, waitOn.length);
+ }
+ return await result;
+ }
+ finally {
+ this._debug('#_acquireLock', 'lock released for storage key', this.storageKey);
+ this.lockAcquired = false;
+ }
+ });
+ }
+ finally {
+ this._debug('#_acquireLock', 'end');
+ }
+ }
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ async _useSession(fn) {
+ this._debug('#_useSession', 'begin');
+ try {
+ // the use of __loadSession here is the only correct use of the function!
+ const result = await this.__loadSession();
+ return await fn(result);
+ }
+ finally {
+ this._debug('#_useSession', 'end');
+ }
+ }
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ async __loadSession() {
+ this._debug('#__loadSession()', 'begin');
+ if (!this.lockAcquired) {
+ this._debug('#__loadSession()', 'used outside of an acquired lock!', new Error().stack);
+ }
+ try {
+ let currentSession = null;
+ const maybeSession = await getItemAsync(this.storage, this.storageKey);
+ this._debug('#getSession()', 'session from storage', maybeSession);
+ if (maybeSession !== null) {
+ if (this._isValidSession(maybeSession)) {
+ currentSession = maybeSession;
+ }
+ else {
+ this._debug('#getSession()', 'session from storage is not valid');
+ await this._removeSession();
+ }
+ }
+ if (!currentSession) {
+ return { data: { session: null }, error: null };
+ }
+ // A session is considered expired before the access token _actually_
+ // expires. When the autoRefreshToken option is off (or when the tab is
+ // in the background), very eager users of getSession() -- like
+ // realtime-js -- might send a valid JWT which will expire by the time it
+ // reaches the server.
+ const hasExpired = currentSession.expires_at
+ ? currentSession.expires_at * 1000 - Date.now() < EXPIRY_MARGIN_MS
+ : false;
+ this._debug('#__loadSession()', `session has${hasExpired ? '' : ' not'} expired`, 'expires_at', currentSession.expires_at);
+ if (!hasExpired) {
+ if (this.userStorage) {
+ const maybeUser = (await getItemAsync(this.userStorage, this.storageKey + '-user'));
+ if (maybeUser === null || maybeUser === void 0 ? void 0 : maybeUser.user) {
+ currentSession.user = maybeUser.user;
+ }
+ else {
+ currentSession.user = userNotAvailableProxy();
+ }
+ }
+ // Wrap the user object with a warning proxy on the server
+ // This warns when properties of the user are accessed, not when session.user itself is accessed
+ if (this.storage.isServer &&
+ currentSession.user &&
+ !currentSession.user.__isUserNotAvailableProxy) {
+ const suppressWarningRef = { value: this.suppressGetSessionWarning };
+ currentSession.user = insecureUserWarningProxy(currentSession.user, suppressWarningRef);
+ // Update the client-level suppression flag when the proxy suppresses the warning
+ if (suppressWarningRef.value) {
+ this.suppressGetSessionWarning = true;
+ }
+ }
+ return { data: { session: currentSession }, error: null };
+ }
+ const { data: session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { session: null }, error });
+ }
+ return this._returnResult({ data: { session }, error: null });
+ }
+ finally {
+ this._debug('#__loadSession()', 'end');
+ }
+ }
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ async getUser(jwt) {
+ if (jwt) {
+ return await this._getUser(jwt);
+ }
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return await this._getUser();
+ });
+ if (result.data.user) {
+ this.suppressGetSessionWarning = true;
+ }
+ return result;
+ }
+ async _getUser(jwt) {
+ try {
+ if (jwt) {
+ return await _request(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: jwt,
+ xform: _userResponse,
+ });
+ }
+ return await this._useSession(async (result) => {
+ var _a, _b, _c;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ // returns an error if there is no access_token or custom authorization header
+ if (!((_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) && !this.hasCustomAuthorizationHeader) {
+ return { data: { user: null }, error: new AuthSessionMissingError() };
+ }
+ return await _request(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: (_c = (_b = data.session) === null || _b === void 0 ? void 0 : _b.access_token) !== null && _c !== void 0 ? _c : undefined,
+ xform: _userResponse,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ if (isAuthSessionMissingError(error)) {
+ // JWT contains a `session_id` which does not correspond to an active
+ // session in the database, indicating the user is signed out.
+ await this._removeSession();
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return this._returnResult({ data: { user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates user data for a logged in user.
+ */
+ async updateUser(attributes, options = {}) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._updateUser(attributes, options);
+ });
+ }
+ async _updateUser(attributes, options = {}) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ throw sessionError;
+ }
+ if (!sessionData.session) {
+ throw new AuthSessionMissingError();
+ }
+ const session = sessionData.session;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce' && attributes.email != null) {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ const { data, error: userError } = await _request(this.fetch, 'PUT', `${this.url}/user`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: Object.assign(Object.assign({}, attributes), { code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ jwt: session.access_token,
+ xform: _userResponse,
+ });
+ if (userError) {
+ throw userError;
+ }
+ session.user = data.user;
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('USER_UPDATED', session);
+ return this._returnResult({ data: { user: session.user }, error: null });
+ });
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ async setSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._setSession(currentSession);
+ });
+ }
+ async _setSession(currentSession) {
+ try {
+ if (!currentSession.access_token || !currentSession.refresh_token) {
+ throw new AuthSessionMissingError();
+ }
+ const timeNow = Date.now() / 1000;
+ let expiresAt = timeNow;
+ let hasExpired = true;
+ let session = null;
+ const { payload } = decodeJWT(currentSession.access_token);
+ if (payload.exp) {
+ expiresAt = payload.exp;
+ hasExpired = expiresAt <= timeNow;
+ }
+ if (hasExpired) {
+ const { data: refreshedSession, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ if (!refreshedSession) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ session = refreshedSession;
+ }
+ else {
+ const { data, error } = await this._getUser(currentSession.access_token);
+ if (error) {
+ throw error;
+ }
+ session = {
+ access_token: currentSession.access_token,
+ refresh_token: currentSession.refresh_token,
+ user: data.user,
+ token_type: 'bearer',
+ expires_in: expiresAt - timeNow,
+ expires_at: expiresAt,
+ };
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return this._returnResult({ data: { user: session.user, session }, error: null });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { session: null, user: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ async refreshSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._refreshSession(currentSession);
+ });
+ }
+ async _refreshSession(currentSession) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ if (!currentSession) {
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ currentSession = (_a = data.session) !== null && _a !== void 0 ? _a : undefined;
+ }
+ if (!(currentSession === null || currentSession === void 0 ? void 0 : currentSession.refresh_token)) {
+ throw new AuthSessionMissingError();
+ }
+ const { data: session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error: error });
+ }
+ if (!session) {
+ return this._returnResult({ data: { user: null, session: null }, error: null });
+ }
+ return this._returnResult({ data: { user: session.user, session }, error: null });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets the session data from a URL string
+ */
+ async _getSessionFromURL(params, callbackUrlType) {
+ try {
+ if (!isBrowser())
+ throw new AuthImplicitGrantRedirectError('No browser detected.');
+ // If there's an error in the URL, it doesn't matter what flow it is, we just return the error.
+ if (params.error || params.error_description || params.error_code) {
+ // The error class returned implies that the redirect is from an implicit grant flow
+ // but it could also be from a redirect error from a PKCE flow.
+ throw new AuthImplicitGrantRedirectError(params.error_description || 'Error in URL with unspecified error_description', {
+ error: params.error || 'unspecified_error',
+ code: params.error_code || 'unspecified_code',
+ });
+ }
+ // Checks for mismatches between the flowType initialised in the client and the URL parameters
+ switch (callbackUrlType) {
+ case 'implicit':
+ if (this.flowType === 'pkce') {
+ throw new AuthPKCEGrantCodeExchangeError('Not a valid PKCE flow url.');
+ }
+ break;
+ case 'pkce':
+ if (this.flowType === 'implicit') {
+ throw new AuthImplicitGrantRedirectError('Not a valid implicit grant flow url.');
+ }
+ break;
+ default:
+ // there's no mismatch so we continue
+ }
+ // Since this is a redirect for PKCE, we attempt to retrieve the code from the URL for the code exchange
+ if (callbackUrlType === 'pkce') {
+ this._debug('#_initialize()', 'begin', 'is PKCE flow', true);
+ if (!params.code)
+ throw new AuthPKCEGrantCodeExchangeError('No code detected.');
+ const { data, error } = await this._exchangeCodeForSession(params.code);
+ if (error)
+ throw error;
+ const url = new URL(window.location.href);
+ url.searchParams.delete('code');
+ window.history.replaceState(window.history.state, '', url.toString());
+ return { data: { session: data.session, redirectType: null }, error: null };
+ }
+ const { provider_token, provider_refresh_token, access_token, refresh_token, expires_in, expires_at, token_type, } = params;
+ if (!access_token || !expires_in || !refresh_token || !token_type) {
+ throw new AuthImplicitGrantRedirectError('No session defined in URL');
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresIn = parseInt(expires_in);
+ let expiresAt = timeNow + expiresIn;
+ if (expires_at) {
+ expiresAt = parseInt(expires_at);
+ }
+ const actuallyExpiresIn = expiresAt - timeNow;
+ if (actuallyExpiresIn * 1000 <= AUTO_REFRESH_TICK_DURATION_MS) {
+ console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${actuallyExpiresIn}s, should have been closer to ${expiresIn}s`);
+ }
+ const issuedAt = expiresAt - expiresIn;
+ if (timeNow - issuedAt >= 120) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale', issuedAt, expiresAt, timeNow);
+ }
+ else if (timeNow - issuedAt < 0) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew', issuedAt, expiresAt, timeNow);
+ }
+ const { data, error } = await this._getUser(access_token);
+ if (error)
+ throw error;
+ const session = {
+ provider_token,
+ provider_refresh_token,
+ access_token,
+ expires_in: expiresIn,
+ expires_at: expiresAt,
+ refresh_token,
+ token_type: token_type,
+ user: data.user,
+ };
+ // Remove tokens from URL
+ window.location.hash = '';
+ this._debug('#_getSessionFromURL()', 'clearing window.location.hash');
+ return this._returnResult({ data: { session, redirectType: params.type }, error: null });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { session: null, redirectType: null }, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ _isImplicitGrantCallback(params) {
+ return Boolean(params.access_token || params.error_description);
+ }
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ async _isPKCECallback(params) {
+ const currentStorageContent = await getItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ return !!(params.code && currentStorageContent);
+ }
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ async signOut(options = { scope: 'global' }) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._signOut(options);
+ });
+ }
+ async _signOut({ scope } = { scope: 'global' }) {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ error: sessionError });
+ }
+ const accessToken = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token;
+ if (accessToken) {
+ const { error } = await this.admin.signOut(accessToken, scope);
+ if (error) {
+ // ignore 404s since user might not exist anymore
+ // ignore 401s since an invalid or expired JWT should sign out the current session
+ if (!(isAuthApiError(error) &&
+ (error.status === 404 || error.status === 401 || error.status === 403))) {
+ return this._returnResult({ error });
+ }
+ }
+ }
+ if (scope !== 'others') {
+ await this._removeSession();
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return this._returnResult({ error: null });
+ });
+ }
+ onAuthStateChange(callback) {
+ const id = generateCallbackId();
+ const subscription = {
+ id,
+ callback,
+ unsubscribe: () => {
+ this._debug('#unsubscribe()', 'state change callback with id removed', id);
+ this.stateChangeEmitters.delete(id);
+ },
+ };
+ this._debug('#onAuthStateChange()', 'registered callback with id', id);
+ this.stateChangeEmitters.set(id, subscription);
+ (async () => {
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ this._emitInitialSession(id);
+ });
+ })();
+ return { data: { subscription } };
+ }
+ async _emitInitialSession(id) {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ try {
+ const { data: { session }, error, } = result;
+ if (error)
+ throw error;
+ await ((_a = this.stateChangeEmitters.get(id)) === null || _a === void 0 ? void 0 : _a.callback('INITIAL_SESSION', session));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'session', session);
+ }
+ catch (err) {
+ await ((_b = this.stateChangeEmitters.get(id)) === null || _b === void 0 ? void 0 : _b.callback('INITIAL_SESSION', null));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'error', err);
+ console.error(err);
+ }
+ });
+ }
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ async resetPasswordForEmail(email, options = {}) {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey, true // isPasswordRecovery
+ );
+ }
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/recover`, {
+ body: {
+ email,
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ gotrue_meta_security: { captcha_token: options.captchaToken },
+ },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ });
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets all the identities linked to a user.
+ */
+ async getUserIdentities() {
+ var _a;
+ try {
+ const { data, error } = await this.getUser();
+ if (error)
+ throw error;
+ return this._returnResult({ data: { identities: (_a = data.user.identities) !== null && _a !== void 0 ? _a : [] }, error: null });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async linkIdentity(credentials) {
+ if ('token' in credentials) {
+ return this.linkIdentityIdToken(credentials);
+ }
+ return this.linkIdentityOAuth(credentials);
+ }
+ async linkIdentityOAuth(credentials) {
+ var _a;
+ try {
+ const { data, error } = await this._useSession(async (result) => {
+ var _a, _b, _c, _d, _e;
+ const { data, error } = result;
+ if (error)
+ throw error;
+ const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: true,
+ });
+ return await _request(this.fetch, 'GET', url, {
+ headers: this.headers,
+ jwt: (_e = (_d = data.session) === null || _d === void 0 ? void 0 : _d.access_token) !== null && _e !== void 0 ? _e : undefined,
+ });
+ });
+ if (error)
+ throw error;
+ if (isBrowser() && !((_a = credentials.options) === null || _a === void 0 ? void 0 : _a.skipBrowserRedirect)) {
+ window.location.assign(data === null || data === void 0 ? void 0 : data.url);
+ }
+ return this._returnResult({
+ data: { provider: credentials.provider, url: data === null || data === void 0 ? void 0 : data.url },
+ error: null,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { provider: credentials.provider, url: null }, error });
+ }
+ throw error;
+ }
+ }
+ async linkIdentityIdToken(credentials) {
+ return await this._useSession(async (result) => {
+ var _a;
+ try {
+ const { error: sessionError, data: { session }, } = result;
+ if (sessionError)
+ throw sessionError;
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ jwt: (_a = session === null || session === void 0 ? void 0 : session.access_token) !== null && _a !== void 0 ? _a : undefined,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ link_identity: true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ else if (!data || !data.session || !data.user) {
+ return this._returnResult({
+ data: { user: null, session: null },
+ error: new AuthInvalidTokenResponseError(),
+ });
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('USER_UPDATED', data.session);
+ }
+ return this._returnResult({ data, error });
+ }
+ catch (error) {
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { user: null, session: null }, error });
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ async unlinkIdentity(identity) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ return await _request(this.fetch, 'DELETE', `${this.url}/user/identities/${identity.identity_id}`, {
+ headers: this.headers,
+ jwt: (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : undefined,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ async _refreshAccessToken(refreshToken) {
+ const debugName = `#_refreshAccessToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ const startedAt = Date.now();
+ // will attempt to refresh the token with exponential backoff
+ return await retryable(async (attempt) => {
+ if (attempt > 0) {
+ await sleep(200 * Math.pow(2, attempt - 1)); // 200, 400, 800, ...
+ }
+ this._debug(debugName, 'refreshing attempt', attempt);
+ return await _request(this.fetch, 'POST', `${this.url}/token?grant_type=refresh_token`, {
+ body: { refresh_token: refreshToken },
+ headers: this.headers,
+ xform: _sessionResponse,
+ });
+ }, (attempt, error) => {
+ const nextBackOffInterval = 200 * Math.pow(2, attempt);
+ return (error &&
+ isAuthRetryableFetchError(error) &&
+ // retryable only if the request can be sent before the backoff overflows the tick duration
+ Date.now() + nextBackOffInterval - startedAt < AUTO_REFRESH_TICK_DURATION_MS);
+ });
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if (isAuthError(error)) {
+ return this._returnResult({ data: { session: null, user: null }, error });
+ }
+ throw error;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ _isValidSession(maybeSession) {
+ const isValidSession = typeof maybeSession === 'object' &&
+ maybeSession !== null &&
+ 'access_token' in maybeSession &&
+ 'refresh_token' in maybeSession &&
+ 'expires_at' in maybeSession;
+ return isValidSession;
+ }
+ async _handleProviderSignIn(provider, options) {
+ const url = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
+ redirectTo: options.redirectTo,
+ scopes: options.scopes,
+ queryParams: options.queryParams,
+ });
+ this._debug('#_handleProviderSignIn()', 'provider', provider, 'options', options, 'url', url);
+ // try to open on the browser
+ if (isBrowser() && !options.skipBrowserRedirect) {
+ window.location.assign(url);
+ }
+ return { data: { provider, url }, error: null };
+ }
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ async _recoverAndRefresh() {
+ var _a, _b;
+ const debugName = '#_recoverAndRefresh()';
+ this._debug(debugName, 'begin');
+ try {
+ const currentSession = (await getItemAsync(this.storage, this.storageKey));
+ if (currentSession && this.userStorage) {
+ let maybeUser = (await getItemAsync(this.userStorage, this.storageKey + '-user'));
+ if (!this.storage.isServer && Object.is(this.storage, this.userStorage) && !maybeUser) {
+ // storage and userStorage are the same storage medium, for example
+ // window.localStorage if userStorage does not have the user from
+ // storage stored, store it first thereby migrating the user object
+ // from storage -> userStorage
+ maybeUser = { user: currentSession.user };
+ await setItemAsync(this.userStorage, this.storageKey + '-user', maybeUser);
+ }
+ currentSession.user = (_a = maybeUser === null || maybeUser === void 0 ? void 0 : maybeUser.user) !== null && _a !== void 0 ? _a : userNotAvailableProxy();
+ }
+ else if (currentSession && !currentSession.user) {
+ // user storage is not set, let's check if it was previously enabled so
+ // we bring back the storage as it should be
+ if (!currentSession.user) {
+ // test if userStorage was previously enabled and the storage medium was the same, to move the user back under the same key
+ const separateUser = (await getItemAsync(this.storage, this.storageKey + '-user'));
+ if (separateUser && (separateUser === null || separateUser === void 0 ? void 0 : separateUser.user)) {
+ currentSession.user = separateUser.user;
+ await removeItemAsync(this.storage, this.storageKey + '-user');
+ await setItemAsync(this.storage, this.storageKey, currentSession);
+ }
+ else {
+ currentSession.user = userNotAvailableProxy();
+ }
+ }
+ }
+ this._debug(debugName, 'session from storage', currentSession);
+ if (!this._isValidSession(currentSession)) {
+ this._debug(debugName, 'session is not valid');
+ if (currentSession !== null) {
+ await this._removeSession();
+ }
+ return;
+ }
+ const expiresWithMargin = ((_b = currentSession.expires_at) !== null && _b !== void 0 ? _b : Infinity) * 1000 - Date.now() < EXPIRY_MARGIN_MS;
+ this._debug(debugName, `session has${expiresWithMargin ? '' : ' not'} expired with margin of ${EXPIRY_MARGIN_MS}s`);
+ if (expiresWithMargin) {
+ if (this.autoRefreshToken && currentSession.refresh_token) {
+ const { error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ console.error(error);
+ if (!isAuthRetryableFetchError(error)) {
+ this._debug(debugName, 'refresh failed with a non-retryable error, removing the session', error);
+ await this._removeSession();
+ }
+ }
+ }
+ }
+ else if (currentSession.user &&
+ currentSession.user.__isUserNotAvailableProxy === true) {
+ // If we have a proxy user, try to get the real user data
+ try {
+ const { data, error: userError } = await this._getUser(currentSession.access_token);
+ if (!userError && (data === null || data === void 0 ? void 0 : data.user)) {
+ currentSession.user = data.user;
+ await this._saveSession(currentSession);
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ else {
+ this._debug(debugName, 'could not get user data, skipping SIGNED_IN notification');
+ }
+ }
+ catch (getUserError) {
+ console.error('Error getting user data:', getUserError);
+ this._debug(debugName, 'error getting user data, skipping SIGNED_IN notification', getUserError);
+ }
+ }
+ else {
+ // no need to persist currentSession again, as we just loaded it from
+ // local storage; persisting it again may overwrite a value saved by
+ // another client with access to the same local storage
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ }
+ catch (err) {
+ this._debug(debugName, 'error', err);
+ console.error(err);
+ return;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ async _callRefreshToken(refreshToken) {
+ var _a, _b;
+ if (!refreshToken) {
+ throw new AuthSessionMissingError();
+ }
+ // refreshing is already in progress
+ if (this.refreshingDeferred) {
+ return this.refreshingDeferred.promise;
+ }
+ const debugName = `#_callRefreshToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ this.refreshingDeferred = new Deferred();
+ const { data, error } = await this._refreshAccessToken(refreshToken);
+ if (error)
+ throw error;
+ if (!data.session)
+ throw new AuthSessionMissingError();
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('TOKEN_REFRESHED', data.session);
+ const result = { data: data.session, error: null };
+ this.refreshingDeferred.resolve(result);
+ return result;
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if (isAuthError(error)) {
+ const result = { data: null, error };
+ if (!isAuthRetryableFetchError(error)) {
+ await this._removeSession();
+ }
+ (_a = this.refreshingDeferred) === null || _a === void 0 ? void 0 : _a.resolve(result);
+ return result;
+ }
+ (_b = this.refreshingDeferred) === null || _b === void 0 ? void 0 : _b.reject(error);
+ throw error;
+ }
+ finally {
+ this.refreshingDeferred = null;
+ this._debug(debugName, 'end');
+ }
+ }
+ async _notifyAllSubscribers(event, session, broadcast = true) {
+ const debugName = `#_notifyAllSubscribers(${event})`;
+ this._debug(debugName, 'begin', session, `broadcast = ${broadcast}`);
+ try {
+ if (this.broadcastChannel && broadcast) {
+ this.broadcastChannel.postMessage({ event, session });
+ }
+ const errors = [];
+ const promises = Array.from(this.stateChangeEmitters.values()).map(async (x) => {
+ try {
+ await x.callback(event, session);
+ }
+ catch (e) {
+ errors.push(e);
+ }
+ });
+ await Promise.all(promises);
+ if (errors.length > 0) {
+ for (let i = 0; i < errors.length; i += 1) {
+ console.error(errors[i]);
+ }
+ throw errors[0];
+ }
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ async _saveSession(session) {
+ this._debug('#_saveSession()', session);
+ // _saveSession is always called whenever a new session has been acquired
+ // so we can safely suppress the warning returned by future getSession calls
+ this.suppressGetSessionWarning = true;
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ // Create a shallow copy to work with, to avoid mutating the original session object if it's used elsewhere
+ const sessionToProcess = Object.assign({}, session);
+ const userIsProxy = sessionToProcess.user && sessionToProcess.user.__isUserNotAvailableProxy === true;
+ if (this.userStorage) {
+ if (!userIsProxy && sessionToProcess.user) {
+ // If it's a real user object, save it to userStorage.
+ await setItemAsync(this.userStorage, this.storageKey + '-user', {
+ user: sessionToProcess.user,
+ });
+ }
+ else if (userIsProxy) {
+ // If it's the proxy, it means user was not found in userStorage.
+ // We should ensure no stale user data for this key exists in userStorage if we were to save null,
+ // or simply not save the proxy. For now, we don't save the proxy here.
+ // If there's a need to clear userStorage if user becomes proxy, that logic would go here.
+ }
+ // Prepare the main session data for primary storage: remove the user property before cloning
+ // This is important because the original session.user might be the proxy
+ const mainSessionData = Object.assign({}, sessionToProcess);
+ delete mainSessionData.user; // Remove user (real or proxy) before cloning for main storage
+ const clonedMainSessionData = deepClone(mainSessionData);
+ await setItemAsync(this.storage, this.storageKey, clonedMainSessionData);
+ }
+ else {
+ // No userStorage is configured.
+ // In this case, session.user should ideally not be a proxy.
+ // If it were, structuredClone would fail. This implies an issue elsewhere if user is a proxy here
+ const clonedSession = deepClone(sessionToProcess); // sessionToProcess still has its original user property
+ await setItemAsync(this.storage, this.storageKey, clonedSession);
+ }
+ }
+ async _removeSession() {
+ this._debug('#_removeSession()');
+ this.suppressGetSessionWarning = false;
+ await removeItemAsync(this.storage, this.storageKey);
+ await removeItemAsync(this.storage, this.storageKey + '-code-verifier');
+ await removeItemAsync(this.storage, this.storageKey + '-user');
+ if (this.userStorage) {
+ await removeItemAsync(this.userStorage, this.storageKey + '-user');
+ }
+ await this._notifyAllSubscribers('SIGNED_OUT', null);
+ }
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ _removeVisibilityChangedCallback() {
+ this._debug('#_removeVisibilityChangedCallback()');
+ const callback = this.visibilityChangedCallback;
+ this.visibilityChangedCallback = null;
+ try {
+ if (callback && isBrowser() && (window === null || window === void 0 ? void 0 : window.removeEventListener)) {
+ window.removeEventListener('visibilitychange', callback);
+ }
+ }
+ catch (e) {
+ console.error('removing visibilitychange callback failed', e);
+ }
+ }
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ async _startAutoRefresh() {
+ await this._stopAutoRefresh();
+ this._debug('#_startAutoRefresh()');
+ const ticker = setInterval(() => this._autoRefreshTokenTick(), AUTO_REFRESH_TICK_DURATION_MS);
+ this.autoRefreshTicker = ticker;
+ if (ticker && typeof ticker === 'object' && typeof ticker.unref === 'function') {
+ // ticker is a NodeJS Timeout object that has an `unref` method
+ // https://nodejs.org/api/timers.html#timeoutunref
+ // When auto refresh is used in NodeJS (like for testing) the
+ // `setInterval` is preventing the process from being marked as
+ // finished and tests run endlessly. This can be prevented by calling
+ // `unref()` on the returned object.
+ ticker.unref();
+ // @ts-expect-error TS has no context of Deno
+ }
+ else if (typeof Deno !== 'undefined' && typeof Deno.unrefTimer === 'function') {
+ // similar like for NodeJS, but with the Deno API
+ // https://deno.land/api@latest?unstable&s=Deno.unrefTimer
+ // @ts-expect-error TS has no context of Deno
+ Deno.unrefTimer(ticker);
+ }
+ // run the tick immediately, but in the next pass of the event loop so that
+ // #_initialize can be allowed to complete without recursively waiting on
+ // itself
+ setTimeout(async () => {
+ await this.initializePromise;
+ await this._autoRefreshTokenTick();
+ }, 0);
+ }
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ async _stopAutoRefresh() {
+ this._debug('#_stopAutoRefresh()');
+ const ticker = this.autoRefreshTicker;
+ this.autoRefreshTicker = null;
+ if (ticker) {
+ clearInterval(ticker);
+ }
+ }
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ async startAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._startAutoRefresh();
+ }
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ async stopAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._stopAutoRefresh();
+ }
+ /**
+ * Runs the auto refresh token tick.
+ */
+ async _autoRefreshTokenTick() {
+ this._debug('#_autoRefreshTokenTick()', 'begin');
+ try {
+ await this._acquireLock(0, async () => {
+ try {
+ const now = Date.now();
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, } = result;
+ if (!session || !session.refresh_token || !session.expires_at) {
+ this._debug('#_autoRefreshTokenTick()', 'no session');
+ return;
+ }
+ // session will expire in this many ticks (or has already expired if <= 0)
+ const expiresInTicks = Math.floor((session.expires_at * 1000 - now) / AUTO_REFRESH_TICK_DURATION_MS);
+ this._debug('#_autoRefreshTokenTick()', `access token expires in ${expiresInTicks} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION_MS}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`);
+ if (expiresInTicks <= AUTO_REFRESH_TICK_THRESHOLD) {
+ await this._callRefreshToken(session.refresh_token);
+ }
+ });
+ }
+ catch (e) {
+ console.error('Auto refresh tick failed with error. This is likely a transient error.', e);
+ }
+ }
+ finally {
+ this._debug('#_autoRefreshTokenTick()', 'end');
+ }
+ });
+ }
+ catch (e) {
+ if (e.isAcquireTimeout || e instanceof LockAcquireTimeoutError) {
+ this._debug('auto refresh token tick lock not available');
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ async _handleVisibilityChange() {
+ this._debug('#_handleVisibilityChange()');
+ if (!isBrowser() || !(window === null || window === void 0 ? void 0 : window.addEventListener)) {
+ if (this.autoRefreshToken) {
+ // in non-browser environments the refresh token ticker runs always
+ this.startAutoRefresh();
+ }
+ return false;
+ }
+ try {
+ this.visibilityChangedCallback = async () => await this._onVisibilityChanged(false);
+ window === null || window === void 0 ? void 0 : window.addEventListener('visibilitychange', this.visibilityChangedCallback);
+ // now immediately call the visbility changed callback to setup with the
+ // current visbility state
+ await this._onVisibilityChanged(true); // initial call
+ }
+ catch (error) {
+ console.error('_handleVisibilityChange', error);
+ }
+ }
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ async _onVisibilityChanged(calledFromInitialize) {
+ const methodName = `#_onVisibilityChanged(${calledFromInitialize})`;
+ this._debug(methodName, 'visibilityState', document.visibilityState);
+ if (document.visibilityState === 'visible') {
+ if (this.autoRefreshToken) {
+ // in browser environments the refresh token ticker runs only on focused tabs
+ // which prevents race conditions
+ this._startAutoRefresh();
+ }
+ if (!calledFromInitialize) {
+ // called when the visibility has changed, i.e. the browser
+ // transitioned from hidden -> visible so we need to see if the session
+ // should be recovered immediately... but to do that we need to acquire
+ // the lock first asynchronously
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ if (document.visibilityState !== 'visible') {
+ this._debug(methodName, 'acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting');
+ // visibility has changed while waiting for the lock, abort
+ return;
+ }
+ // recover the session
+ await this._recoverAndRefresh();
+ });
+ }
+ }
+ else if (document.visibilityState === 'hidden') {
+ if (this.autoRefreshToken) {
+ this._stopAutoRefresh();
+ }
+ }
+ }
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ async _getUrlForProvider(url, provider, options) {
+ const urlParams = [`provider=${encodeURIComponent(provider)}`];
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`);
+ }
+ if (options === null || options === void 0 ? void 0 : options.scopes) {
+ urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);
+ }
+ if (this.flowType === 'pkce') {
+ const [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ const flowParams = new URLSearchParams({
+ code_challenge: `${encodeURIComponent(codeChallenge)}`,
+ code_challenge_method: `${encodeURIComponent(codeChallengeMethod)}`,
+ });
+ urlParams.push(flowParams.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.queryParams) {
+ const query = new URLSearchParams(options.queryParams);
+ urlParams.push(query.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.skipBrowserRedirect) {
+ urlParams.push(`skip_http_redirect=${options.skipBrowserRedirect}`);
+ }
+ return `${url}?${urlParams.join('&')}`;
+ }
+ async _unenroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ return await _request(this.fetch, 'DELETE', `${this.url}/factors/${params.factorId}`, {
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async _enroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const body = Object.assign({ friendly_name: params.friendlyName, factor_type: params.factorType }, (params.factorType === 'phone'
+ ? { phone: params.phone }
+ : params.factorType === 'totp'
+ ? { issuer: params.issuer }
+ : {}));
+ const { data, error } = (await _request(this.fetch, 'POST', `${this.url}/factors`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ }));
+ if (error) {
+ return this._returnResult({ data: null, error });
+ }
+ if (params.factorType === 'totp' && data.type === 'totp' && ((_b = data === null || data === void 0 ? void 0 : data.totp) === null || _b === void 0 ? void 0 : _b.qr_code)) {
+ data.totp.qr_code = `data:image/svg+xml;utf-8,${data.totp.qr_code}`;
+ }
+ return this._returnResult({ data, error: null });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async _verify(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const body = Object.assign({ challenge_id: params.challengeId }, ('webauthn' in params
+ ? {
+ webauthn: Object.assign(Object.assign({}, params.webauthn), { credential_response: params.webauthn.type === 'create'
+ ? serializeCredentialCreationResponse(params.webauthn.credential_response)
+ : serializeCredentialRequestResponse(params.webauthn.credential_response) }),
+ }
+ : { code: params.code }));
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/verify`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return this._returnResult({ data: null, error });
+ }
+ await this._saveSession(Object.assign({ expires_at: Math.round(Date.now() / 1000) + data.expires_in }, data));
+ await this._notifyAllSubscribers('MFA_CHALLENGE_VERIFIED', data);
+ return this._returnResult({ data, error });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ });
+ }
+ async _challenge(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ const response = (await _request(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/challenge`, {
+ body: params,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ }));
+ if (response.error) {
+ return response;
+ }
+ const { data } = response;
+ if (data.type !== 'webauthn') {
+ return { data, error: null };
+ }
+ switch (data.webauthn.type) {
+ case 'create':
+ return {
+ data: Object.assign(Object.assign({}, data), { webauthn: Object.assign(Object.assign({}, data.webauthn), { credential_options: Object.assign(Object.assign({}, data.webauthn.credential_options), { publicKey: deserializeCredentialCreationOptions(data.webauthn.credential_options.publicKey) }) }) }),
+ error: null,
+ };
+ case 'request':
+ return {
+ data: Object.assign(Object.assign({}, data), { webauthn: Object.assign(Object.assign({}, data.webauthn), { credential_options: Object.assign(Object.assign({}, data.webauthn.credential_options), { publicKey: deserializeCredentialRequestOptions(data.webauthn.credential_options.publicKey) }) }) }),
+ error: null,
+ };
+ }
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ async _challengeAndVerify(params) {
+ // both _challenge and _verify independently acquire the lock, so no need
+ // to acquire it here
+ const { data: challengeData, error: challengeError } = await this._challenge({
+ factorId: params.factorId,
+ });
+ if (challengeError) {
+ return this._returnResult({ data: null, error: challengeError });
+ }
+ return await this._verify({
+ factorId: params.factorId,
+ challengeId: challengeData.id,
+ code: params.code,
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ async _listFactors() {
+ var _a;
+ // use #getUser instead of #_getUser as the former acquires a lock
+ const { data: { user }, error: userError, } = await this.getUser();
+ if (userError) {
+ return { data: null, error: userError };
+ }
+ const data = {
+ all: [],
+ phone: [],
+ totp: [],
+ webauthn: [],
+ };
+ // loop over the factors ONCE
+ for (const factor of (_a = user === null || user === void 0 ? void 0 : user.factors) !== null && _a !== void 0 ? _a : []) {
+ data.all.push(factor);
+ if (factor.status === 'verified') {
+ ;
+ data[factor.factor_type].push(factor);
+ }
+ }
+ return {
+ data,
+ error: null,
+ };
+ }
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ async _getAuthenticatorAssuranceLevel() {
+ var _a, _b;
+ const { data: { session }, error: sessionError, } = await this.getSession();
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return {
+ data: { currentLevel: null, nextLevel: null, currentAuthenticationMethods: [] },
+ error: null,
+ };
+ }
+ const { payload } = decodeJWT(session.access_token);
+ let currentLevel = null;
+ if (payload.aal) {
+ currentLevel = payload.aal;
+ }
+ let nextLevel = currentLevel;
+ const verifiedFactors = (_b = (_a = session.user.factors) === null || _a === void 0 ? void 0 : _a.filter((factor) => factor.status === 'verified')) !== null && _b !== void 0 ? _b : [];
+ if (verifiedFactors.length > 0) {
+ nextLevel = 'aal2';
+ }
+ const currentAuthenticationMethods = payload.amr || [];
+ return { data: { currentLevel, nextLevel, currentAuthenticationMethods }, error: null };
+ }
+ /**
+ * Retrieves details about an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ *
+ * Returns authorization details including client info, scopes, and user information.
+ * If the API returns a redirect_uri, it means consent was already given - the caller
+ * should handle the redirect manually if needed.
+ */
+ async _getAuthorizationDetails(authorizationId) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new AuthSessionMissingError() });
+ }
+ return await _request(this.fetch, 'GET', `${this.url}/oauth/authorizations/${authorizationId}`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ xform: (data) => ({ data, error: null }),
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Approves an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _approveAuthorization(authorizationId, options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new AuthSessionMissingError() });
+ }
+ const response = await _request(this.fetch, 'POST', `${this.url}/oauth/authorizations/${authorizationId}/consent`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ body: { action: 'approve' },
+ xform: (data) => ({ data, error: null }),
+ });
+ if (response.data && response.data.redirect_url) {
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if (isBrowser() && !(options === null || options === void 0 ? void 0 : options.skipBrowserRedirect)) {
+ window.location.assign(response.data.redirect_url);
+ }
+ }
+ return response;
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Denies an OAuth authorization request.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _denyAuthorization(authorizationId, options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new AuthSessionMissingError() });
+ }
+ const response = await _request(this.fetch, 'POST', `${this.url}/oauth/authorizations/${authorizationId}/consent`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ body: { action: 'deny' },
+ xform: (data) => ({ data, error: null }),
+ });
+ if (response.data && response.data.redirect_url) {
+ // Automatically redirect in browser unless skipBrowserRedirect is true
+ if (isBrowser() && !(options === null || options === void 0 ? void 0 : options.skipBrowserRedirect)) {
+ window.location.assign(response.data.redirect_url);
+ }
+ }
+ return response;
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Lists all OAuth grants that the authenticated user has authorized.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _listOAuthGrants() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new AuthSessionMissingError() });
+ }
+ return await _request(this.fetch, 'GET', `${this.url}/user/oauth/grants`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ xform: (data) => ({ data, error: null }),
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ /**
+ * Revokes a user's OAuth grant for a specific client.
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
+ */
+ async _revokeOAuthGrant(options) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return this._returnResult({ data: null, error: sessionError });
+ }
+ if (!session) {
+ return this._returnResult({ data: null, error: new AuthSessionMissingError() });
+ }
+ await _request(this.fetch, 'DELETE', `${this.url}/user/oauth/grants`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ query: { client_id: options.clientId },
+ noResolveJson: true,
+ });
+ return { data: {}, error: null };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+ async fetchJwk(kid, jwks = { keys: [] }) {
+ // try fetching from the supplied jwks
+ let jwk = jwks.keys.find((key) => key.kid === kid);
+ if (jwk) {
+ return jwk;
+ }
+ const now = Date.now();
+ // try fetching from cache
+ jwk = this.jwks.keys.find((key) => key.kid === kid);
+ // jwk exists and jwks isn't stale
+ if (jwk && this.jwks_cached_at + JWKS_TTL > now) {
+ return jwk;
+ }
+ // jwk isn't cached in memory so we need to fetch it from the well-known endpoint
+ const { data, error } = await _request(this.fetch, 'GET', `${this.url}/.well-known/jwks.json`, {
+ headers: this.headers,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data.keys || data.keys.length === 0) {
+ return null;
+ }
+ this.jwks = data;
+ this.jwks_cached_at = now;
+ // Find the signing key
+ jwk = data.keys.find((key) => key.kid === kid);
+ if (!jwk) {
+ return null;
+ }
+ return jwk;
+ }
+ /**
+ * Extracts the JWT claims present in the access token by first verifying the
+ * JWT against the server's JSON Web Key Set endpoint
+ * `/.well-known/jwks.json` which is often cached, resulting in significantly
+ * faster responses. Prefer this method over {@link #getUser} which always
+ * sends a request to the Auth server for each JWT.
+ *
+ * If the project is not using an asymmetric JWT signing key (like ECC or
+ * RSA) it always sends a request to the Auth server (similar to {@link
+ * #getUser}) to verify the JWT.
+ *
+ * @param jwt An optional specific JWT you wish to verify, not the one you
+ * can obtain from {@link #getSession}.
+ * @param options Various additional options that allow you to customize the
+ * behavior of this method.
+ */
+ async getClaims(jwt, options = {}) {
+ try {
+ let token = jwt;
+ if (!token) {
+ const { data, error } = await this.getSession();
+ if (error || !data.session) {
+ return this._returnResult({ data: null, error });
+ }
+ token = data.session.access_token;
+ }
+ const { header, payload, signature, raw: { header: rawHeader, payload: rawPayload }, } = decodeJWT(token);
+ if (!(options === null || options === void 0 ? void 0 : options.allowExpired)) {
+ // Reject expired JWTs should only happen if jwt argument was passed
+ validateExp(payload.exp);
+ }
+ const signingKey = !header.alg ||
+ header.alg.startsWith('HS') ||
+ !header.kid ||
+ !('crypto' in globalThis && 'subtle' in globalThis.crypto)
+ ? null
+ : await this.fetchJwk(header.kid, (options === null || options === void 0 ? void 0 : options.keys) ? { keys: options.keys } : options === null || options === void 0 ? void 0 : options.jwks);
+ // If symmetric algorithm or WebCrypto API is unavailable, fallback to getUser()
+ if (!signingKey) {
+ const { error } = await this.getUser(token);
+ if (error) {
+ throw error;
+ }
+ // getUser succeeds so the claims in the JWT can be trusted
+ return {
+ data: {
+ claims: payload,
+ header,
+ signature,
+ },
+ error: null,
+ };
+ }
+ const algorithm = getAlgorithm(header.alg);
+ // Convert JWK to CryptoKey
+ const publicKey = await crypto.subtle.importKey('jwk', signingKey, algorithm, true, [
+ 'verify',
+ ]);
+ // Verify the signature
+ const isValid = await crypto.subtle.verify(algorithm, publicKey, signature, stringToUint8Array(`${rawHeader}.${rawPayload}`));
+ if (!isValid) {
+ throw new AuthInvalidJwtError('Invalid JWT signature');
+ }
+ // If verification succeeds, decode and return claims
+ return {
+ data: {
+ claims: payload,
+ header,
+ signature,
+ },
+ error: null,
+ };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return this._returnResult({ data: null, error });
+ }
+ throw error;
+ }
+ }
+}
+GoTrueClient.nextInstanceID = {};
+export default GoTrueClient;
+//# sourceMappingURL=GoTrueClient.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map
new file mode 100644
index 0000000..1e88d94
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"GoTrueClient.js","sourceRoot":"","sources":["../../src/GoTrueClient.ts"],"names":[],"mappings":"AAAA,OAAO,cA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EAAE,IAAI;iBACZ,CAAA;YACH,CAAC;YAED,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAE1C,2BAA2B;YAC3B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE;gBAClF,QAAQ;aACT,CAAC,CAAA;YAEF,uBAAuB;YACvB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CACxC,SAAS,EACT,SAAS,EACT,SAAS,EACT,kBAAkB,CAAC,GAAG,SAAS,IAAI,UAAU,EAAE,CAAC,CACjD,CAAA;YAED,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,mBAAmB,CAAC,uBAAuB,CAAC,CAAA;YACxD,CAAC;YAED,qDAAqD;YACrD,OAAO;gBACL,IAAI,EAAE;oBACJ,MAAM,EAAE,OAAO;oBACf,MAAM;oBACN,SAAS;iBACV;gBACD,KAAK,EAAE,IAAI;aACZ,CAAA;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;YAClD,CAAC;YACD,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;;AAziHc,2BAAc,GAA2B,EAAE,AAA7B,CAA6B;eADvC,YAAY"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts
new file mode 100644
index 0000000..62b23d0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts
@@ -0,0 +1,9 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import GoTrueClient from './GoTrueClient';
+import AuthAdminApi from './AuthAdminApi';
+import AuthClient from './AuthClient';
+export { GoTrueAdminApi, GoTrueClient, AuthAdminApi, AuthClient };
+export * from './lib/types';
+export * from './lib/errors';
+export { navigatorLock, NavigatorLockAcquireTimeoutError, internals as lockInternals, processLock, } from './lib/locks';
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts.map
new file mode 100644
index 0000000..884248d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA;AACjE,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,SAAS,IAAI,aAAa,EAC1B,WAAW,GACZ,MAAM,aAAa,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/index.js b/backend/node_modules/@supabase/auth-js/dist/module/index.js
new file mode 100644
index 0000000..01b965d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/index.js
@@ -0,0 +1,9 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import GoTrueClient from './GoTrueClient';
+import AuthAdminApi from './AuthAdminApi';
+import AuthClient from './AuthClient';
+export { GoTrueAdminApi, GoTrueClient, AuthAdminApi, AuthClient };
+export * from './lib/types';
+export * from './lib/errors';
+export { navigatorLock, NavigatorLockAcquireTimeoutError, internals as lockInternals, processLock, } from './lib/locks';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/index.js.map b/backend/node_modules/@supabase/auth-js/dist/module/index.js.map
new file mode 100644
index 0000000..a43605f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAA;AACjE,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,SAAS,IAAI,aAAa,EAC1B,WAAW,GACZ,MAAM,aAAa,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts
new file mode 100644
index 0000000..62276a3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts
@@ -0,0 +1,76 @@
+/**
+ * Avoid modifying this file. It's part of
+ * https://github.com/supabase-community/base64url-js. Submit all fixes on
+ * that repo!
+ */
+import { Uint8Array_ } from './webauthn.dom';
+/**
+ * Converts a byte to a Base64-URL string.
+ *
+ * @param byte The byte to convert, or null to flush at the end of the byte sequence.
+ * @param state The Base64 conversion state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next Base64 character when ready.
+ */
+export declare function byteToBase64URL(byte: number | null, state: {
+ queue: number;
+ queuedBits: number;
+}, emit: (char: string) => void): void;
+/**
+ * Converts a String char code (extracted using `string.charCodeAt(position)`) to a sequence of Base64-URL characters.
+ *
+ * @param charCode The char code of the JavaScript string.
+ * @param state The Base64 state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next byte.
+ */
+export declare function byteFromBase64URL(charCode: number, state: {
+ queue: number;
+ queuedBits: number;
+}, emit: (byte: number) => void): void;
+/**
+ * Converts a JavaScript string (which may include any valid character) into a
+ * Base64-URL encoded string. The string is first encoded in UTF-8 which is
+ * then encoded as Base64-URL.
+ *
+ * @param str The string to convert.
+ */
+export declare function stringToBase64URL(str: string): string;
+/**
+ * Converts a Base64-URL encoded string into a JavaScript string. It is assumed
+ * that the underlying string has been encoded as UTF-8.
+ *
+ * @param str The Base64-URL encoded string.
+ */
+export declare function stringFromBase64URL(str: string): string;
+/**
+ * Converts a Unicode codepoint to a multi-byte UTF-8 sequence.
+ *
+ * @param codepoint The Unicode codepoint.
+ * @param emit Function which will be called for each UTF-8 byte that represents the codepoint.
+ */
+export declare function codepointToUTF8(codepoint: number, emit: (byte: number) => void): void;
+/**
+ * Converts a JavaScript string to a sequence of UTF-8 bytes.
+ *
+ * @param str The string to convert to UTF-8.
+ * @param emit Function which will be called for each UTF-8 byte of the string.
+ */
+export declare function stringToUTF8(str: string, emit: (byte: number) => void): void;
+/**
+ * Converts a UTF-8 byte to a Unicode codepoint.
+ *
+ * @param byte The UTF-8 byte next in the sequence.
+ * @param state The shared state between consecutive UTF-8 bytes in the
+ * sequence, an object with the shape `{ utf8seq: 0, codepoint: 0 }`.
+ * @param emit Function which will be called for each codepoint.
+ */
+export declare function stringFromUTF8(byte: number, state: {
+ utf8seq: number;
+ codepoint: number;
+}, emit: (codepoint: number) => void): void;
+/**
+ * Helper functions to convert different types of strings to Uint8Array
+ */
+export declare function base64UrlToUint8Array(str: string): Uint8Array_;
+export declare function stringToUint8Array(str: string): Uint8Array_;
+export declare function bytesToBase64URL(bytes: Uint8Array): string;
+//# sourceMappingURL=base64url.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map
new file mode 100644
index 0000000..5a7591c
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"base64url.d.ts","sourceRoot":"","sources":["../../../src/lib/base64url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAoC5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAqB7B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAmB7B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,UAgB5C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,UAuB9C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAsB9E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QAgBrE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC7C,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,QAuClC;AAED;;GAEG;AAEH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAa9D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAI3D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,UAcjD"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js
new file mode 100644
index 0000000..90e966f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js
@@ -0,0 +1,257 @@
+/**
+ * Avoid modifying this file. It's part of
+ * https://github.com/supabase-community/base64url-js. Submit all fixes on
+ * that repo!
+ */
+/**
+ * An array of characters that encode 6 bits into a Base64-URL alphabet
+ * character.
+ */
+const TO_BASE64URL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'.split('');
+/**
+ * An array of characters that can appear in a Base64-URL encoded string but
+ * should be ignored.
+ */
+const IGNORE_BASE64URL = ' \t\n\r='.split('');
+/**
+ * An array of 128 numbers that map a Base64-URL character to 6 bits, or if -2
+ * used to skip the character, or if -1 used to error out.
+ */
+const FROM_BASE64URL = (() => {
+ const charMap = new Array(128);
+ for (let i = 0; i < charMap.length; i += 1) {
+ charMap[i] = -1;
+ }
+ for (let i = 0; i < IGNORE_BASE64URL.length; i += 1) {
+ charMap[IGNORE_BASE64URL[i].charCodeAt(0)] = -2;
+ }
+ for (let i = 0; i < TO_BASE64URL.length; i += 1) {
+ charMap[TO_BASE64URL[i].charCodeAt(0)] = i;
+ }
+ return charMap;
+})();
+/**
+ * Converts a byte to a Base64-URL string.
+ *
+ * @param byte The byte to convert, or null to flush at the end of the byte sequence.
+ * @param state The Base64 conversion state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next Base64 character when ready.
+ */
+export function byteToBase64URL(byte, state, emit) {
+ if (byte !== null) {
+ state.queue = (state.queue << 8) | byte;
+ state.queuedBits += 8;
+ while (state.queuedBits >= 6) {
+ const pos = (state.queue >> (state.queuedBits - 6)) & 63;
+ emit(TO_BASE64URL[pos]);
+ state.queuedBits -= 6;
+ }
+ }
+ else if (state.queuedBits > 0) {
+ state.queue = state.queue << (6 - state.queuedBits);
+ state.queuedBits = 6;
+ while (state.queuedBits >= 6) {
+ const pos = (state.queue >> (state.queuedBits - 6)) & 63;
+ emit(TO_BASE64URL[pos]);
+ state.queuedBits -= 6;
+ }
+ }
+}
+/**
+ * Converts a String char code (extracted using `string.charCodeAt(position)`) to a sequence of Base64-URL characters.
+ *
+ * @param charCode The char code of the JavaScript string.
+ * @param state The Base64 state. Pass an initial value of `{ queue: 0, queuedBits: 0 }`.
+ * @param emit A function called with the next byte.
+ */
+export function byteFromBase64URL(charCode, state, emit) {
+ const bits = FROM_BASE64URL[charCode];
+ if (bits > -1) {
+ // valid Base64-URL character
+ state.queue = (state.queue << 6) | bits;
+ state.queuedBits += 6;
+ while (state.queuedBits >= 8) {
+ emit((state.queue >> (state.queuedBits - 8)) & 0xff);
+ state.queuedBits -= 8;
+ }
+ }
+ else if (bits === -2) {
+ // ignore spaces, tabs, newlines, =
+ return;
+ }
+ else {
+ throw new Error(`Invalid Base64-URL character "${String.fromCharCode(charCode)}"`);
+ }
+}
+/**
+ * Converts a JavaScript string (which may include any valid character) into a
+ * Base64-URL encoded string. The string is first encoded in UTF-8 which is
+ * then encoded as Base64-URL.
+ *
+ * @param str The string to convert.
+ */
+export function stringToBase64URL(str) {
+ const base64 = [];
+ const emitter = (char) => {
+ base64.push(char);
+ };
+ const state = { queue: 0, queuedBits: 0 };
+ stringToUTF8(str, (byte) => {
+ byteToBase64URL(byte, state, emitter);
+ });
+ byteToBase64URL(null, state, emitter);
+ return base64.join('');
+}
+/**
+ * Converts a Base64-URL encoded string into a JavaScript string. It is assumed
+ * that the underlying string has been encoded as UTF-8.
+ *
+ * @param str The Base64-URL encoded string.
+ */
+export function stringFromBase64URL(str) {
+ const conv = [];
+ const utf8Emit = (codepoint) => {
+ conv.push(String.fromCodePoint(codepoint));
+ };
+ const utf8State = {
+ utf8seq: 0,
+ codepoint: 0,
+ };
+ const b64State = { queue: 0, queuedBits: 0 };
+ const byteEmit = (byte) => {
+ stringFromUTF8(byte, utf8State, utf8Emit);
+ };
+ for (let i = 0; i < str.length; i += 1) {
+ byteFromBase64URL(str.charCodeAt(i), b64State, byteEmit);
+ }
+ return conv.join('');
+}
+/**
+ * Converts a Unicode codepoint to a multi-byte UTF-8 sequence.
+ *
+ * @param codepoint The Unicode codepoint.
+ * @param emit Function which will be called for each UTF-8 byte that represents the codepoint.
+ */
+export function codepointToUTF8(codepoint, emit) {
+ if (codepoint <= 0x7f) {
+ emit(codepoint);
+ return;
+ }
+ else if (codepoint <= 0x7ff) {
+ emit(0xc0 | (codepoint >> 6));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ else if (codepoint <= 0xffff) {
+ emit(0xe0 | (codepoint >> 12));
+ emit(0x80 | ((codepoint >> 6) & 0x3f));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ else if (codepoint <= 0x10ffff) {
+ emit(0xf0 | (codepoint >> 18));
+ emit(0x80 | ((codepoint >> 12) & 0x3f));
+ emit(0x80 | ((codepoint >> 6) & 0x3f));
+ emit(0x80 | (codepoint & 0x3f));
+ return;
+ }
+ throw new Error(`Unrecognized Unicode codepoint: ${codepoint.toString(16)}`);
+}
+/**
+ * Converts a JavaScript string to a sequence of UTF-8 bytes.
+ *
+ * @param str The string to convert to UTF-8.
+ * @param emit Function which will be called for each UTF-8 byte of the string.
+ */
+export function stringToUTF8(str, emit) {
+ for (let i = 0; i < str.length; i += 1) {
+ let codepoint = str.charCodeAt(i);
+ if (codepoint > 0xd7ff && codepoint <= 0xdbff) {
+ // most UTF-16 codepoints are Unicode codepoints, except values in this
+ // range where the next UTF-16 codepoint needs to be combined with the
+ // current one to get the Unicode codepoint
+ const highSurrogate = ((codepoint - 0xd800) * 0x400) & 0xffff;
+ const lowSurrogate = (str.charCodeAt(i + 1) - 0xdc00) & 0xffff;
+ codepoint = (lowSurrogate | highSurrogate) + 0x10000;
+ i += 1;
+ }
+ codepointToUTF8(codepoint, emit);
+ }
+}
+/**
+ * Converts a UTF-8 byte to a Unicode codepoint.
+ *
+ * @param byte The UTF-8 byte next in the sequence.
+ * @param state The shared state between consecutive UTF-8 bytes in the
+ * sequence, an object with the shape `{ utf8seq: 0, codepoint: 0 }`.
+ * @param emit Function which will be called for each codepoint.
+ */
+export function stringFromUTF8(byte, state, emit) {
+ if (state.utf8seq === 0) {
+ if (byte <= 0x7f) {
+ emit(byte);
+ return;
+ }
+ // count the number of 1 leading bits until you reach 0
+ for (let leadingBit = 1; leadingBit < 6; leadingBit += 1) {
+ if (((byte >> (7 - leadingBit)) & 1) === 0) {
+ state.utf8seq = leadingBit;
+ break;
+ }
+ }
+ if (state.utf8seq === 2) {
+ state.codepoint = byte & 31;
+ }
+ else if (state.utf8seq === 3) {
+ state.codepoint = byte & 15;
+ }
+ else if (state.utf8seq === 4) {
+ state.codepoint = byte & 7;
+ }
+ else {
+ throw new Error('Invalid UTF-8 sequence');
+ }
+ state.utf8seq -= 1;
+ }
+ else if (state.utf8seq > 0) {
+ if (byte <= 0x7f) {
+ throw new Error('Invalid UTF-8 sequence');
+ }
+ state.codepoint = (state.codepoint << 6) | (byte & 63);
+ state.utf8seq -= 1;
+ if (state.utf8seq === 0) {
+ emit(state.codepoint);
+ }
+ }
+}
+/**
+ * Helper functions to convert different types of strings to Uint8Array
+ */
+export function base64UrlToUint8Array(str) {
+ const result = [];
+ const state = { queue: 0, queuedBits: 0 };
+ const onByte = (byte) => {
+ result.push(byte);
+ };
+ for (let i = 0; i < str.length; i += 1) {
+ byteFromBase64URL(str.charCodeAt(i), state, onByte);
+ }
+ return new Uint8Array(result);
+}
+export function stringToUint8Array(str) {
+ const result = [];
+ stringToUTF8(str, (byte) => result.push(byte));
+ return new Uint8Array(result);
+}
+export function bytesToBase64URL(bytes) {
+ const result = [];
+ const state = { queue: 0, queuedBits: 0 };
+ const onChar = (char) => {
+ result.push(char);
+ };
+ bytes.forEach((byte) => byteToBase64URL(byte, state, onChar));
+ // always call with `null` after processing all bytes
+ byteToBase64URL(null, state, onChar);
+ return result.join('');
+}
+//# sourceMappingURL=base64url.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map
new file mode 100644
index 0000000..e9cc74e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base64url.js","sourceRoot":"","sources":["../../../src/lib/base64url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,MAAM,YAAY,GAAG,kEAAkE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEjG;;;GAGG;AACH,MAAM,gBAAgB,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAE7C;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAa,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;IAExC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,CAAC,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C;QACvC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;AAC/B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,YAAY,CAAC,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACtD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;AAC/B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAA;IAEzC,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;QAC9B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;IAE7D,qDAAqD;IACrD,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAEpC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxB,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts
new file mode 100644
index 0000000..604f8d0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts
@@ -0,0 +1,26 @@
+/** Current session will be checked for refresh at this interval. */
+export declare const AUTO_REFRESH_TICK_DURATION_MS: number;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+export declare const AUTO_REFRESH_TICK_THRESHOLD = 3;
+export declare const EXPIRY_MARGIN_MS: number;
+export declare const GOTRUE_URL = "http://localhost:9999";
+export declare const STORAGE_KEY = "supabase.auth.token";
+export declare const AUDIENCE = "";
+export declare const DEFAULT_HEADERS: {
+ 'X-Client-Info': string;
+};
+export declare const NETWORK_FAILURE: {
+ MAX_RETRIES: number;
+ RETRY_INTERVAL: number;
+};
+export declare const API_VERSION_HEADER_NAME = "X-Supabase-Api-Version";
+export declare const API_VERSIONS: {
+ '2024-01-01': {
+ timestamp: number;
+ name: string;
+ };
+};
+export declare const BASE64URL_REGEX: RegExp;
+export declare const JWKS_TTL: number;
+//# sourceMappingURL=constants.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map
new file mode 100644
index 0000000..acb62eb
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,eAAO,MAAM,6BAA6B,QAAY,CAAA;AAEtD;2FAC2F;AAC3F,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAK5C,eAAO,MAAM,gBAAgB,QAA8D,CAAA;AAE3F,eAAO,MAAM,UAAU,0BAA0B,CAAA;AACjD,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,eAAO,MAAM,QAAQ,KAAK,CAAA;AAC1B,eAAO,MAAM,eAAe;;CAA8C,CAAA;AAC1E,eAAO,MAAM,eAAe;;;CAG3B,CAAA;AAED,eAAO,MAAM,uBAAuB,2BAA2B,CAAA;AAC/D,eAAO,MAAM,YAAY;;;;;CAKxB,CAAA;AAED,eAAO,MAAM,eAAe,QAAyD,CAAA;AAErF,eAAO,MAAM,QAAQ,QAAiB,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js
new file mode 100644
index 0000000..17f19e7
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js
@@ -0,0 +1,28 @@
+import { version } from './version';
+/** Current session will be checked for refresh at this interval. */
+export const AUTO_REFRESH_TICK_DURATION_MS = 30 * 1000;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+export const AUTO_REFRESH_TICK_THRESHOLD = 3;
+/*
+ * Earliest time before an access token expires that the session should be refreshed.
+ */
+export const EXPIRY_MARGIN_MS = AUTO_REFRESH_TICK_THRESHOLD * AUTO_REFRESH_TICK_DURATION_MS;
+export const GOTRUE_URL = 'http://localhost:9999';
+export const STORAGE_KEY = 'supabase.auth.token';
+export const AUDIENCE = '';
+export const DEFAULT_HEADERS = { 'X-Client-Info': `gotrue-js/${version}` };
+export const NETWORK_FAILURE = {
+ MAX_RETRIES: 10,
+ RETRY_INTERVAL: 2, // in deciseconds
+};
+export const API_VERSION_HEADER_NAME = 'X-Supabase-Api-Version';
+export const API_VERSIONS = {
+ '2024-01-01': {
+ timestamp: Date.parse('2024-01-01T00:00:00.0Z'),
+ name: '2024-01-01',
+ },
+};
+export const BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
+export const JWKS_TTL = 10 * 60 * 1000; // 10 minutes
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map
new file mode 100644
index 0000000..12b9fa8
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,oEAAoE;AACpE,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,IAAI,CAAA;AAEtD;2FAC2F;AAC3F,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,2BAA2B,GAAG,6BAA6B,CAAA;AAE3F,MAAM,CAAC,MAAM,UAAU,GAAG,uBAAuB,CAAA;AACjD,MAAM,CAAC,MAAM,WAAW,GAAG,qBAAqB,CAAA;AAChD,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAA;AAC1B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,eAAe,EAAE,aAAa,OAAO,EAAE,EAAE,CAAA;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,EAAE;IACf,cAAc,EAAE,CAAC,EAAE,iBAAiB;CACrC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAA;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC;QAC/C,IAAI,EAAE,YAAY;KACnB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,sDAAsD,CAAA;AAErF,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,aAAa"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts
new file mode 100644
index 0000000..668ad5b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts
@@ -0,0 +1,7 @@
+/**
+ * Known error codes. Note that the server may also return other error codes
+ * not included in this list (if the SDK is older than the version
+ * on the server).
+ */
+export type ErrorCode = 'unexpected_failure' | 'validation_failed' | 'bad_json' | 'email_exists' | 'phone_exists' | 'bad_jwt' | 'not_admin' | 'no_authorization' | 'user_not_found' | 'session_not_found' | 'session_expired' | 'refresh_token_not_found' | 'refresh_token_already_used' | 'flow_state_not_found' | 'flow_state_expired' | 'signup_disabled' | 'user_banned' | 'provider_email_needs_verification' | 'invite_not_found' | 'bad_oauth_state' | 'bad_oauth_callback' | 'oauth_provider_not_supported' | 'unexpected_audience' | 'single_identity_not_deletable' | 'email_conflict_identity_not_deletable' | 'identity_already_exists' | 'email_provider_disabled' | 'phone_provider_disabled' | 'too_many_enrolled_mfa_factors' | 'mfa_factor_name_conflict' | 'mfa_factor_not_found' | 'mfa_ip_address_mismatch' | 'mfa_challenge_expired' | 'mfa_verification_failed' | 'mfa_verification_rejected' | 'insufficient_aal' | 'captcha_failed' | 'saml_provider_disabled' | 'manual_linking_disabled' | 'sms_send_failed' | 'email_not_confirmed' | 'phone_not_confirmed' | 'reauth_nonce_missing' | 'saml_relay_state_not_found' | 'saml_relay_state_expired' | 'saml_idp_not_found' | 'saml_assertion_no_user_id' | 'saml_assertion_no_email' | 'user_already_exists' | 'sso_provider_not_found' | 'saml_metadata_fetch_failed' | 'saml_idp_already_exists' | 'sso_domain_already_exists' | 'saml_entity_id_mismatch' | 'conflict' | 'provider_disabled' | 'user_sso_managed' | 'reauthentication_needed' | 'same_password' | 'reauthentication_not_valid' | 'otp_expired' | 'otp_disabled' | 'identity_not_found' | 'weak_password' | 'over_request_rate_limit' | 'over_email_send_rate_limit' | 'over_sms_send_rate_limit' | 'bad_code_verifier' | 'anonymous_provider_disabled' | 'hook_timeout' | 'hook_timeout_after_retry' | 'hook_payload_over_size_limit' | 'hook_payload_invalid_content_type' | 'request_timeout' | 'mfa_phone_enroll_not_enabled' | 'mfa_phone_verify_not_enabled' | 'mfa_totp_enroll_not_enabled' | 'mfa_totp_verify_not_enabled' | 'mfa_webauthn_enroll_not_enabled' | 'mfa_webauthn_verify_not_enabled' | 'mfa_verified_factor_exists' | 'invalid_credentials' | 'email_address_not_authorized' | 'email_address_invalid';
+//# sourceMappingURL=error-codes.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map
new file mode 100644
index 0000000..cc88970
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB,oBAAoB,GACpB,mBAAmB,GACnB,UAAU,GACV,cAAc,GACd,cAAc,GACd,SAAS,GACT,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,yBAAyB,GACzB,4BAA4B,GAC5B,sBAAsB,GACtB,oBAAoB,GACpB,iBAAiB,GACjB,aAAa,GACb,mCAAmC,GACnC,kBAAkB,GAClB,iBAAiB,GACjB,oBAAoB,GACpB,8BAA8B,GAC9B,qBAAqB,GACrB,+BAA+B,GAC/B,uCAAuC,GACvC,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,+BAA+B,GAC/B,0BAA0B,GAC1B,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,yBAAyB,GACzB,2BAA2B,GAC3B,kBAAkB,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,yBAAyB,GACzB,iBAAiB,GACjB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,0BAA0B,GAC1B,oBAAoB,GACpB,2BAA2B,GAC3B,yBAAyB,GACzB,qBAAqB,GACrB,wBAAwB,GACxB,4BAA4B,GAC5B,yBAAyB,GACzB,2BAA2B,GAC3B,yBAAyB,GACzB,UAAU,GACV,mBAAmB,GACnB,kBAAkB,GAClB,yBAAyB,GACzB,eAAe,GACf,4BAA4B,GAC5B,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,eAAe,GACf,yBAAyB,GACzB,4BAA4B,GAC5B,0BAA0B,GAC1B,mBAAmB,GACnB,6BAA6B,GAC7B,cAAc,GACd,0BAA0B,GAC1B,8BAA8B,GAC9B,mCAAmC,GACnC,iBAAiB,GACjB,8BAA8B,GAC9B,8BAA8B,GAC9B,6BAA6B,GAC7B,6BAA6B,GAC7B,iCAAiC,GACjC,iCAAiC,GACjC,4BAA4B,GAC5B,qBAAqB,GACrB,8BAA8B,GAC9B,uBAAuB,CAAA"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js
new file mode 100644
index 0000000..035bf41
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=error-codes.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map
new file mode 100644
index 0000000..a68e8e3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../../src/lib/error-codes.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts
new file mode 100644
index 0000000..bec859b
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts
@@ -0,0 +1,227 @@
+import { WeakPasswordReasons } from './types';
+import { ErrorCode } from './error-codes';
+/**
+ * Base error thrown by Supabase Auth helpers.
+ *
+ * @example
+ * ```ts
+ * import { AuthError } from '@supabase/auth-js'
+ *
+ * throw new AuthError('Unexpected auth error', 500, 'unexpected')
+ * ```
+ */
+export declare class AuthError extends Error {
+ /**
+ * Error code associated with the error. Most errors coming from
+ * HTTP responses will have a code, though some errors that occur
+ * before a response is received will not have one present. In that
+ * case {@link #status} will also be undefined.
+ */
+ code: ErrorCode | (string & {}) | undefined;
+ /** HTTP status code that caused the error. */
+ status: number | undefined;
+ protected __isAuthError: boolean;
+ constructor(message: string, status?: number, code?: string);
+}
+export declare function isAuthError(error: unknown): error is AuthError;
+/**
+ * Error returned directly from the GoTrue REST API.
+ *
+ * @example
+ * ```ts
+ * import { AuthApiError } from '@supabase/auth-js'
+ *
+ * throw new AuthApiError('Invalid credentials', 400, 'invalid_credentials')
+ * ```
+ */
+export declare class AuthApiError extends AuthError {
+ status: number;
+ constructor(message: string, status: number, code: string | undefined);
+}
+export declare function isAuthApiError(error: unknown): error is AuthApiError;
+/**
+ * Wraps non-standard errors so callers can inspect the root cause.
+ *
+ * @example
+ * ```ts
+ * import { AuthUnknownError } from '@supabase/auth-js'
+ *
+ * try {
+ * await someAuthCall()
+ * } catch (err) {
+ * throw new AuthUnknownError('Auth failed', err)
+ * }
+ * ```
+ */
+export declare class AuthUnknownError extends AuthError {
+ originalError: unknown;
+ constructor(message: string, originalError: unknown);
+}
+/**
+ * Flexible error class used to create named auth errors at runtime.
+ *
+ * @example
+ * ```ts
+ * import { CustomAuthError } from '@supabase/auth-js'
+ *
+ * throw new CustomAuthError('My custom auth error', 'MyAuthError', 400, 'custom_code')
+ * ```
+ */
+export declare class CustomAuthError extends AuthError {
+ name: string;
+ status: number;
+ constructor(message: string, name: string, status: number, code: string | undefined);
+}
+/**
+ * Error thrown when an operation requires a session but none is present.
+ *
+ * @example
+ * ```ts
+ * import { AuthSessionMissingError } from '@supabase/auth-js'
+ *
+ * throw new AuthSessionMissingError()
+ * ```
+ */
+export declare class AuthSessionMissingError extends CustomAuthError {
+ constructor();
+}
+export declare function isAuthSessionMissingError(error: any): error is AuthSessionMissingError;
+/**
+ * Error thrown when the token response is malformed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidTokenResponseError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidTokenResponseError()
+ * ```
+ */
+export declare class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor();
+}
+/**
+ * Error thrown when email/password credentials are invalid.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidCredentialsError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidCredentialsError('Email or password is incorrect')
+ * ```
+ */
+export declare class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message: string);
+}
+/**
+ * Error thrown when implicit grant redirects contain an error.
+ *
+ * @example
+ * ```ts
+ * import { AuthImplicitGrantRedirectError } from '@supabase/auth-js'
+ *
+ * throw new AuthImplicitGrantRedirectError('OAuth redirect failed', {
+ * error: 'access_denied',
+ * code: 'oauth_error',
+ * })
+ * ```
+ */
+export declare class AuthImplicitGrantRedirectError extends CustomAuthError {
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ constructor(message: string, details?: {
+ error: string;
+ code: string;
+ } | null);
+ toJSON(): {
+ name: string;
+ message: string;
+ status: number;
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ };
+}
+export declare function isAuthImplicitGrantRedirectError(error: any): error is AuthImplicitGrantRedirectError;
+/**
+ * Error thrown during PKCE code exchanges.
+ *
+ * @example
+ * ```ts
+ * import { AuthPKCEGrantCodeExchangeError } from '@supabase/auth-js'
+ *
+ * throw new AuthPKCEGrantCodeExchangeError('PKCE exchange failed')
+ * ```
+ */
+export declare class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ constructor(message: string, details?: {
+ error: string;
+ code: string;
+ } | null);
+ toJSON(): {
+ name: string;
+ message: string;
+ status: number;
+ details: {
+ error: string;
+ code: string;
+ } | null;
+ };
+}
+/**
+ * Error thrown when a transient fetch issue occurs.
+ *
+ * @example
+ * ```ts
+ * import { AuthRetryableFetchError } from '@supabase/auth-js'
+ *
+ * throw new AuthRetryableFetchError('Service temporarily unavailable', 503)
+ * ```
+ */
+export declare class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message: string, status: number);
+}
+export declare function isAuthRetryableFetchError(error: unknown): error is AuthRetryableFetchError;
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+/**
+ * Error thrown when a supplied password is considered weak.
+ *
+ * @example
+ * ```ts
+ * import { AuthWeakPasswordError } from '@supabase/auth-js'
+ *
+ * throw new AuthWeakPasswordError('Password too short', 400, ['min_length'])
+ * ```
+ */
+export declare class AuthWeakPasswordError extends CustomAuthError {
+ /**
+ * Reasons why the password is deemed weak.
+ */
+ reasons: WeakPasswordReasons[];
+ constructor(message: string, status: number, reasons: WeakPasswordReasons[]);
+}
+export declare function isAuthWeakPasswordError(error: unknown): error is AuthWeakPasswordError;
+/**
+ * Error thrown when a JWT cannot be verified or parsed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidJwtError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidJwtError('Token signature is invalid')
+ * ```
+ */
+export declare class AuthInvalidJwtError extends CustomAuthError {
+ constructor(message: string);
+}
+//# sourceMappingURL=errors.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map
new file mode 100644
index 0000000..f6dd864
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC;;;;;;;;;GASG;AACH,qBAAa,SAAU,SAAQ,K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,KAAK,IAAI,qBAAqB,CAEtF;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,OAAO,EAAE,MAAM;CAG5B"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js
new file mode 100644
index 0000000..e984b36
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js
@@ -0,0 +1,243 @@
+/**
+ * Base error thrown by Supabase Auth helpers.
+ *
+ * @example
+ * ```ts
+ * import { AuthError } from '@supabase/auth-js'
+ *
+ * throw new AuthError('Unexpected auth error', 500, 'unexpected')
+ * ```
+ */
+export class AuthError extends Error {
+ constructor(message, status, code) {
+ super(message);
+ this.__isAuthError = true;
+ this.name = 'AuthError';
+ this.status = status;
+ this.code = code;
+ }
+}
+export function isAuthError(error) {
+ return typeof error === 'object' && error !== null && '__isAuthError' in error;
+}
+/**
+ * Error returned directly from the GoTrue REST API.
+ *
+ * @example
+ * ```ts
+ * import { AuthApiError } from '@supabase/auth-js'
+ *
+ * throw new AuthApiError('Invalid credentials', 400, 'invalid_credentials')
+ * ```
+ */
+export class AuthApiError extends AuthError {
+ constructor(message, status, code) {
+ super(message, status, code);
+ this.name = 'AuthApiError';
+ this.status = status;
+ this.code = code;
+ }
+}
+export function isAuthApiError(error) {
+ return isAuthError(error) && error.name === 'AuthApiError';
+}
+/**
+ * Wraps non-standard errors so callers can inspect the root cause.
+ *
+ * @example
+ * ```ts
+ * import { AuthUnknownError } from '@supabase/auth-js'
+ *
+ * try {
+ * await someAuthCall()
+ * } catch (err) {
+ * throw new AuthUnknownError('Auth failed', err)
+ * }
+ * ```
+ */
+export class AuthUnknownError extends AuthError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'AuthUnknownError';
+ this.originalError = originalError;
+ }
+}
+/**
+ * Flexible error class used to create named auth errors at runtime.
+ *
+ * @example
+ * ```ts
+ * import { CustomAuthError } from '@supabase/auth-js'
+ *
+ * throw new CustomAuthError('My custom auth error', 'MyAuthError', 400, 'custom_code')
+ * ```
+ */
+export class CustomAuthError extends AuthError {
+ constructor(message, name, status, code) {
+ super(message, status, code);
+ this.name = name;
+ this.status = status;
+ }
+}
+/**
+ * Error thrown when an operation requires a session but none is present.
+ *
+ * @example
+ * ```ts
+ * import { AuthSessionMissingError } from '@supabase/auth-js'
+ *
+ * throw new AuthSessionMissingError()
+ * ```
+ */
+export class AuthSessionMissingError extends CustomAuthError {
+ constructor() {
+ super('Auth session missing!', 'AuthSessionMissingError', 400, undefined);
+ }
+}
+export function isAuthSessionMissingError(error) {
+ return isAuthError(error) && error.name === 'AuthSessionMissingError';
+}
+/**
+ * Error thrown when the token response is malformed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidTokenResponseError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidTokenResponseError()
+ * ```
+ */
+export class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor() {
+ super('Auth session or user missing', 'AuthInvalidTokenResponseError', 500, undefined);
+ }
+}
+/**
+ * Error thrown when email/password credentials are invalid.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidCredentialsError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidCredentialsError('Email or password is incorrect')
+ * ```
+ */
+export class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidCredentialsError', 400, undefined);
+ }
+}
+/**
+ * Error thrown when implicit grant redirects contain an error.
+ *
+ * @example
+ * ```ts
+ * import { AuthImplicitGrantRedirectError } from '@supabase/auth-js'
+ *
+ * throw new AuthImplicitGrantRedirectError('OAuth redirect failed', {
+ * error: 'access_denied',
+ * code: 'oauth_error',
+ * })
+ * ```
+ */
+export class AuthImplicitGrantRedirectError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthImplicitGrantRedirectError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+export function isAuthImplicitGrantRedirectError(error) {
+ return isAuthError(error) && error.name === 'AuthImplicitGrantRedirectError';
+}
+/**
+ * Error thrown during PKCE code exchanges.
+ *
+ * @example
+ * ```ts
+ * import { AuthPKCEGrantCodeExchangeError } from '@supabase/auth-js'
+ *
+ * throw new AuthPKCEGrantCodeExchangeError('PKCE exchange failed')
+ * ```
+ */
+export class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthPKCEGrantCodeExchangeError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+/**
+ * Error thrown when a transient fetch issue occurs.
+ *
+ * @example
+ * ```ts
+ * import { AuthRetryableFetchError } from '@supabase/auth-js'
+ *
+ * throw new AuthRetryableFetchError('Service temporarily unavailable', 503)
+ * ```
+ */
+export class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message, status) {
+ super(message, 'AuthRetryableFetchError', status, undefined);
+ }
+}
+export function isAuthRetryableFetchError(error) {
+ return isAuthError(error) && error.name === 'AuthRetryableFetchError';
+}
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+/**
+ * Error thrown when a supplied password is considered weak.
+ *
+ * @example
+ * ```ts
+ * import { AuthWeakPasswordError } from '@supabase/auth-js'
+ *
+ * throw new AuthWeakPasswordError('Password too short', 400, ['min_length'])
+ * ```
+ */
+export class AuthWeakPasswordError extends CustomAuthError {
+ constructor(message, status, reasons) {
+ super(message, 'AuthWeakPasswordError', status, 'weak_password');
+ this.reasons = reasons;
+ }
+}
+export function isAuthWeakPasswordError(error) {
+ return isAuthError(error) && error.name === 'AuthWeakPasswordError';
+}
+/**
+ * Error thrown when a JWT cannot be verified or parsed.
+ *
+ * @example
+ * ```ts
+ * import { AuthInvalidJwtError } from '@supabase/auth-js'
+ *
+ * throw new AuthInvalidJwtError('Token signature is invalid')
+ * ```
+ */
+export class AuthInvalidJwtError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidJwtError', 400, 'invalid_jwt');
+ }
+}
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map
new file mode 100644
index 0000000..b421a4d
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/lib/errors.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAclC,YAAY,OAAe,EAAE,MAAe,EAAE,IAAa;QACzD,KAAK,CAAC,OAAO,CAAC,CAAA;QAHN,kBAAa,GAAG,IAAI,CAAA;QAI5B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,eAAe,IAAI,KAAK,CAAA;AAChF,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,YAAa,SAAQ,SAAS;IAGzC,YAAY,OAAe,EAAE,MAAc,EAAE,IAAwB;QACnE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AAED,MAAM,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AAED,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,yBAAyB,CAAA;AACvE,CAAC;AAED;;;;GAIG;AACH;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IAMxD,YAAY,OAAe,EAAE,MAAc,EAAE,OAA8B;QACzE,KAAK,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;QAEhE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CACF;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,CAAA;AACrE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,EAAE,aAAa,CAAC,CAAA;IAC3D,CAAC;CACF"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts
new file mode 100644
index 0000000..4649c74
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts
@@ -0,0 +1,34 @@
+import { AuthResponse, AuthResponsePassword, SSOResponse, GenerateLinkResponse, UserResponse } from './types';
+export type Fetch = typeof fetch;
+export interface FetchOptions {
+ headers?: {
+ [key: string]: string;
+ };
+ noResolveJson?: boolean;
+}
+export interface FetchParameters {
+ signal?: AbortSignal;
+}
+export type RequestMethodType = 'GET' | 'POST' | 'PUT' | 'DELETE';
+export declare function handleError(error: unknown): Promise;
+interface GotrueRequestOptions extends FetchOptions {
+ jwt?: string;
+ redirectTo?: string;
+ body?: object;
+ query?: {
+ [key: string]: string;
+ };
+ /**
+ * Function that transforms api response from gotrue into a desirable / standardised format
+ */
+ xform?: (data: any) => any;
+}
+export declare function _request(fetcher: Fetch, method: RequestMethodType, url: string, options?: GotrueRequestOptions): Promise;
+export declare function _sessionResponse(data: any): AuthResponse;
+export declare function _sessionResponsePassword(data: any): AuthResponsePassword;
+export declare function _userResponse(data: any): UserResponse;
+export declare function _ssoResponse(data: any): SSOResponse;
+export declare function _generateLinkResponse(data: any): GenerateLinkResponse;
+export declare function _noResolveJsonResponse(data: any): Response;
+export {};
+//# sourceMappingURL=fetch.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map
new file mode 100644
index 0000000..9f607b0
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/lib/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,WAAW,EAEX,oBAAoB,EAEpB,YAAY,EACb,MAAM,SAAS,CAAA;AAShB,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAA;AAEhC,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IACD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;AAOjE,wBAAsB,WAAW,CAAC,KAAK,EAAE,OAAO,iBA+D/C;AAmBD,UAAU,oBAAqB,SAAQ,YAAY;IACjD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;CAC3B;AAED,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,KAAK,EACd,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,oBAAoB,gBAgC/B;AAwCD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAYxD;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAiBxE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,YAAY,CAGrD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW,CAEnD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,oBAAoB,CAmBrE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAG,QAAQ,CAE1D"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js
new file mode 100644
index 0000000..7cc9e71
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js
@@ -0,0 +1,174 @@
+import { __rest } from "tslib";
+import { API_VERSIONS, API_VERSION_HEADER_NAME } from './constants';
+import { expiresAt, looksLikeFetchResponse, parseResponseAPIVersion } from './helpers';
+import { AuthApiError, AuthRetryableFetchError, AuthWeakPasswordError, AuthUnknownError, AuthSessionMissingError, } from './errors';
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const NETWORK_ERROR_CODES = [502, 503, 504];
+export async function handleError(error) {
+ var _a;
+ if (!looksLikeFetchResponse(error)) {
+ throw new AuthRetryableFetchError(_getErrorMessage(error), 0);
+ }
+ if (NETWORK_ERROR_CODES.includes(error.status)) {
+ // status in 500...599 range - server had an error, request might be retryed.
+ throw new AuthRetryableFetchError(_getErrorMessage(error), error.status);
+ }
+ let data;
+ try {
+ data = await error.json();
+ }
+ catch (e) {
+ throw new AuthUnknownError(_getErrorMessage(e), e);
+ }
+ let errorCode = undefined;
+ const responseAPIVersion = parseResponseAPIVersion(error);
+ if (responseAPIVersion &&
+ responseAPIVersion.getTime() >= API_VERSIONS['2024-01-01'].timestamp &&
+ typeof data === 'object' &&
+ data &&
+ typeof data.code === 'string') {
+ errorCode = data.code;
+ }
+ else if (typeof data === 'object' && data && typeof data.error_code === 'string') {
+ errorCode = data.error_code;
+ }
+ if (!errorCode) {
+ // Legacy support for weak password errors, when there were no error codes
+ if (typeof data === 'object' &&
+ data &&
+ typeof data.weak_password === 'object' &&
+ data.weak_password &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ throw new AuthWeakPasswordError(_getErrorMessage(data), error.status, data.weak_password.reasons);
+ }
+ }
+ else if (errorCode === 'weak_password') {
+ throw new AuthWeakPasswordError(_getErrorMessage(data), error.status, ((_a = data.weak_password) === null || _a === void 0 ? void 0 : _a.reasons) || []);
+ }
+ else if (errorCode === 'session_not_found') {
+ // The `session_id` inside the JWT does not correspond to a row in the
+ // `sessions` table. This usually means the user has signed out, has been
+ // deleted, or their session has somehow been terminated.
+ throw new AuthSessionMissingError();
+ }
+ throw new AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
+}
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers);
+ params.body = JSON.stringify(body);
+ return Object.assign(Object.assign({}, params), parameters);
+};
+export async function _request(fetcher, method, url, options) {
+ var _a;
+ const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers);
+ if (!headers[API_VERSION_HEADER_NAME]) {
+ headers[API_VERSION_HEADER_NAME] = API_VERSIONS['2024-01-01'].name;
+ }
+ if (options === null || options === void 0 ? void 0 : options.jwt) {
+ headers['Authorization'] = `Bearer ${options.jwt}`;
+ }
+ const qs = (_a = options === null || options === void 0 ? void 0 : options.query) !== null && _a !== void 0 ? _a : {};
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ qs['redirect_to'] = options.redirectTo;
+ }
+ const queryString = Object.keys(qs).length ? '?' + new URLSearchParams(qs).toString() : '';
+ const data = await _handleRequest(fetcher, method, url + queryString, {
+ headers,
+ noResolveJson: options === null || options === void 0 ? void 0 : options.noResolveJson,
+ }, {}, options === null || options === void 0 ? void 0 : options.body);
+ return (options === null || options === void 0 ? void 0 : options.xform) ? options === null || options === void 0 ? void 0 : options.xform(data) : { data: Object.assign({}, data), error: null };
+}
+async function _handleRequest(fetcher, method, url, options, parameters, body) {
+ const requestParams = _getRequestParams(method, options, parameters, body);
+ let result;
+ try {
+ result = await fetcher(url, Object.assign({}, requestParams));
+ }
+ catch (e) {
+ console.error(e);
+ // fetch failed, likely due to a network or CORS error
+ throw new AuthRetryableFetchError(_getErrorMessage(e), 0);
+ }
+ if (!result.ok) {
+ await handleError(result);
+ }
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson) {
+ return result;
+ }
+ try {
+ return await result.json();
+ }
+ catch (e) {
+ await handleError(e);
+ }
+}
+export function _sessionResponse(data) {
+ var _a;
+ let session = null;
+ if (hasSession(data)) {
+ session = Object.assign({}, data);
+ if (!data.expires_at) {
+ session.expires_at = expiresAt(data.expires_in);
+ }
+ }
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { session, user }, error: null };
+}
+export function _sessionResponsePassword(data) {
+ const response = _sessionResponse(data);
+ if (!response.error &&
+ data.weak_password &&
+ typeof data.weak_password === 'object' &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.message &&
+ typeof data.weak_password.message === 'string' &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ response.data.weak_password = data.weak_password;
+ }
+ return response;
+}
+export function _userResponse(data) {
+ var _a;
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { user }, error: null };
+}
+export function _ssoResponse(data) {
+ return { data, error: null };
+}
+export function _generateLinkResponse(data) {
+ const { action_link, email_otp, hashed_token, redirect_to, verification_type } = data, rest = __rest(data, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]);
+ const properties = {
+ action_link,
+ email_otp,
+ hashed_token,
+ redirect_to,
+ verification_type,
+ };
+ const user = Object.assign({}, rest);
+ return {
+ data: {
+ properties,
+ user,
+ },
+ error: null,
+ };
+}
+export function _noResolveJsonResponse(data) {
+ return data;
+}
+/**
+ * hasSession checks if the response object contains a valid session
+ * @param data A response object
+ * @returns true if a session is in the response
+ */
+function hasSession(data) {
+ return data.access_token && data.refresh_token && data.expires_in;
+}
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map
new file mode 100644
index 0000000..b202b2e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../src/lib/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAUtF,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB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AAU,CAAA;AACnE,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts
new file mode 100644
index 0000000..43fdc86
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts
@@ -0,0 +1,91 @@
+import { JwtHeader, JwtPayload, SupportedStorage, User } from './types';
+import { Uint8Array_ } from './webauthn.dom';
+export declare function expiresAt(expiresIn: number): number;
+/**
+ * Generates a unique identifier for internal callback subscriptions.
+ *
+ * This function uses JavaScript Symbols to create guaranteed-unique identifiers
+ * for auth state change callbacks. Symbols are ideal for this use case because:
+ * - They are guaranteed unique by the JavaScript runtime
+ * - They work in all environments (browser, SSR, Node.js)
+ * - They avoid issues with Next.js 16 deterministic rendering requirements
+ * - They are perfect for internal, non-serializable identifiers
+ *
+ * Note: This function is only used for internal subscription management,
+ * not for security-critical operations like session tokens.
+ */
+export declare function generateCallbackId(): symbol;
+export declare const isBrowser: () => boolean;
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+export declare const supportsLocalStorage: () => boolean;
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+export declare function parseParametersFromURL(href: string): {
+ [parameter: string]: string;
+};
+type Fetch = typeof fetch;
+export declare const resolveFetch: (customFetch?: Fetch) => Fetch;
+export declare const looksLikeFetchResponse: (maybeResponse: unknown) => maybeResponse is Response;
+export declare const setItemAsync: (storage: SupportedStorage, key: string, data: any) => Promise;
+export declare const getItemAsync: (storage: SupportedStorage, key: string) => Promise;
+export declare const removeItemAsync: (storage: SupportedStorage, key: string) => Promise;
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+export declare class Deferred {
+ static promiseConstructor: PromiseConstructor;
+ readonly promise: PromiseLike;
+ readonly resolve: (value?: T | PromiseLike) => void;
+ readonly reject: (reason?: any) => any;
+ constructor();
+}
+export declare function decodeJWT(token: string): {
+ header: JwtHeader;
+ payload: JwtPayload;
+ signature: Uint8Array_;
+ raw: {
+ header: string;
+ payload: string;
+ };
+};
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+export declare function sleep(time: number): Promise;
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+export declare function retryable(fn: (attempt: number) => Promise, isRetryable: (attempt: number, error: any | null, result?: T) => boolean): Promise;
+export declare function generatePKCEVerifier(): string;
+export declare function generatePKCEChallenge(verifier: string): Promise;
+export declare function getCodeChallengeAndMethod(storage: SupportedStorage, storageKey: string, isPasswordRecovery?: boolean): Promise;
+export declare function parseResponseAPIVersion(response: Response): Date | null;
+export declare function validateExp(exp: number): void;
+export declare function getAlgorithm(alg: 'HS256' | 'RS256' | 'ES256'): RsaHashedImportParams | EcKeyImportParams;
+export declare function validateUUID(str: string): void;
+export declare function userNotAvailableProxy(): User;
+/**
+ * Creates a proxy around a user object that warns when properties are accessed on the server.
+ * This is used to alert developers that using user data from getSession() on the server is insecure.
+ *
+ * @param user The actual user object to wrap
+ * @param suppressWarningRef An object with a 'value' property that controls warning suppression
+ * @returns A proxied user object that warns on property access
+ */
+export declare function insecureUserWarningProxy(user: User, suppressWarningRef: {
+ value: boolean;
+}): User;
+/**
+ * Deep clones a JSON-serializable object using JSON.parse(JSON.stringify(obj)).
+ * Note: Only works for JSON-safe data.
+ */
+export declare function deepClone(obj: T): T;
+export {};
+//# sourceMappingURL=helpers.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map
new file mode 100644
index 0000000..b87fd00
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":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AE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAkCjG;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAEtC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.js
new file mode 100644
index 0000000..fd20006
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.js
@@ -0,0 +1,368 @@
+import { API_VERSION_HEADER_NAME, BASE64URL_REGEX } from './constants';
+import { AuthInvalidJwtError } from './errors';
+import { base64UrlToUint8Array, stringFromBase64URL } from './base64url';
+export function expiresAt(expiresIn) {
+ const timeNow = Math.round(Date.now() / 1000);
+ return timeNow + expiresIn;
+}
+/**
+ * Generates a unique identifier for internal callback subscriptions.
+ *
+ * This function uses JavaScript Symbols to create guaranteed-unique identifiers
+ * for auth state change callbacks. Symbols are ideal for this use case because:
+ * - They are guaranteed unique by the JavaScript runtime
+ * - They work in all environments (browser, SSR, Node.js)
+ * - They avoid issues with Next.js 16 deterministic rendering requirements
+ * - They are perfect for internal, non-serializable identifiers
+ *
+ * Note: This function is only used for internal subscription management,
+ * not for security-critical operations like session tokens.
+ */
+export function generateCallbackId() {
+ return Symbol('auth-callback');
+}
+export const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
+const localStorageWriteTests = {
+ tested: false,
+ writable: false,
+};
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+export const supportsLocalStorage = () => {
+ if (!isBrowser()) {
+ return false;
+ }
+ try {
+ if (typeof globalThis.localStorage !== 'object') {
+ return false;
+ }
+ }
+ catch (e) {
+ // DOM exception when accessing `localStorage`
+ return false;
+ }
+ if (localStorageWriteTests.tested) {
+ return localStorageWriteTests.writable;
+ }
+ const randomKey = `lswt-${Math.random()}${Math.random()}`;
+ try {
+ globalThis.localStorage.setItem(randomKey, randomKey);
+ globalThis.localStorage.removeItem(randomKey);
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = true;
+ }
+ catch (e) {
+ // localStorage can't be written to
+ // https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = false;
+ }
+ return localStorageWriteTests.writable;
+};
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+export function parseParametersFromURL(href) {
+ const result = {};
+ const url = new URL(href);
+ if (url.hash && url.hash[0] === '#') {
+ try {
+ const hashSearchParams = new URLSearchParams(url.hash.substring(1));
+ hashSearchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ }
+ catch (e) {
+ // hash is not a query string
+ }
+ }
+ // search parameters take precedence over hash parameters
+ url.searchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ return result;
+}
+export const resolveFetch = (customFetch) => {
+ if (customFetch) {
+ return (...args) => customFetch(...args);
+ }
+ return (...args) => fetch(...args);
+};
+export const looksLikeFetchResponse = (maybeResponse) => {
+ return (typeof maybeResponse === 'object' &&
+ maybeResponse !== null &&
+ 'status' in maybeResponse &&
+ 'ok' in maybeResponse &&
+ 'json' in maybeResponse &&
+ typeof maybeResponse.json === 'function');
+};
+// Storage helpers
+export const setItemAsync = async (storage, key, data) => {
+ await storage.setItem(key, JSON.stringify(data));
+};
+export const getItemAsync = async (storage, key) => {
+ const value = await storage.getItem(key);
+ if (!value) {
+ return null;
+ }
+ try {
+ return JSON.parse(value);
+ }
+ catch (_a) {
+ return value;
+ }
+};
+export const removeItemAsync = async (storage, key) => {
+ await storage.removeItem(key);
+};
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+export class Deferred {
+ constructor() {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.promise = new Deferred.promiseConstructor((res, rej) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.resolve = res;
+ this.reject = rej;
+ });
+ }
+}
+Deferred.promiseConstructor = Promise;
+export function decodeJWT(token) {
+ const parts = token.split('.');
+ if (parts.length !== 3) {
+ throw new AuthInvalidJwtError('Invalid JWT structure');
+ }
+ // Regex checks for base64url format
+ for (let i = 0; i < parts.length; i++) {
+ if (!BASE64URL_REGEX.test(parts[i])) {
+ throw new AuthInvalidJwtError('JWT not in base64url format');
+ }
+ }
+ const data = {
+ // using base64url lib
+ header: JSON.parse(stringFromBase64URL(parts[0])),
+ payload: JSON.parse(stringFromBase64URL(parts[1])),
+ signature: base64UrlToUint8Array(parts[2]),
+ raw: {
+ header: parts[0],
+ payload: parts[1],
+ },
+ };
+ return data;
+}
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+export async function sleep(time) {
+ return await new Promise((accept) => {
+ setTimeout(() => accept(null), time);
+ });
+}
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+export function retryable(fn, isRetryable) {
+ const promise = new Promise((accept, reject) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ (async () => {
+ for (let attempt = 0; attempt < Infinity; attempt++) {
+ try {
+ const result = await fn(attempt);
+ if (!isRetryable(attempt, null, result)) {
+ accept(result);
+ return;
+ }
+ }
+ catch (e) {
+ if (!isRetryable(attempt, e)) {
+ reject(e);
+ return;
+ }
+ }
+ }
+ })();
+ });
+ return promise;
+}
+function dec2hex(dec) {
+ return ('0' + dec.toString(16)).substr(-2);
+}
+// Functions below taken from: https://stackoverflow.com/questions/63309409/creating-a-code-verifier-and-challenge-for-pkce-auth-on-spotify-api-in-reactjs
+export function generatePKCEVerifier() {
+ const verifierLength = 56;
+ const array = new Uint32Array(verifierLength);
+ if (typeof crypto === 'undefined') {
+ const charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';
+ const charSetLen = charSet.length;
+ let verifier = '';
+ for (let i = 0; i < verifierLength; i++) {
+ verifier += charSet.charAt(Math.floor(Math.random() * charSetLen));
+ }
+ return verifier;
+ }
+ crypto.getRandomValues(array);
+ return Array.from(array, dec2hex).join('');
+}
+async function sha256(randomString) {
+ const encoder = new TextEncoder();
+ const encodedData = encoder.encode(randomString);
+ const hash = await crypto.subtle.digest('SHA-256', encodedData);
+ const bytes = new Uint8Array(hash);
+ return Array.from(bytes)
+ .map((c) => String.fromCharCode(c))
+ .join('');
+}
+export async function generatePKCEChallenge(verifier) {
+ const hasCryptoSupport = typeof crypto !== 'undefined' &&
+ typeof crypto.subtle !== 'undefined' &&
+ typeof TextEncoder !== 'undefined';
+ if (!hasCryptoSupport) {
+ console.warn('WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.');
+ return verifier;
+ }
+ const hashed = await sha256(verifier);
+ return btoa(hashed).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
+}
+export async function getCodeChallengeAndMethod(storage, storageKey, isPasswordRecovery = false) {
+ const codeVerifier = generatePKCEVerifier();
+ let storedCodeVerifier = codeVerifier;
+ if (isPasswordRecovery) {
+ storedCodeVerifier += '/PASSWORD_RECOVERY';
+ }
+ await setItemAsync(storage, `${storageKey}-code-verifier`, storedCodeVerifier);
+ const codeChallenge = await generatePKCEChallenge(codeVerifier);
+ const codeChallengeMethod = codeVerifier === codeChallenge ? 'plain' : 's256';
+ return [codeChallenge, codeChallengeMethod];
+}
+/** Parses the API version which is 2YYY-MM-DD. */
+const API_VERSION_REGEX = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
+export function parseResponseAPIVersion(response) {
+ const apiVersion = response.headers.get(API_VERSION_HEADER_NAME);
+ if (!apiVersion) {
+ return null;
+ }
+ if (!apiVersion.match(API_VERSION_REGEX)) {
+ return null;
+ }
+ try {
+ const date = new Date(`${apiVersion}T00:00:00.0Z`);
+ return date;
+ }
+ catch (e) {
+ return null;
+ }
+}
+export function validateExp(exp) {
+ if (!exp) {
+ throw new Error('Missing exp claim');
+ }
+ const timeNow = Math.floor(Date.now() / 1000);
+ if (exp <= timeNow) {
+ throw new Error('JWT has expired');
+ }
+}
+export function getAlgorithm(alg) {
+ switch (alg) {
+ case 'RS256':
+ return {
+ name: 'RSASSA-PKCS1-v1_5',
+ hash: { name: 'SHA-256' },
+ };
+ case 'ES256':
+ return {
+ name: 'ECDSA',
+ namedCurve: 'P-256',
+ hash: { name: 'SHA-256' },
+ };
+ default:
+ throw new Error('Invalid alg claim');
+ }
+}
+const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
+export function validateUUID(str) {
+ if (!UUID_REGEX.test(str)) {
+ throw new Error('@supabase/auth-js: Expected parameter to be UUID but is not');
+ }
+}
+export function userNotAvailableProxy() {
+ const proxyTarget = {};
+ return new Proxy(proxyTarget, {
+ get: (target, prop) => {
+ if (prop === '__isUserNotAvailableProxy') {
+ return true;
+ }
+ // Preventative check for common problematic symbols during cloning/inspection
+ // These symbols might be accessed by structuredClone or other internal mechanisms.
+ if (typeof prop === 'symbol') {
+ const sProp = prop.toString();
+ if (sProp === 'Symbol(Symbol.toPrimitive)' ||
+ sProp === 'Symbol(Symbol.toStringTag)' ||
+ sProp === 'Symbol(util.inspect.custom)') {
+ // Node.js util.inspect
+ return undefined;
+ }
+ }
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${prop}" property of the session object is not supported. Please use getUser() instead.`);
+ },
+ set: (_target, prop) => {
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${prop}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`);
+ },
+ deleteProperty: (_target, prop) => {
+ throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${prop}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`);
+ },
+ });
+}
+/**
+ * Creates a proxy around a user object that warns when properties are accessed on the server.
+ * This is used to alert developers that using user data from getSession() on the server is insecure.
+ *
+ * @param user The actual user object to wrap
+ * @param suppressWarningRef An object with a 'value' property that controls warning suppression
+ * @returns A proxied user object that warns on property access
+ */
+export function insecureUserWarningProxy(user, suppressWarningRef) {
+ return new Proxy(user, {
+ get: (target, prop, receiver) => {
+ // Allow internal checks without warning
+ if (prop === '__isInsecureUserWarningProxy') {
+ return true;
+ }
+ // Preventative check for common problematic symbols during cloning/inspection
+ // These symbols might be accessed by structuredClone or other internal mechanisms
+ if (typeof prop === 'symbol') {
+ const sProp = prop.toString();
+ if (sProp === 'Symbol(Symbol.toPrimitive)' ||
+ sProp === 'Symbol(Symbol.toStringTag)' ||
+ sProp === 'Symbol(util.inspect.custom)' ||
+ sProp === 'Symbol(nodejs.util.inspect.custom)') {
+ // Return the actual value for these symbols to allow proper inspection
+ return Reflect.get(target, prop, receiver);
+ }
+ }
+ // Emit warning on first property access
+ if (!suppressWarningRef.value && typeof prop === 'string') {
+ console.warn('Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.');
+ suppressWarningRef.value = true;
+ }
+ return Reflect.get(target, prop, receiver);
+ },
+ });
+}
+/**
+ * Deep clones a JSON-serializable object using JSON.parse(JSON.stringify(obj)).
+ * Note: Only works for JSON-safe data.
+ */
+export function deepClone(obj) {
+ return JSON.parse(JSON.stringify(obj));
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map
new file mode 100644
index 0000000..f5577ae
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist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/@supabase/auth-js/dist/module/lib/local-storage.d.ts
new file mode 100644
index 0000000..05dabc3
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts
@@ -0,0 +1,9 @@
+import { SupportedStorage } from './types';
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+export declare function memoryLocalStorageAdapter(store?: {
+ [key: string]: string;
+}): SupportedStorage;
+//# sourceMappingURL=local-storage.d.ts.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map
new file mode 100644
index 0000000..7dc636e
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../../src/lib/local-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,GAAG,gBAAgB,CAcjG"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js
new file mode 100644
index 0000000..ee52a6f
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js
@@ -0,0 +1,18 @@
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+export function memoryLocalStorageAdapter(store = {}) {
+ return {
+ getItem: (key) => {
+ return store[key] || null;
+ },
+ setItem: (key, value) => {
+ store[key] = value;
+ },
+ removeItem: (key) => {
+ delete store[key];
+ },
+ };
+}
+//# sourceMappingURL=local-storage.js.map
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map
new file mode 100644
index 0000000..c1399df
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"local-storage.js","sourceRoot":"","sources":["../../../src/lib/local-storage.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAmC,EAAE;IAC7E,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACf,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;QAC3B,CAAC;QAED,OAAO,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACtB,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;QACpB,CAAC;QAED,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE;YAClB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC;KACF,CAAA;AACH,CAAC"}
\ No newline at end of file
diff --git a/backend/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts b/backend/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts
new file mode 100644
index 0000000..41c5032
--- /dev/null
+++ b/backend/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts
@@ -0,0 +1,107 @@
+/**
+ * @experimental
+ */
+export declare const internals: {
+ /**
+ * @experimental
+ */
+ debug: boolean;
+};
+/**
+ * An error thrown when a lock cannot be acquired after some amount of time.
+ *
+ * Use the {@link #isAcquireTimeout} property instead of checking with `instanceof`.
+ *
+ * @example
+ * ```ts
+ * import { LockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * class CustomLockError extends LockAcquireTimeoutError {
+ * constructor() {
+ * super('Lock timed out')
+ * }
+ * }
+ * ```
+ */
+export declare abstract class LockAcquireTimeoutError extends Error {
+ readonly isAcquireTimeout = true;
+ constructor(message: string);
+}
+/**
+ * Error thrown when the browser Navigator Lock API fails to acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { NavigatorLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new NavigatorLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+export declare class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+/**
+ * Error thrown when the process-level lock helper cannot acquire a lock.
+ *
+ * @example
+ * ```ts
+ * import { ProcessLockAcquireTimeoutError } from '@supabase/auth-js'
+ *
+ * throw new ProcessLockAcquireTimeoutError('Lock timed out')
+ * ```
+ */
+export declare class ProcessLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+/**
+ * Implements a global exclusive lock using the Navigator LockManager API. It
+ * is available on all browsers released after 2022-03-15 with Safari being the
+ * last one to release support. If the API is not available, this function will
+ * throw. Make sure you check availablility before configuring {@link
+ * GoTrueClient}.
+ *
+ * You can turn on debugging by setting the `supabase.gotrue-js.locks.debug`
+ * local storage item to `true`.
+ *
+ * Internals:
+ *
+ * Since the LockManager API does not preserve stack traces for the async
+ * function passed in the `request` method, a trick is used where acquiring the
+ * lock releases a previously started promise to run the operation in the `fn`
+ * function. The lock waits for that promise to finish (with or without error),
+ * while the function will finally wait for the result anyway.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ * @example
+ * ```ts
+ * await navigatorLock('sync-user', 1000, async () => {
+ * await refreshSession()
+ * })
+ * ```
+ */
+export declare function navigatorLock(name: string, acquireTimeout: number, fn: () => Promise