Compare commits

...

197 Commits

Author SHA1 Message Date
Pilou
9f81ba9713 Merge pull request #956 from nhost/changeset-release/main
chore: update versions
2022-09-26 16:26:49 +02:00
Pierre-Louis Mercereau
2f815e5eb6 chore: correct version bump 2022-09-26 16:12:08 +02:00
Pierre-Louis Mercereau
2cabd2d29a Merge branch 'changeset-release/main' of https://github.com/nhost/nhost into changeset-release/main 2022-09-26 16:08:40 +02:00
github-actions[bot]
d4ee6cc756 chore: update versions 2022-09-26 14:00:32 +00:00
Szilárd Dóró
8208b1c385 Merge pull request #958 from nhost/fix/nextjs-ssg
fix (react-apollo): broken Next.js SSG
2022-09-26 15:59:15 +02:00
Johan Eliasson
4c6c094f71 Merge pull request #957 from nhost/fix/stripe-graphql-updates
stripe graphiql option + readme updates
2022-09-26 15:57:57 +02:00
Johan Eliasson
3dadc7eab9 Merge pull request #954 from nhost/fix/import-users
docs: import users
2022-09-26 15:56:05 +02:00
Johan Eliasson
784041020b Create spotty-wasps-remember.md 2022-09-26 15:55:49 +02:00
Szilárd Dóró
74758f2c36 fix (react-apollo): broken Next.js SSG
Fixes #873
2022-09-26 15:44:02 +02:00
Johan Eliasson
ea34a3856b update 2022-09-26 13:59:08 +02:00
Johan Eliasson
c9175b76d3 readme update 2022-09-26 13:57:57 +02:00
Pierre-Louis Mercereau
1c82522163 chore: undo major peer bumps 2022-09-26 13:45:47 +02:00
github-actions[bot]
5794357374 chore: update versions 2022-09-26 11:40:59 +00:00
Pilou
3edf41f989 Merge pull request #942 from nhost/webauthn-signup
WebAuthn: signup
2022-09-26 13:39:41 +02:00
Johan Eliasson
44f069a253 graphiql 2022-09-26 13:37:21 +02:00
Johan Eliasson
cb0988cb87 readme about impor users 2022-09-26 09:05:06 +02:00
Pierre-Louis Mercereau
27752ca8a7 chore: lint 2022-09-23 13:00:42 +02:00
Pierre-Louis Mercereau
855181abbc refactor: complete name consistency 2022-09-23 12:57:46 +02:00
Pierre-Louis Mercereau
bc0515bd59 Merge branch 'webauthn-signup' of https://github.com/nhost/nhost into webauthn-signup 2022-09-23 12:47:55 +02:00
Pierre-Louis Mercereau
271c401b1a refactor: 💡 consistent names, and adjust example nav 2022-09-23 12:47:34 +02:00
Pilou
cbed7cdc72 Update .changeset/old-games-talk.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-09-23 12:31:39 +02:00
Pilou
fca620f050 Update .changeset/grumpy-ghosts-kneel.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-09-23 12:31:33 +02:00
Pilou
5200a4f272 Update .changeset/angry-dragons-carry.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-09-23 12:31:16 +02:00
Pierre-Louis Mercereau
19458cf076 refactor: bump hasura-auth to v0.13.0 2022-09-23 11:25:48 +02:00
Pierre-Louis Mercereau
1a94359a81 fix: add security key nickname to sign up options 2022-09-22 11:57:26 +02:00
Pierre-Louis Mercereau
96001f683a docs: adapt react-apollo example to the blog post 2022-09-22 09:57:39 +02:00
Pierre-Louis Mercereau
dd08453fb5 chore: adjust from review 2022-09-21 19:27:22 +02:00
Pierre-Louis Mercereau
739a3c4563 chore: 🤖 update changesets 2022-09-21 15:07:00 +02:00
Pierre-Louis Mercereau
20f3eb9086 refactor: 💡 remove irrelevant test 2022-09-21 14:54:36 +02:00
Pierre-Louis Mercereau
7b5f8647fb test: 💍 security key sign up 2022-09-21 14:49:03 +02:00
Pilou
486ddec751 Merge pull request #945 from nhost/guicurcio-patch-3
Update README.md
2022-09-21 13:50:27 +02:00
Guido Curcio
6475047158 Update README.md 2022-09-21 04:47:03 -07:00
Pierre-Louis Mercereau
14b26bdbc7 Merge branch 'main' into webauthn-signup 2022-09-21 12:37:48 +02:00
Pierre-Louis Mercereau
8e4d790b04 feat: 🎸 sign up with an email and a security key 2022-09-21 12:34:01 +02:00
Johan Eliasson
d814c7b46b Merge pull request #944 from nhost/fix/graphql-stripe-js
Fix/graphql stripe js
2022-09-20 20:17:54 +02:00
Johan Eliasson
5baeddba0b removed tmp changeset 2022-09-20 20:14:34 +02:00
Johan Eliasson
0262723329 Merge branch 'main' into fix/graphql-stripe-js 2022-09-20 20:14:17 +02:00
Johan Eliasson
1cf8a58d2c updated version 2022-09-20 20:12:13 +02:00
Johan Eliasson
b9a19d8251 Merge pull request #943 from nhost/fix/graphql-stripe-js
changeset update
2022-09-20 19:40:45 +02:00
Johan Eliasson
465d248456 changeset update 2022-09-20 19:19:00 +02:00
Pierre-Louis Mercereau
9e4861f2bb refactor: sign-in screens 2022-09-20 16:46:49 +02:00
Johan Eliasson
4ca738ba56 Merge pull request #916 from nhost/feat/graphql-stripe
feat: Stripe GraphQL
2022-09-20 12:49:53 +02:00
Johan Eliasson
be27ed73e1 new lock file 2022-09-20 12:21:15 +02:00
Johan Eliasson
f4d81d33b9 Merge branch 'main' into feat/graphql-stripe 2022-09-20 12:17:54 +02:00
Johan Eliasson
730c7d7b28 update 2022-09-20 12:16:25 +02:00
github-actions[bot]
38de442a7f chore: update versions 2022-09-20 12:15:55 +02:00
Johan Eliasson
22b8f02504 Update packages/stripe-graphql-js/README.md
Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-09-20 12:13:59 +02:00
Pilou
79f268ea08 Merge pull request #931 from nhost/changeset-release/main
chore: update versions
2022-09-20 11:58:56 +02:00
Pierre-Louis Mercereau
24825adb08 feat: improve navigation and names 2022-09-20 11:48:59 +02:00
Johan Eliasson
96e59f0251 update 2022-09-20 11:18:53 +02:00
Johan Eliasson
9e43c320b9 remove unused variable 2022-09-20 11:04:03 +02:00
Johan Eliasson
f199ed5474 update 2022-09-20 11:03:33 +02:00
Johan Eliasson
2f00d7f309 updates 2022-09-20 10:44:54 +02:00
Johan Eliasson
d35dfb1aa0 readme update 2022-09-20 08:35:17 +02:00
Johan Eliasson
93f1d1944c rename 2022-09-19 17:05:05 +02:00
Johan Eliasson
efd3904966 update 2022-09-19 16:53:54 +02:00
Johan Eliasson
133e682e91 claims update 2022-09-19 15:57:34 +02:00
Johan Eliasson
72eebe538e reworked permissions a bit 2022-09-19 14:17:11 +02:00
Johan Eliasson
af313212f7 added metadata 2022-09-19 10:45:11 +02:00
Johan Eliasson
06b29f14fc minor updates 2022-09-19 09:40:16 +02:00
Johan Eliasson
4b960227cf README notice message 2022-09-19 09:37:14 +02:00
Johan Eliasson
a9e2db678d update 2022-09-16 16:33:57 +02:00
Johan Eliasson
4d0738d51c Create tiny-monkeys-jog.md 2022-09-16 15:47:16 +02:00
Johan Eliasson
1a8160632e merge 2022-09-16 15:44:51 +02:00
Johan Eliasson
084ea77355 Merge branch 'main' into feat/graphql-stripe 2022-09-16 15:43:17 +02:00
Johan Eliasson
19e5abb4a9 customers 2022-09-16 11:37:04 +02:00
Johan Eliasson
fe6514fa14 update 2022-09-16 11:14:08 +02:00
Johan Eliasson
92e9659cc7 invoice updates 2022-09-16 11:12:56 +02:00
Johan Eliasson
d5a2a259ce more invoice implementations 2022-09-15 15:19:41 +02:00
Johan Eliasson
6929c7f423 invoice updates 2022-09-14 18:38:34 +02:00
Pilou
d5f56f7e18 Merge pull request #934 from nhost/contributors-readme-action-nCzaq6ybCG
contributors readme action update
2022-09-13 11:04:57 +02:00
github-actions[bot]
6ddaf47a4b chore: update versions 2022-09-13 09:04:53 +00:00
github-actions[bot]
11200934a8 contrib-readme-action has updated readme 2022-09-13 09:03:26 +00:00
Pilou
653f6b5766 Merge pull request #910 from nhost/webauthn
Authentication with security keys and the WebAuthn API
2022-09-13 11:03:09 +02:00
Pilou
653c886ec0 Merge pull request #932 from eltociear/patch-1
Fix typo in init.mdx
2022-09-12 19:19:29 +02:00
Ikko Ashimine
ecba8f78ac Fix typo in init.mdx
Intialize -> Initialize
2022-09-13 02:17:44 +09:00
Pierre-Louis Mercereau
d7b5261f5a Merge branch 'main' into webauthn 2022-09-12 18:43:40 +02:00
Pierre-Louis Mercereau
164e8cac28 doc: inline 2022-09-12 18:35:54 +02:00
Pierre-Louis Mercereau
ad0d56416c refactor: don't list or remove security keys 2022-09-12 17:00:12 +02:00
Pilou
c47ba63dd9 Merge pull request #922 from nhost/workos
Add workos provider
2022-09-12 16:15:10 +02:00
Pilou
47fb75302f Merge pull request #924 from nhost/bump-hasura-auth-0.11
Bump hasura-auth to version 0.11
2022-09-09 21:24:47 +02:00
Pierre-Louis Mercereau
2c95ed2d14 refactor: another change in types 2022-09-09 11:21:53 +02:00
Pierre-Louis Mercereau
07eb26ca29 refactor: improve typings 2022-09-09 11:16:46 +02:00
Pierre-Louis Mercereau
90843a9feb refactor: early returns 2022-09-09 09:31:06 +02:00
Johan Eliasson
5e5a9d6efa updates 2022-09-08 16:16:29 +02:00
Pierre-Louis Mercereau
5fc3b643a7 Merge branch 'bump-hasura-auth-0.11' into webauthn 2022-09-08 12:42:23 +02:00
Johan Eliasson
a365cadbd7 stripe internally + dotenv fix 2022-09-08 12:29:51 +02:00
Pierre-Louis Mercereau
eb93a20bc0 chore: 🤖 bump hasura-auth version to 0.11 2022-09-08 12:23:00 +02:00
Pierre-Louis Mercereau
ac2cd3f34e revert: docgen 2022-09-07 13:15:25 +02:00
Pierre-Louis Mercereau
26cb0de087 test: webauthn 2022-09-07 12:48:13 +02:00
Pierre-Louis Mercereau
6d93aa4235 docs: add core to typedoc's hasura-auth-js 2022-09-07 11:40:43 +02:00
Johan Eliasson
8221664f61 payment methods completed 2022-09-07 10:48:27 +02:00
Johan Eliasson
9396bdbbe3 working 2022-09-07 09:35:33 +02:00
Johan Eliasson
63fd6abd54 enum updates 2022-09-07 09:21:54 +02:00
Pierre-Louis Mercereau
03d7083d3e feat: workos options types 2022-09-06 22:11:46 +02:00
Pierre-Louis Mercereau
618e5a8db2 chore: merge main 2022-09-06 22:00:03 +02:00
Pierre-Louis Mercereau
3a217fd490 style: use #graphql 2022-09-06 21:58:32 +02:00
Johan Eliasson
4e30b4ee21 allowed updated 2022-09-06 21:14:21 +02:00
Pierre-Louis Mercereau
9eb78e06db feat: add workos provider 2022-09-06 11:05:56 +02:00
Pierre-Louis Mercereau
3d7369a19e refactor: break blocks with return statements 2022-09-06 10:33:00 +02:00
Pierre-Louis Mercereau
8e03774bc1 refactor: types 2022-09-06 10:27:12 +02:00
Pilou
13937fa026 Update packages/react/src/useSecurityKeys.ts
Co-authored-by: Szilárd Dóró <doroszilard@icloud.com>
2022-09-06 10:24:14 +02:00
Pilou
9e57a2bfe6 Update packages/react/src/useSecurityKeys.ts
Co-authored-by: Szilárd Dóró <doroszilard@icloud.com>
2022-09-06 10:24:04 +02:00
Johan Eliasson
b07a61b8e4 updates 2022-09-06 10:00:06 +02:00
Johan Eliasson
f52336f698 restructure and started adding payment methods and subscriptions 2022-09-06 09:33:03 +02:00
Pierre-Louis Mercereau
bf4cc38f8d refactor: remove rp_id 2022-09-05 21:31:34 +02:00
Pierre-Louis Mercereau
4e7d1fbe90 docs: inline documentation 2022-09-05 21:12:12 +02:00
Pilou
5ff6876aea Merge pull request #918 from nhost/changeset-release/main
chore: update versions
2022-09-05 10:54:49 +02:00
github-actions[bot]
d392ed86fb chore: update versions 2022-09-05 08:27:06 +00:00
Johan Eliasson
2d6e95b8b5 cleanup 2022-09-05 10:25:34 +02:00
Pilou
3bbe09c4b1 Merge pull request #917 from nhost/fix-passwordless-email-options
fix: add options to `nhost.auth.signIn({ email, options })`
2022-09-05 10:25:30 +02:00
Johan Eliasson
648c880445 update readme 2022-09-05 10:23:26 +02:00
Johan Eliasson
c286a0bbb1 adding payment method 2022-09-05 10:16:12 +02:00
Johan Eliasson
745d9a958d using pothos instead 2022-09-05 10:13:08 +02:00
Pierre-Louis Mercereau
a47ce29173 fix: add options to nhost.auth.signIn({ email, options }) 2022-09-05 09:57:46 +02:00
Johan Eliasson
8c12b4117b updates 2022-09-05 07:57:04 +02:00
Pierre-Louis Mercereau
2f432b5c5f feat: useSecurityKeys 2022-09-03 22:25:32 +02:00
Johan Eliasson
afcced2417 readme update 2022-09-03 15:44:03 +02:00
Johan Eliasson
88fa68e74c update readme 2022-09-03 15:37:08 +02:00
Johan Eliasson
47b4a3ecf1 updates 2022-09-03 15:35:06 +02:00
Johan Eliasson
9095a0f6ae init 2022-09-03 15:21:47 +02:00
Pierre-Louis Mercereau
4629b952c6 refactor: change to "security key" terminology 2022-09-02 20:36:46 +02:00
Pierre-Louis Mercereau
f6cfca9288 refactor: change to "security key" terminology 2022-09-02 19:49:16 +02:00
Pierre-Louis Mercereau
b9c012e263 test: adapt navigation 2022-09-02 11:51:13 +02:00
Pierre-Louis Mercereau
0e112674a4 refactor: explicitly bundle simple webtauthn 2022-09-02 10:57:51 +02:00
Pierre-Louis Mercereau
0feac15d10 fix: bundle @simplewebauth into @nhost/core 2022-09-02 10:32:56 +02:00
Pierre-Louis Mercereau
f42b693aa2 feat: add webauthn to nhost.auth.signIn 2022-09-01 14:33:35 +02:00
Pierre-Louis Mercereau
9687581dc7 feat: add device nickname and adapt example 2022-09-01 14:24:24 +02:00
Pierre-Louis Mercereau
9bf938a507 refactor: rename to passwordlessWebauthn 2022-09-01 10:04:45 +02:00
Pierre-Louis Mercereau
06bc8856dd refactor: simplify 2022-08-30 22:41:21 +02:00
Pierre-Louis Mercereau
1c3c7c225f feat: wip webauthn 2022-08-30 22:21:35 +02:00
Pilou
42fba7a095 Merge pull request #907 from nhost/core-typings
fix: improve typings
2022-08-30 11:24:13 +02:00
Pierre-Louis Mercereau
0ff633760a Merge branch 'main' into core-typings 2022-08-30 11:09:05 +02:00
Pilou
6c51571182 Merge pull request #909 from nhost/bump-storage-version-0.2.4
ci: bump hasura-storage version to 0.2.4
2022-08-30 11:08:44 +02:00
Pierre-Louis Mercereau
3825a09aed ci: bump hasura-storage version to 0.2.4 2022-08-30 10:25:57 +02:00
Pierre-Louis Mercereau
1768b1e069 docs: comment types & interfaces 2022-08-30 09:23:53 +02:00
Pierre-Louis Mercereau
fba5c819ce fix: improve typings 2022-08-29 21:39:26 +02:00
Johan Eliasson
9dea25ebe1 Merge pull request #900 from nhost/changeset-release/main
chore: update versions
2022-08-25 10:58:02 +02:00
github-actions[bot]
9b063abe32 chore: update versions 2022-08-25 07:53:20 +00:00
Johan Eliasson
cea97ba333 Merge pull request #898 from nhost/changeset-iasgd9ad
adding changeset for storage upload
2022-08-25 09:52:09 +02:00
Johan Eliasson
607c457f9d adding changeset for storage upload 2022-08-25 09:14:56 +02:00
Johan Eliasson
6ea9ed69ce Merge pull request #893 from nhost/fix/storage-in-node
Make @nhost/storage-js work on non-browser environments
2022-08-25 09:03:16 +02:00
Johan Eliasson
6450dcc02e overloading 2022-08-25 08:20:31 +02:00
Johan Eliasson
0b18704d5b updates 2022-08-24 18:04:07 +02:00
Johan Eliasson
0c53f9034e adding empty functions folder for nhost-js 2022-08-24 15:07:52 +02:00
Johan Eliasson
0c90292779 adding correct health check endpoints and new vite config files where needed 2022-08-24 15:05:24 +02:00
Johan Eliasson
2333aeb0c8 no tests 2022-08-24 14:58:13 +02:00
Johan Eliasson
3b686a231b use GET request 2022-08-24 14:47:01 +02:00
Johan Eliasson
136b85c5fb add empty package.json in the functions folder 2022-08-24 13:53:30 +02:00
Johan Eliasson
3d715d5f95 wait for hasura console to be up' 2022-08-24 10:38:34 +02:00
Johan Eliasson
6d5295aeca exclude is not needed as we're using include 2022-08-24 10:29:26 +02:00
Johan Eliasson
45f6285249 vite config for storage-js 2022-08-24 10:21:02 +02:00
Pierre-Louis Mercereau
01fb999c7d ci: remove chown 2022-08-24 10:14:52 +02:00
Johan Eliasson
8b8412d5fa exclude paths for vitest 2022-08-24 10:11:51 +02:00
Pierre-Louis Mercereau
0f1311c5b0 ci: correct gh expression 2022-08-24 10:09:34 +02:00
Pierre-Louis Mercereau
6b197aa886 ci: chown package folder 2022-08-24 10:05:14 +02:00
Pierre-Louis Mercereau
0353c6648e ci: change permissions 2022-08-24 09:58:55 +02:00
Johan Eliasson
978b8f8f68 install cli as sudo 2022-08-24 09:37:06 +02:00
Johan Eliasson
3643449a9a update 2022-08-24 07:59:04 +02:00
Johan Eliasson
8e25971e7d move nhost folder 2022-08-24 07:44:24 +02:00
Johan Eliasson
5cf05c8731 correct config 2022-08-23 13:51:48 +02:00
Johan Eliasson
4da70abcfb cleanup 2022-08-23 13:50:31 +02:00
Johan Eliasson
2d5203872c delete test functions folder 2022-08-23 13:49:31 +02:00
Johan Eliasson
882f1531ab update types and docs 2022-08-23 13:47:48 +02:00
Johan Eliasson
6126d77b01 updated tests 2022-08-23 13:47:48 +02:00
Johan Eliasson
09debbd746 Merge branch 'main' into fix/storage-in-node 2022-08-23 12:12:51 +02:00
Johan Eliasson
604ed6b314 readme update 2022-08-23 12:12:11 +02:00
Johan Eliasson
2f1fec1dcf new tests 2022-08-23 12:07:19 +02:00
Johan Eliasson
293bdc3f1c Merge pull request #892 from nhost/changeset-release/main
chore: update versions
2022-08-23 08:55:17 +02:00
Johan Eliasson
70f537841f make storage work on server 2022-08-23 08:01:28 +02:00
github-actions[bot]
b670dc396b chore: update versions 2022-08-22 20:19:44 +00:00
Pilou
88800ba4b4 Merge pull request #786 from nhost/feature/fallback-to-1337
Use :1337 if no port is specified when using "localhost"
2022-08-22 22:18:01 +02:00
Johan Eliasson
d412669c86 removed pnpm lock files in examples 2022-08-22 22:01:03 +02:00
Johan Eliasson
8600acb6f2 Merge branch 'main' into feature/fallback-to-1337 2022-08-22 21:57:31 +02:00
Johan Eliasson
0e2e2344f2 Merge pull request #891 from nhost/fix-cli-update
CLI update fixes
2022-08-22 21:55:51 +02:00
Johan Eliasson
8a91673242 removed pnpm lock files in examples 2022-08-22 21:41:42 +02:00
Pierre-Louis Mercereau
63f27235be refactor: adapt sync-versions to the new cli 2022-08-22 21:34:53 +02:00
Johan Eliasson
7feadbe55d nhost cli updates 2022-08-22 21:25:19 +02:00
Johan Eliasson
98e5680f48 nhost-js package updated 2022-08-22 20:46:07 +02:00
Johan Eliasson
8d6ebf9032 updated config 2022-08-22 20:35:52 +02:00
Johan Eliasson
9feea987e6 remove tmp cypress folders 2022-08-22 20:25:16 +02:00
Johan Eliasson
c2d77bbb7c updated example with latest CLI 2022-08-22 20:18:46 +02:00
Johan Eliasson
4468654054 new config for new cli 2022-08-22 19:55:41 +02:00
Johan Eliasson
998291ea9d correct subdomain 2022-08-22 19:35:07 +02:00
Johan Eliasson
eb46f7d8b7 Create great-adults-compare.md 2022-08-22 19:33:32 +02:00
Johan Eliasson
7bc11a1985 subdomain don't need 1337 2022-08-22 19:31:58 +02:00
Johan Eliasson
0fadc0d3da code + nhost cli updates 2022-08-22 19:26:38 +02:00
Johan Eliasson
814856da0d Merge branch 'main' into feature/fallback-to-1337 2022-08-22 18:43:08 +02:00
Johan Eliasson
1bf5114d6b updates 2022-08-22 18:42:28 +02:00
Johan Eliasson
ed618e0c41 Merge pull request #887 from nhost/remove-templates
Remove templates
2022-08-22 18:14:11 +02:00
Pilou
8a272b5b72 Merge pull request #883 from nhost/docker-email-templates
docs: add email templates to docker-compose, and remove obsolete example
2022-08-22 16:53:43 +02:00
Johan Eliasson
2a0107db55 removed mentions of templates/ 2022-08-22 16:46:36 +02:00
Johan Eliasson
48a90c4f69 remove templates 2022-08-19 13:02:03 +02:00
Pilou
686d3f1b09 Merge pull request #884 from nhost/bump-hasura-2.10.1
Bump hasura version to 2.10.1
2022-08-17 17:59:24 +02:00
Pierre-Louis Mercereau
6b4b4a5798 chore: bump hasura version to 2.10.1 2022-08-17 08:27:59 +02:00
Pierre-Louis Mercereau
3a14b90557 docs: add email templates to docker-compose, and remove obsolete example
the `custom-email-templates` is obsolete as it is now possible to deploy templates with the Nhost GH
integration
2022-08-16 11:02:26 +02:00
Nuno Pato
5485d48ce5 Use :1337 if no port is specified when using "localhost" 2022-07-04 00:14:46 +00:00
529 changed files with 14696 additions and 66908 deletions

View File

@@ -5,7 +5,6 @@ on:
branches: [main] branches: [main]
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- 'templates/**'
- 'examples/**' - 'examples/**'
- 'assets/**' - 'assets/**'
- '**.md' - '**.md'

View File

@@ -5,7 +5,6 @@ on:
branches: [main] branches: [main]
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- 'templates/**'
- 'assets/**' - 'assets/**'
- '**.md' - '**.md'
- 'LICENSE' - 'LICENSE'
@@ -14,7 +13,6 @@ on:
types: [opened, synchronize] types: [opened, synchronize]
paths-ignore: paths-ignore:
- 'docs/**' - 'docs/**'
- 'templates/**'
- 'assets/**' - 'assets/**'
- '**.md' - '**.md'
- 'LICENSE' - 'LICENSE'

View File

@@ -87,12 +87,12 @@ await nhost.graphql.request(`{
Nhost is frontend agnostic, which means Nhost works with all frontend frameworks. Nhost is frontend agnostic, which means Nhost works with all frontend frameworks.
<div align="center"> <div align="center">
<a href="https://github.com/nhost/nhost/tree/main/templates/web/nextjs-apollo"><img src="assets/nextjs.svg"/></a> <a href="https://docs.nhost.io/platform/quickstarts/nextjs"><img src="assets/nextjs.svg"/></a>
<a href="https://github.com/nhost/nhost/tree/main/examples/nuxt-apollo"><img src="assets/nuxtjs.svg"/></a> <a href="https://docs.nhost.io/reference/javascript"><img src="assets/nuxtjs.svg"/></a>
<a href="https://github.com/nhost/nhost/tree/main/templates/web/react-apollo"><img src="assets/react.svg"/></a> <a href="https://docs.nhost.io/platform/quickstarts/react"><img src="assets/react.svg"/></a>
<img src="assets/react-native.svg"/> <a href="https://docs.nhost.io/reference/javascript"><img src="assets/react-native.svg"/></a>
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/svelte.svg"/></a> <a href="https://docs.nhost.io/reference/javascript"><img src="assets/svelte.svg"/></a>
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/vuejs.svg"/></a> <a href="https://docs.nhost.io/platform/quickstarts/vue"><img src="assets/vuejs.svg"/></a>
</div> </div>
# Resources # Resources
@@ -383,14 +383,21 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Hoang Do</b></sub> <sub><b>Hoang Do</b></sub>
</a> </a>
</td> </td>
<td align="center">
<a href="https://github.com/eltociear">
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="100;" alt="eltociear"/>
<br />
<sub><b>Ikko Ashimine</b></sub>
</a>
</td></tr>
<tr>
<td align="center"> <td align="center">
<a href="https://github.com/jladuval"> <a href="https://github.com/jladuval">
<img src="https://avatars.githubusercontent.com/u/1935359?v=4" width="100;" alt="jladuval"/> <img src="https://avatars.githubusercontent.com/u/1935359?v=4" width="100;" alt="jladuval"/>
<br /> <br />
<sub><b>Jacob Duval</b></sub> <sub><b>Jacob Duval</b></sub>
</a> </a>
</td></tr> </td>
<tr>
<td align="center"> <td align="center">
<a href="https://github.com/kylehayes"> <a href="https://github.com/kylehayes">
<img src="https://avatars.githubusercontent.com/u/509932?v=4" width="100;" alt="kylehayes"/> <img src="https://avatars.githubusercontent.com/u/509932?v=4" width="100;" alt="kylehayes"/>
@@ -425,15 +432,15 @@ Here are some ways of contributing to making Nhost better:
<br /> <br />
<sub><b>Nacho Aldama</b></sub> <sub><b>Nacho Aldama</b></sub>
</a> </a>
</td> </td></tr>
<tr>
<td align="center"> <td align="center">
<a href="https://github.com/ghoshnirmalya"> <a href="https://github.com/ghoshnirmalya">
<img src="https://avatars.githubusercontent.com/u/6391763?v=4" width="100;" alt="ghoshnirmalya"/> <img src="https://avatars.githubusercontent.com/u/6391763?v=4" width="100;" alt="ghoshnirmalya"/>
<br /> <br />
<sub><b>Nirmalya Ghosh</b></sub> <sub><b>Nirmalya Ghosh</b></sub>
</a> </a>
</td></tr> </td>
<tr>
<td align="center"> <td align="center">
<a href="https://github.com/quentin-decre"> <a href="https://github.com/quentin-decre">
<img src="https://avatars.githubusercontent.com/u/1137511?v=4" width="100;" alt="quentin-decre"/> <img src="https://avatars.githubusercontent.com/u/1137511?v=4" width="100;" alt="quentin-decre"/>

View File

@@ -1,5 +1,11 @@
# @nhost/docs # @nhost/docs
## 0.0.3
### Patch Changes
- eb46f7d8: Use port 1337 if no port is specified when using "localhost" as `subdomain`.
## 0.0.2 ## 0.0.2
### Patch Changes ### Patch Changes

View File

@@ -39,7 +39,7 @@ query {
Users should be created using the sign-up or sign-in flows as described under [sign-in methods](/platform/authentication/sign-in-methods). Users should be created using the sign-up or sign-in flows as described under [sign-in methods](/platform/authentication/sign-in-methods).
- **Never** create users directly via GraphQL or database. - **Never** create users directly via GraphQL or database, unless you [import users](#import-users) from an external system.
- **Never** modify the `auth.users` table. - **Never** modify the `auth.users` table.
- **Never** modify the GraphQL root queries or fields for any of the tables in the `auth` schema. - **Never** modify the GraphQL root queries or fields for any of the tables in the `auth` schema.
@@ -136,3 +136,31 @@ await nhost.auth.signUp({
} }
}) })
``` ```
## Import Users
If you have users in a different system, you can import them into Nhost. When importing users you should insert the users directly into the database instead of using the authentication endpoints (`/signup/email-password`).
It's possible to insert users via GraphQL or SQL.
### GraphQL
Make a GraphQL request to insert a user like this:
```graphql
mutation insertUser($user: users_insert_input!) {
insertUser(object: $user) {
id
}
}
```
### SQL
Connect directly to the database and insert a user like this:
```sql
INSERT INTO auth.users (id, email, display_name, password_hash, ..) VALUES ('<user-id>', '<email>', '<display-name>', '<password-hash>', ..);
```
User passwords are hashed using [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) in Nhost.

View File

@@ -79,17 +79,17 @@ Then start the Nhost project locally:
nhost up nhost up
``` ```
Hasura Console starts automatically and your Nhost project is running locally with the backend URL: `http://localhost:1337`. Hasura Console starts automatically and your Nhost project is running locally.
## Subdomain and Region ## Subdomain and Region
Use `localhost:1337` as the `subdomain`, and skip `region` when using the CLI and the [JavaScript SDK](/reference/javascript): Use `localhost` as the `subdomain`, and skip `region` when using the CLI and the [JavaScript SDK](/reference/javascript):
``` ```
import { NhostClient } from '@nhost/nhost-js' import { NhostClient } from '@nhost/nhost-js'
const nhost = new NhostClient({ const nhost = new NhostClient({
subdomain: 'localhost:1337', subdomain: 'localhost',
}) })
``` ```
@@ -97,12 +97,22 @@ const nhost = new NhostClient({
During local development with the CLI, all transactional emails from Authentication are sent to a local Mailhog instance, instead of to the recipient's email address. You'll see an address where after starting [`nhost up`](/reference/cli/up) where all emails are sent to. During local development with the CLI, all transactional emails from Authentication are sent to a local Mailhog instance, instead of to the recipient's email address. You'll see an address where after starting [`nhost up`](/reference/cli/up) where all emails are sent to.
For the example below, all emails are accessable at `http://localhost:8839`. For the example below, all emails are accessible at `http://localhost:8025`.
```bash ```bash
$ nhost up $ nhost up
✔ Your app is running at http://localhost:1337 (Ctrl+C to stop) URLs:
Emails will be sent to http://localhost:8839 - Postgres: postgres://postgres:postgres@localhost:5432/postgres
- GraphQL: http://localhost:1337/v1/graphql
- Auth: http://localhost:1337/v1/auth
- Storage: http://localhost:1337/v1/storage
- Functions: http://localhost:1337/v1/functions
- Hasura console: http://localhost:9695
- Mailhog: http://localhost:8025
- subdomain: localhost
- region: (empty)
``` ```
## What's next? ## What's next?

View File

@@ -198,7 +198,7 @@ Running this command will start up all the backend services provided by Nhost.
It also runs a webserver to serve the Hasura Console for the GraphQL Engine so It also runs a webserver to serve the Hasura Console for the GraphQL Engine so
you can manage the database and test the GraphQL API. you can manage the database and test the GraphQL API.
The Hasura Console opens automatically at [http://localhost:1337](http://localhost:1337/). The Hasura Console opens automatically at [http://localhost:9695](http://localhost:9695/).
![Hasura Console](/img/architecture/cli/hasura-console.png) ![Hasura Console](/img/architecture/cli/hasura-console.png)

View File

@@ -3,7 +3,7 @@ title: 'init'
sidebar_position: 1 sidebar_position: 1
--- ---
Intialize a local Nhost project in the current working directory. Initialize a local Nhost project in the current working directory.
``` ```
nhost init nhost init

View File

@@ -4,7 +4,7 @@ title: signUp()
sidebar_label: signUp() sidebar_label: signUp()
slug: /reference/javascript/auth/sign-up slug: /reference/javascript/auth/sign-up
description: Use `nhost.auth.signUp` to sign up a user using email and password. If you want to sign up a user using passwordless email (Magic Link), SMS, or an OAuth provider, use the `signIn` function instead. description: Use `nhost.auth.signUp` to sign up a user using email and password. If you want to sign up a user using passwordless email (Magic Link), SMS, or an OAuth provider, use the `signIn` function instead.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L103 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L107
--- ---
# `signUp()` # `signUp()`
@@ -22,12 +22,6 @@ nhost.auth.signUp({
--- ---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`SignUpEmailPasswordParams`](/reference/docgen/javascript/auth/types/sign-up-email-password-params) **<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignUpParams`](/reference/docgen/javascript/auth/types/sign-up-params)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------- | :-------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>password</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>email</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>options</span> | `SignUpOptions` | | |
--- ---

View File

@@ -4,7 +4,7 @@ title: signIn()
sidebar_label: signIn() sidebar_label: signIn()
slug: /reference/javascript/auth/sign-in slug: /reference/javascript/auth/sign-in
description: Use `nhost.auth.signIn` to sign in a user using email and password, passwordless (email or sms) or an external provider. `signIn` can be used to sign in a user in various ways depending on the parameters. description: Use `nhost.auth.signIn` to sign in a user using email and password, passwordless (email or sms) or an external provider. `signIn` can be used to sign in a user in various ways depending on the parameters.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L146 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L156
--- ---
# `signIn()` # `signIn()`

View File

@@ -4,7 +4,7 @@ title: signOut()
sidebar_label: signOut() sidebar_label: signOut()
slug: /reference/javascript/auth/sign-out slug: /reference/javascript/auth/sign-out
description: Use `nhost.auth.signOut` to sign out the user. description: Use `nhost.auth.signOut` to sign out the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L231 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L252
--- ---
# `signOut()` # `signOut()`

View File

@@ -4,7 +4,7 @@ title: resetPassword()
sidebar_label: resetPassword() sidebar_label: resetPassword()
slug: /reference/javascript/auth/reset-password slug: /reference/javascript/auth/reset-password
description: Use `nhost.auth.resetPassword` to reset the password for a user. This will send a reset-password link in an email to the user. When the user clicks the reset-password link the user is automatically signed-in. Once signed-in, the user can change their password using `nhost.auth.changePassword()`. description: Use `nhost.auth.resetPassword` to reset the password for a user. This will send a reset-password link in an email to the user. When the user clicks the reset-password link the user is automatically signed-in. Once signed-in, the user can change their password using `nhost.auth.changePassword()`.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L247 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L268
--- ---
# `resetPassword()` # `resetPassword()`

View File

@@ -4,7 +4,7 @@ title: changePassword()
sidebar_label: changePassword() sidebar_label: changePassword()
slug: /reference/javascript/auth/change-password slug: /reference/javascript/auth/change-password
description: Use `nhost.auth.changePassword` to change the password for the signed-in user. The old password is not needed. In case the user is not signed-in, a password reset ticket needs to be provided. description: Use `nhost.auth.changePassword` to change the password for the signed-in user. The old password is not needed. In case the user is not signed-in, a password reset ticket needs to be provided.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L263 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L284
--- ---
# `changePassword()` # `changePassword()`

View File

@@ -4,7 +4,7 @@ title: sendVerificationEmail()
sidebar_label: sendVerificationEmail() sidebar_label: sendVerificationEmail()
slug: /reference/javascript/auth/send-verification-email slug: /reference/javascript/auth/send-verification-email
description: Use `nhost.auth.sendVerificationEmail` to send a verification email to the specified email. The email contains a verification-email link. When the user clicks the verification-email link their email is verified. description: Use `nhost.auth.sendVerificationEmail` to send a verification email to the specified email. The email contains a verification-email link. When the user clicks the verification-email link their email is verified.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L279 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L303
--- ---
# `sendVerificationEmail()` # `sendVerificationEmail()`

View File

@@ -4,7 +4,7 @@ title: changeEmail()
sidebar_label: changeEmail() sidebar_label: changeEmail()
slug: /reference/javascript/auth/change-email slug: /reference/javascript/auth/change-email
description: Use `nhost.auth.changeEmail` to change a user's email. This will send a confirm-email-change link in an email to the new email. Once the user clicks on the confirm-email-change link the email will be change to the new email. description: Use `nhost.auth.changeEmail` to change a user's email. This will send a confirm-email-change link in an email to the new email. Once the user clicks on the confirm-email-change link the email will be change to the new email.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L298 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L322
--- ---
# `changeEmail()` # `changeEmail()`

View File

@@ -4,7 +4,7 @@ title: deanonymize()
sidebar_label: deanonymize() sidebar_label: deanonymize()
slug: /reference/javascript/auth/deanonymize slug: /reference/javascript/auth/deanonymize
description: Use `nhost.auth.deanonymize` to deanonymize a user. description: Use `nhost.auth.deanonymize` to deanonymize a user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L314 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L338
--- ---
# `deanonymize()` # `deanonymize()`

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: addSecurityKey()
sidebar_label: addSecurityKey()
slug: /reference/javascript/auth/add-security-key
description: Use `nhost.auth.addSecurityKey to add a security key to the user, using the WebAuthn API.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L376
---
# `addSecurityKey()`
Use `nhost.auth.addSecurityKey to add a security key to the user, using the WebAuthn API.
## Parameters
---
**<span className="parameter-name">nickname</span>** <span className="optional-status">optional</span> `string`
optional human-readable nickname for the security key
---

View File

@@ -4,7 +4,7 @@ title: onTokenChanged()
sidebar_label: onTokenChanged() sidebar_label: onTokenChanged()
slug: /reference/javascript/auth/on-token-changed slug: /reference/javascript/auth/on-token-changed
description: Use `nhost.auth.onTokenChanged` to add a custom function that runs every time the access or refresh token is changed. description: Use `nhost.auth.onTokenChanged` to add a custom function that runs every time the access or refresh token is changed.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L357 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L394
--- ---
# `onTokenChanged()` # `onTokenChanged()`

View File

@@ -4,7 +4,7 @@ title: onAuthStateChanged()
sidebar_label: onAuthStateChanged() sidebar_label: onAuthStateChanged()
slug: /reference/javascript/auth/on-auth-state-changed slug: /reference/javascript/auth/on-auth-state-changed
description: Use `nhost.auth.onAuthStateChanged` to add a custom function that runs every time the authentication status of the user changes. E.g. add a custom function that runs every time the authentication status changes from signed-in to signed-out. description: Use `nhost.auth.onAuthStateChanged` to add a custom function that runs every time the authentication status of the user changes. E.g. add a custom function that runs every time the authentication status changes from signed-in to signed-out.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L392 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L429
--- ---
# `onAuthStateChanged()` # `onAuthStateChanged()`

View File

@@ -4,7 +4,7 @@ title: isAuthenticated()
sidebar_label: isAuthenticated() sidebar_label: isAuthenticated()
slug: /reference/javascript/auth/is-authenticated slug: /reference/javascript/auth/is-authenticated
description: Use `nhost.auth.isAuthenticated` to check if the user is authenticated or not. description: Use `nhost.auth.isAuthenticated` to check if the user is authenticated or not.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L434 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L471
--- ---
# `isAuthenticated()` # `isAuthenticated()`

View File

@@ -4,7 +4,7 @@ title: isAuthenticatedAsync()
sidebar_label: isAuthenticatedAsync() sidebar_label: isAuthenticatedAsync()
slug: /reference/javascript/auth/is-authenticated-async slug: /reference/javascript/auth/is-authenticated-async
description: Use `nhost.auth.isAuthenticatedAsync` to wait (await) for any internal authentication network requests to finish and then return the authentication status. description: Use `nhost.auth.isAuthenticatedAsync` to wait (await) for any internal authentication network requests to finish and then return the authentication status.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L452 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L489
--- ---
# `isAuthenticatedAsync()` # `isAuthenticatedAsync()`

View File

@@ -4,7 +4,7 @@ title: getAuthenticationStatus()
sidebar_label: getAuthenticationStatus() sidebar_label: getAuthenticationStatus()
slug: /reference/javascript/auth/get-authentication-status slug: /reference/javascript/auth/get-authentication-status
description: Use `nhost.auth.getAuthenticationStatus` to get the authentication status of the user. description: Use `nhost.auth.getAuthenticationStatus` to get the authentication status of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L478 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L515
--- ---
# `getAuthenticationStatus()` # `getAuthenticationStatus()`

View File

@@ -4,7 +4,7 @@ title: getAccessToken()
sidebar_label: getAccessToken() sidebar_label: getAccessToken()
slug: /reference/javascript/auth/get-access-token slug: /reference/javascript/auth/get-access-token
description: Use `nhost.auth.getAccessToken` to get the access token of the user. description: Use `nhost.auth.getAccessToken` to get the access token of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L508 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L545
--- ---
# `getAccessToken()` # `getAccessToken()`

View File

@@ -4,7 +4,7 @@ title: getDecodedAccessToken()
sidebar_label: getDecodedAccessToken() sidebar_label: getDecodedAccessToken()
slug: /reference/javascript/auth/get-decoded-access-token slug: /reference/javascript/auth/get-decoded-access-token
description: Use `nhost.auth.getDecodedAccessToken` to get the decoded access token of the user. description: Use `nhost.auth.getDecodedAccessToken` to get the decoded access token of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L523 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L560
--- ---
# `getDecodedAccessToken()` # `getDecodedAccessToken()`

View File

@@ -4,7 +4,7 @@ title: getHasuraClaims()
sidebar_label: getHasuraClaims() sidebar_label: getHasuraClaims()
slug: /reference/javascript/auth/get-hasura-claims slug: /reference/javascript/auth/get-hasura-claims
description: Use `nhost.auth.getHasuraClaims` to get the Hasura claims of the user. description: Use `nhost.auth.getHasuraClaims` to get the Hasura claims of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L540 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L577
--- ---
# `getHasuraClaims()` # `getHasuraClaims()`

View File

@@ -4,7 +4,7 @@ title: getHasuraClaim()
sidebar_label: getHasuraClaim() sidebar_label: getHasuraClaim()
slug: /reference/javascript/auth/get-hasura-claim slug: /reference/javascript/auth/get-hasura-claim
description: Use `nhost.auth.getHasuraClaim` to get the value of a specific Hasura claim of the user. description: Use `nhost.auth.getHasuraClaim` to get the value of a specific Hasura claim of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L558 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L595
--- ---
# `getHasuraClaim()` # `getHasuraClaim()`

View File

@@ -4,7 +4,7 @@ title: refreshSession()
sidebar_label: refreshSession() sidebar_label: refreshSession()
slug: /reference/javascript/auth/refresh-session slug: /reference/javascript/auth/refresh-session
description: Use `nhost.auth.refreshSession` to refresh the session with either the current internal refresh token or an external refresh token. description: Use `nhost.auth.refreshSession` to refresh the session with either the current internal refresh token or an external refresh token.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L581 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L618
--- ---
# `refreshSession()` # `refreshSession()`

View File

@@ -4,7 +4,7 @@ title: getSession()
sidebar_label: getSession() sidebar_label: getSession()
slug: /reference/javascript/auth/get-session slug: /reference/javascript/auth/get-session
description: Use `nhost.auth.getSession()` to get the session of the user. description: Use `nhost.auth.getSession()` to get the session of the user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L625 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L659
--- ---
# `getSession()` # `getSession()`

View File

@@ -4,7 +4,7 @@ title: getUser()
sidebar_label: getUser() sidebar_label: getUser()
slug: /reference/javascript/auth/get-user slug: /reference/javascript/auth/get-user
description: Use `nhost.auth.getUser()` to get the signed-in user. description: Use `nhost.auth.getUser()` to get the signed-in user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L640 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L674
--- ---
# `getUser()` # `getUser()`

View File

@@ -4,7 +4,7 @@ title: HasuraAuthClient
sidebar_label: Auth sidebar_label: Auth
description: No description provided. description: No description provided.
slug: /reference/javascript/auth slug: /reference/javascript/auth
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L60 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L64
--- ---
# `HasuraAuthClient` # `HasuraAuthClient`

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiChangeEmailResponse
sidebar_label: ApiChangeEmailResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L182
---
# `ApiChangeEmailResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiChangePasswordResponse
sidebar_label: ApiChangePasswordResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L174
---
# `ApiChangePasswordResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiDeanonymizeResponse
sidebar_label: ApiDeanonymizeResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L186
---
# `ApiDeanonymizeResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,16 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiRefreshTokenResponse
sidebar_label: ApiRefreshTokenResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L162
---
# `ApiRefreshTokenResponse`
```ts
type ApiRefreshTokenResponse =
| { session: null; error: ErrorPayload }
| { session: Session; error: null }
```

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiResetPasswordResponse
sidebar_label: ApiResetPasswordResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L170
---
# `ApiResetPasswordResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiSendVerificationEmailResponse
sidebar_label: ApiSendVerificationEmailResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L178
---
# `ApiSendVerificationEmailResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,29 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiSignInData
sidebar_label: ApiSignInData
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L151
---
# `ApiSignInData`
## Parameters
---
**<span className="parameter-name">session</span>** <span className="optional-status">required</span> [`Session`](/reference/docgen/javascript/auth/types/session)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">session.</span>user</span> | `null` \| [`User`](/reference/docgen/javascript/auth/types/user) | ✔️ | |
| <span className="parameter-name"><span className="light-grey">session.</span>refreshToken</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">session.</span>accessTokenExpiresIn</span> | `number` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">session.</span>accessToken</span> | `string` | ✔️ | |
---
**<span className="parameter-name">mfa</span>** <span className="optional-status">required</span> `null` | [`Mfa`](/reference/docgen/javascript/auth/types/mfa)
---

View File

@@ -1,16 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiSignInResponse
sidebar_label: ApiSignInResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L155
---
# `ApiSignInResponse`
```ts
type ApiSignInResponse =
| { data: ApiSignInData; error: null }
| { data: null; error: ErrorPayload }
```

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiSignOutResponse
sidebar_label: ApiSignOutResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L166
---
# `ApiSignOutResponse`
## Parameters
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---

View File

@@ -1,16 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiSignUpEmailPasswordResponse
sidebar_label: ApiSignUpEmailPasswordResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L147
---
# `ApiSignUpEmailPasswordResponse`
```ts
type ApiSignUpEmailPasswordResponse =
| { session: null; error: ErrorPayload }
| { session: Session; error: null }
```

View File

@@ -4,7 +4,7 @@ title: AuthChangeEvent
sidebar_label: AuthChangeEvent sidebar_label: AuthChangeEvent
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L135 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L118
--- ---
# `AuthChangeEvent` # `AuthChangeEvent`

View File

@@ -4,7 +4,7 @@ title: AuthChangedFunction
sidebar_label: AuthChangedFunction sidebar_label: AuthChangedFunction
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L137 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L120
--- ---
# `AuthChangedFunction` # `AuthChangedFunction`
@@ -12,6 +12,6 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
```ts ```ts
type AuthChangedFunction = () => ( type AuthChangedFunction = () => (
event: AuthChangeEvent, event: AuthChangeEvent,
session: Session | null session: NhostSession | null
) => void ) => void
``` ```

View File

@@ -4,7 +4,7 @@ title: ChangeEmailParams
sidebar_label: ChangeEmailParams sidebar_label: ChangeEmailParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L106 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L99
--- ---
# `ChangeEmailParams` # `ChangeEmailParams`

View File

@@ -4,7 +4,7 @@ title: ChangePasswordParams
sidebar_label: ChangePasswordParams sidebar_label: ChangePasswordParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L96 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L89
--- ---
# `ChangePasswordParams` # `ChangePasswordParams`

View File

@@ -1,18 +1,18 @@
--- ---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️ # ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: Mfa title: CommonSignUpParams
sidebar_label: Mfa sidebar_label: CommonSignUpParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L143 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L25
--- ---
# `Mfa` # `CommonSignUpParams`
## Parameters ## Parameters
--- ---
**<span className="parameter-name">ticket</span>** <span className="optional-status">required</span> `string` **<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpOptions`
--- ---

View File

@@ -4,14 +4,14 @@ title: DeanonymizeParams
sidebar_label: DeanonymizeParams sidebar_label: DeanonymizeParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L111 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L104
--- ---
# `DeanonymizeParams` # `DeanonymizeParams`
```ts ```ts
type DeanonymizeParams = type DeanonymizeParams =
| ({ signInMethod: 'email-password' } & SignUpParams) | ({ signInMethod: 'email-password' } & SignUpEmailPasswordParams)
| ({ | ({
signInMethod: 'passwordless' signInMethod: 'passwordless'
connection: 'email' connection: 'email'

View File

@@ -1,18 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: Headers
sidebar_label: Headers
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L140
---
# `Headers`
## Parameters
---
**<span className="parameter-name">Authorization</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -4,7 +4,7 @@ title: NhostAuthConstructorParams
sidebar_label: NhostAuthConstructorParams sidebar_label: NhostAuthConstructorParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L15 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L17
--- ---
# `NhostAuthConstructorParams` # `NhostAuthConstructorParams`

View File

@@ -4,11 +4,11 @@ title: OnTokenChangedFunction
sidebar_label: OnTokenChangedFunction sidebar_label: OnTokenChangedFunction
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L139 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L122
--- ---
# `OnTokenChangedFunction` # `OnTokenChangedFunction`
```ts ```ts
type OnTokenChangedFunction = () => (session: Session | null) => void type OnTokenChangedFunction = () => (session: NhostSession | null) => void
``` ```

View File

@@ -4,7 +4,7 @@ title: Provider
sidebar_label: Provider sidebar_label: Provider
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L140 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L153
--- ---
# `Provider` # `Provider`
@@ -24,4 +24,5 @@ type Provider =
| 'bitbucket' | 'bitbucket'
| 'discord' | 'discord'
| 'twitch' | 'twitch'
| 'workos'
``` ```

View File

@@ -4,7 +4,7 @@ title: ResetPasswordParams
sidebar_label: ResetPasswordParams sidebar_label: ResetPasswordParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L91 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L84
--- ---
# `ResetPasswordParams` # `ResetPasswordParams`

View File

@@ -4,7 +4,7 @@ title: SendVerificationEmailParams
sidebar_label: SendVerificationEmailParams sidebar_label: SendVerificationEmailParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L101 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L94
--- ---
# `SendVerificationEmailParams` # `SendVerificationEmailParams`

View File

@@ -1,30 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: Session
sidebar_label: Session
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L23
---
# `Session`
## Parameters
---
**<span className="parameter-name">accessToken</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">accessTokenExpiresIn</span>** <span className="optional-status">required</span> `number`
---
**<span className="parameter-name">refreshToken</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">user</span>** <span className="optional-status">required</span> `null` | [`User`](/reference/docgen/javascript/auth/types/user)
---

View File

@@ -4,7 +4,7 @@ title: SignInEmailPasswordOtpParams
sidebar_label: SignInEmailPasswordOtpParams sidebar_label: SignInEmailPasswordOtpParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L59 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L46
--- ---
# `SignInEmailPasswordOtpParams` # `SignInEmailPasswordOtpParams`

View File

@@ -4,7 +4,7 @@ title: SignInEmailPasswordParams
sidebar_label: SignInEmailPasswordParams sidebar_label: SignInEmailPasswordParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L54 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L41
--- ---
# `SignInEmailPasswordParams` # `SignInEmailPasswordParams`

View File

@@ -4,7 +4,7 @@ title: SignInParams
sidebar_label: SignInParams sidebar_label: SignInParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L83 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L75
--- ---
# `SignInParams` # `SignInParams`
@@ -14,6 +14,7 @@ type SignInParams =
| SignInEmailPasswordParams | SignInEmailPasswordParams
| SignInEmailPasswordOtpParams | SignInEmailPasswordOtpParams
| SignInPasswordlessEmailParams | SignInPasswordlessEmailParams
| SignInPasswordlessSecurityKeyParams
| SignInPasswordlessSmsOtpParams | SignInPasswordlessSmsOtpParams
| SignInPasswordlessSmsParams | SignInPasswordlessSmsParams
| SignInWithProviderOptions | SignInWithProviderOptions

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessEmailParams
sidebar_label: SignInPasswordlessEmailParams sidebar_label: SignInPasswordlessEmailParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L64 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L51
--- ---
# `SignInPasswordlessEmailParams` # `SignInPasswordlessEmailParams`

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignInPasswordlessSecurityKeyParams
sidebar_label: SignInPasswordlessSecurityKeyParams
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L56
---
# `SignInPasswordlessSecurityKeyParams`
## Parameters
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">securityKey</span>** <span className="optional-status">required</span> `"true"`
---

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsOtpParams
sidebar_label: SignInPasswordlessSmsOtpParams sidebar_label: SignInPasswordlessSmsOtpParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L74 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L66
--- ---
# `SignInPasswordlessSmsOtpParams` # `SignInPasswordlessSmsOtpParams`

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsParams
sidebar_label: SignInPasswordlessSmsParams sidebar_label: SignInPasswordlessSmsParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L69 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L61
--- ---
# `SignInPasswordlessSmsParams` # `SignInPasswordlessSmsParams`

View File

@@ -1,34 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignInReponse
sidebar_label: SignInReponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L124
---
# `SignInReponse`
## Parameters
---
**<span className="parameter-name">session</span>** <span className="optional-status">required</span> `null` | [`Session`](/reference/docgen/javascript/auth/types/session)
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---
**<span className="parameter-name">mfa</span>** <span className="optional-status">optional</span> `{ enabled: boolean, ticket: string }`
---
**<span className="parameter-name">providerUrl</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">provider</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -1,34 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignInResponse
sidebar_label: SignInResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L45
---
# `SignInResponse`
## Parameters
---
**<span className="parameter-name">session</span>** <span className="optional-status">required</span> `null` | [`Session`](/reference/docgen/javascript/auth/types/session)
---
**<span className="parameter-name">mfa</span>** <span className="optional-status">required</span> `null` | `{ ticket: string }`
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
---
**<span className="parameter-name">providerUrl</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">provider</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -4,19 +4,13 @@ title: SignInWithProviderOptions
sidebar_label: SignInWithProviderOptions sidebar_label: SignInWithProviderOptions
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L78 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L71
--- ---
# `SignInWithProviderOptions` # `SignInWithProviderOptions`
## Parameters ```ts
type SignInWithProviderOptions =
--- | { provider: Exclude<Provider, 'workos'>; options: CommonProviderOptions }
| { provider: 'workos'; options: WorkOsOptions }
**<span className="parameter-name">provider</span>** <span className="optional-status">required</span> [`Provider`](/reference/docgen/javascript/auth/types/provider) ```
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `ProviderOptions`
---

View File

@@ -4,7 +4,7 @@ title: SignUpEmailPasswordParams
sidebar_label: SignUpEmailPasswordParams sidebar_label: SignUpEmailPasswordParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L31 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L29
--- ---
# `SignUpEmailPasswordParams` # `SignUpEmailPasswordParams`
@@ -13,7 +13,7 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
--- ---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> `string` **<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpOptions`
--- ---
@@ -21,6 +21,6 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
--- ---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpOptions` **<span className="parameter-name">password</span>** <span className="optional-status">required</span> `string`
--- ---

View File

@@ -4,7 +4,11 @@ title: SignUpParams
sidebar_label: SignUpParams sidebar_label: SignUpParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L37 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L40
--- ---
# `SignUpParams` # `SignUpParams`
```ts
type SignUpParams = SignUpEmailPasswordParams | SignUpSecurityKeyParams
```

View File

@@ -1,16 +0,0 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignUpResponse
sidebar_label: SignUpResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L39
---
# `SignUpResponse`
```ts
type SignUpResponse =
| { session: null; error: ErrorPayload }
| { session: Session | null; error: null }
```

View File

@@ -0,0 +1,26 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignUpSecurityKeyParams
sidebar_label: SignUpSecurityKeyParams
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L34
---
# `SignUpSecurityKeyParams`
## Parameters
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpSecurityKeyOptions`
---
**<span className="parameter-name">securityKey</span>** <span className="optional-status">required</span> `"true"`
---

View File

@@ -4,7 +4,7 @@ title: User
sidebar_label: User sidebar_label: User
description: User information description: User information
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L93 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L106
--- ---
# `User` # `User`

View File

@@ -4,7 +4,7 @@ title: NhostAuthConstructorParams
sidebar_label: NhostAuthConstructorParams sidebar_label: NhostAuthConstructorParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L15 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L17
--- ---
# `NhostAuthConstructorParams` # `NhostAuthConstructorParams`

View File

@@ -3,25 +3,25 @@
title: upload() title: upload()
sidebar_label: upload() sidebar_label: upload()
slug: /reference/javascript/storage/upload slug: /reference/javascript/storage/upload
description: Use `nhost.storage.upload` to upload a file. The `file` must be of type [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). description: Use `nhost.storage.upload` to upload a file.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L52 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L76
--- ---
# `upload()` # `upload()`
Use `nhost.storage.upload` to upload a file. The `file` must be of type [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). ## Overload 1 of 2
If no `bucket` is specified the `default` bucket will be used. Use `nhost.storage.upload` to upload a file.
```ts It's possible to use [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) or [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) to upload a file. The `File` instance is only available in the browser while `FormData` with [`form-data`](https://www.npmjs.com/package/form-data) works both in the browser and in NodeJS (server).
await nhost.storage.upload({ file })
```
## Parameters If no `bucketId` is specified the bucket `default` is used.
### Parameters
--- ---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadParams`](/reference/docgen/javascript/storage/types/storage-upload-params) **<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadFileParams`](/reference/docgen/javascript/storage/types/storage-upload-file-params)
| Property | Type | Required | Notes | | Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------ | :------- | :------: | :---- | | :------------------------------------------------------------------------------------------ | :------- | :------: | :---- |
@@ -32,12 +32,44 @@ await nhost.storage.upload({ file })
--- ---
## Examples ### Examples
Upload a file from a browser using `File`.
```ts ```ts
await nhost.storage.upload({ file }) await nhost.storage.upload({ file })
``` ```
Upload a file from a browser using `File` to a specific Bucket.
```ts ```ts
await nhost.storage.upload({ file, bucketId: '<Bucket-ID>' }) await nhost.storage.upload({ file, bucketId: '<Bucket-ID>' })
``` ```
Upload a file from a server using `FormData` with [`form-data`](https://www.npmjs.com/package/form-data).
```ts
const fd = new FormData()
fd.append('file', fs.createReadStream('./tests/assets/sample.pdf'))
await storage.upload({
formData: fd
})
```
## Overload 2 of 2
### Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`StorageUploadFormDataParams`](/reference/docgen/javascript/storage/types/storage-upload-form-data-params)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------ | :--------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">params.</span>formData</span> | `FormData` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>bucketId</span> | `string` | | |
| <span className="parameter-name"><span className="light-grey">params.</span>name</span> | `string` | | |
| <span className="parameter-name"><span className="light-grey">params.</span>id</span> | `string` | | |
---

View File

@@ -5,7 +5,7 @@ sidebar_label: getUrl()
slug: /reference/javascript/storage/get-url slug: /reference/javascript/storage/get-url
sidebar_class_name: deprecated sidebar_class_name: deprecated
description: No description provided. description: No description provided.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L74 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L106
--- ---
# `getUrl()` # `getUrl()`

View File

@@ -4,7 +4,7 @@ title: getPublicUrl()
sidebar_label: getPublicUrl() sidebar_label: getPublicUrl()
slug: /reference/javascript/storage/get-public-url slug: /reference/javascript/storage/get-public-url
description: Use `nhost.storage.getPublicUrl` to get the public URL of a file. The public URL can be used for un-authenticated users to access files. To access public files the `public` role must have permissions to select the file in the `storage.files` table. description: Use `nhost.storage.getPublicUrl` to get the public URL of a file. The public URL can be used for un-authenticated users to access files. To access public files the `public` role must have permissions to select the file in the `storage.files` table.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L88 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L120
--- ---
# `getPublicUrl()` # `getPublicUrl()`

View File

@@ -4,7 +4,7 @@ title: getPresignedUrl()
sidebar_label: getPresignedUrl() sidebar_label: getPresignedUrl()
slug: /reference/javascript/storage/get-presigned-url slug: /reference/javascript/storage/get-presigned-url
description: Use `nhost.storage.getPresignedUrl` to get a presigned URL of a file. To get a presigned URL the user must have permission to select the file in the `storage.files` table. description: Use `nhost.storage.getPresignedUrl` to get a presigned URL of a file. To get a presigned URL the user must have permission to select the file in the `storage.files` table.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L110 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L142
--- ---
# `getPresignedUrl()` # `getPresignedUrl()`

View File

@@ -4,7 +4,7 @@ title: delete()
sidebar_label: delete() sidebar_label: delete()
slug: /reference/javascript/storage/delete slug: /reference/javascript/storage/delete
description: Use `nhost.storage.delete` to delete a file. To delete a file the user must have permissions to delete the file in the `storage.files` table. Deleting the file using `nhost.storage.delete()` will delete both the file and its metadata. description: Use `nhost.storage.delete` to delete a file. To delete a file the user must have permissions to delete the file in the `storage.files` table. Deleting the file using `nhost.storage.delete()` will delete both the file and its metadata.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L135 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L167
--- ---
# `delete()` # `delete()`

View File

@@ -4,7 +4,7 @@ title: setAccessToken()
sidebar_label: setAccessToken() sidebar_label: setAccessToken()
slug: /reference/javascript/storage/set-access-token slug: /reference/javascript/storage/set-access-token
description: Use `nhost.storage.setAccessToken` to a set an access token to be used in subsequent storage requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically. description: Use `nhost.storage.setAccessToken` to a set an access token to be used in subsequent storage requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L156 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L188
--- ---
# `setAccessToken()` # `setAccessToken()`

View File

@@ -4,7 +4,7 @@ title: setAdminSecret()
sidebar_label: setAdminSecret() sidebar_label: setAdminSecret()
slug: /reference/javascript/storage/set-admin-secret slug: /reference/javascript/storage/set-admin-secret
description: Use `nhost.storage.adminSecret` to set the admin secret to be used for subsequent storage requests. This is useful if you want to run storage in "admin mode". description: Use `nhost.storage.adminSecret` to set the admin secret to be used for subsequent storage requests. This is useful if you want to run storage in "admin mode".
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L174 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L206
--- ---
# `setAdminSecret()` # `setAdminSecret()`

View File

@@ -4,7 +4,7 @@ title: HasuraStorageClient
sidebar_label: Storage sidebar_label: Storage
description: No description provided. description: No description provided.
slug: /reference/javascript/storage slug: /reference/javascript/storage
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L25 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/hasura-storage-client.ts#L29
--- ---
# `HasuraStorageClient` # `HasuraStorageClient`

View File

@@ -27,6 +27,6 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storag
--- ---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> `Partial<StorageUploadParams>` **<span className="parameter-name">params</span>** <span className="optional-status">required</span> `Partial<StorageUploadFileParams>`
--- ---

View File

@@ -4,7 +4,7 @@ title: ApiDeleteParams
sidebar_label: ApiDeleteParams sidebar_label: ApiDeleteParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L69 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L84
--- ---
# `ApiDeleteParams` # `ApiDeleteParams`

View File

@@ -4,7 +4,7 @@ title: ApiDeleteResponse
sidebar_label: ApiDeleteResponse sidebar_label: ApiDeleteResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L73 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L88
--- ---
# `ApiDeleteResponse` # `ApiDeleteResponse`

View File

@@ -4,7 +4,7 @@ title: ApiGetPresignedUrlParams
sidebar_label: ApiGetPresignedUrlParams sidebar_label: ApiGetPresignedUrlParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L61 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L76
--- ---
# `ApiGetPresignedUrlParams` # `ApiGetPresignedUrlParams`

View File

@@ -4,7 +4,7 @@ title: ApiGetPresignedUrlResponse
sidebar_label: ApiGetPresignedUrlResponse sidebar_label: ApiGetPresignedUrlResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L65 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L80
--- ---
# `ApiGetPresignedUrlResponse` # `ApiGetPresignedUrlResponse`

View File

@@ -4,7 +4,7 @@ title: ApiUploadParams
sidebar_label: ApiUploadParams sidebar_label: ApiUploadParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L50 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L65
--- ---
# `ApiUploadParams` # `ApiUploadParams`
@@ -13,7 +13,7 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storag
--- ---
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `FormData` **<span className="parameter-name">formData</span>** <span className="optional-status">required</span> `FormData`
--- ---

View File

@@ -4,7 +4,7 @@ title: ApiUploadResponse
sidebar_label: ApiUploadResponse sidebar_label: ApiUploadResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L57 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L72
--- ---
# `ApiUploadResponse` # `ApiUploadResponse`

View File

@@ -4,7 +4,7 @@ title: NhostClientReturnType
sidebar_label: NhostClientReturnType sidebar_label: NhostClientReturnType
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L4 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L6
--- ---
# `NhostClientReturnType` # `NhostClientReturnType`

View File

@@ -4,7 +4,7 @@ title: StorageDeleteParams
sidebar_label: StorageDeleteParams sidebar_label: StorageDeleteParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L32 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L47
--- ---
# `StorageDeleteParams` # `StorageDeleteParams`

View File

@@ -4,7 +4,7 @@ title: StorageDeleteResponse
sidebar_label: StorageDeleteResponse sidebar_label: StorageDeleteResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L36 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L51
--- ---
# `StorageDeleteResponse` # `StorageDeleteResponse`

View File

@@ -4,7 +4,7 @@ title: StorageGetPresignedUrlParams
sidebar_label: StorageGetPresignedUrlParams sidebar_label: StorageGetPresignedUrlParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L24 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L39
--- ---
# `StorageGetPresignedUrlParams` # `StorageGetPresignedUrlParams`

View File

@@ -4,7 +4,7 @@ title: StorageGetPresignedUrlResponse
sidebar_label: StorageGetPresignedUrlResponse sidebar_label: StorageGetPresignedUrlResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L28 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L43
--- ---
# `StorageGetPresignedUrlResponse` # `StorageGetPresignedUrlResponse`

View File

@@ -4,7 +4,7 @@ title: StorageGetUrlParams
sidebar_label: StorageGetUrlParams sidebar_label: StorageGetUrlParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L20 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L35
--- ---
# `StorageGetUrlParams` # `StorageGetUrlParams`

View File

@@ -0,0 +1,30 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: StorageUploadFileParams
sidebar_label: StorageUploadFileParams
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L13
---
# `StorageUploadFileParams`
## Parameters
---
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `File`
---
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -0,0 +1,30 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: StorageUploadFormDataParams
sidebar_label: StorageUploadFormDataParams
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L21
---
# `StorageUploadFormDataParams`
## Parameters
---
**<span className="parameter-name">formData</span>** <span className="optional-status">required</span> `FormData`
---
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -4,27 +4,11 @@ title: StorageUploadParams
sidebar_label: StorageUploadParams sidebar_label: StorageUploadParams
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L9 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L29
--- ---
# `StorageUploadParams` # `StorageUploadParams`
## Parameters ```ts
type StorageUploadParams = StorageUploadFileParams | StorageUploadFormDataParams
--- ```
**<span className="parameter-name">file</span>** <span className="optional-status">required</span> `File`
---
**<span className="parameter-name">bucketId</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">name</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">id</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -4,7 +4,7 @@ title: StorageUploadResponse
sidebar_label: StorageUploadResponse sidebar_label: StorageUploadResponse
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L16 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L31
--- ---
# `StorageUploadResponse` # `StorageUploadResponse`

View File

@@ -4,7 +4,7 @@ title: UploadHeaders
sidebar_label: UploadHeaders sidebar_label: UploadHeaders
description: No description provided. description: No description provided.
displayed_sidebar: referenceSidebar displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L77 custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-storage-js/src/packages/hasura-storage-js/src/utils/types.ts#L92
--- ---
# `UploadHeaders` # `UploadHeaders`

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: useAddSecurityKey()
sidebar_label: useAddSecurityKey()
slug: /reference/nextjs/use-add-security-key
description: Use the hook `useAddSecurityKey` to add a WebAuthn security key.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useAddSecurityKey.ts#L45
---
# `useAddSecurityKey()`
Use the hook `useAddSecurityKey` to add a WebAuthn security key.
```tsx
const { add, isLoading, isSuccess, isError, error } = useAddSecurityKey()
const handleFormSubmit = async (e) => {
e.preventDefault()
await add('key nickname')
}
```

View File

@@ -0,0 +1,31 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: useSignInEmailSecurityKey()
sidebar_label: useSignInEmailSecurityKey()
slug: /reference/nextjs/use-sign-in-email-security-key
description: Use the hook `useSignInEmailSecurityKey` to sign in a user using their email and a security key using the WebAuthn API.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignInEmailSecurityKey.ts#L41
---
# `useSignInEmailSecurityKey()`
Use the hook `useSignInEmailSecurityKey` to sign in a user using their email and a security key using the WebAuthn API.
```tsx
const {
signInEmailSecurityKey,
needsEmailVerification,
isLoading,
isSuccess,
isError,
error
} = useSignInEmailSecurityKey()
console.log({ needsEmailVerification, isLoading, isSuccess, isError, error })
const handleFormSubmit = async (e) => {
e.preventDefault()
await signInEmailSecurityKey('joe@example.com')
}
```

View File

@@ -0,0 +1,39 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: useSignUpEmailSecurityKeyEmail()
sidebar_label: useSignUpEmailSecurityKeyEmail()
slug: /reference/nextjs/use-sign-up-email-security-key-email
description: Use the hook `useSignUpEmailSecurityKey` to sign up a user with security key and an email using the WebAuthn API.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignUpEmailSecurityKey.ts#L43
---
# `useSignUpEmailSecurityKeyEmail()`
Use the hook `useSignUpEmailSecurityKey` to sign up a user with security key and an email using the WebAuthn API.
```tsx
const {
signUpEmailSecurityKey,
needsEmailVerification,
isLoading,
isSuccess,
isError,
error
} = useSignUpEmailSecurityKey()
console.log({ needsEmailVerification, isLoading, isSuccess, isError, error })
const handleFormSubmit = async (e) => {
e.preventDefault()
await signUpEmailSecurityKey('joe@example.com')
}
```
## Parameters
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpSecurityKeyOptions`
---

View File

@@ -0,0 +1,44 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: AddSecuritKeyHookResult
sidebar_label: AddSecuritKeyHookResult
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useAddSecurityKey.ts#L20
---
# `AddSecuritKeyHookResult`
## Parameters
---
**<span className="parameter-name">isError</span>** <span className="optional-status">required</span> `boolean`
**`@returns`**
`true` if an error occurred
**`@depreacted`**
use `!isSuccess` or `!!error` instead
---
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
Provides details about the error
---
**<span className="parameter-name">isSuccess</span>** <span className="optional-status">required</span> `boolean`
Returns `true` if the action is successful.
---
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `AddSecurityKeyHandler`
Add a security key to the current user with the WebAuthn API
---

View File

@@ -67,11 +67,11 @@ Returns the name of the file.
--- ---
**<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadParams) => void` **<span className="parameter-name">add</span>** <span className="optional-status">required</span> `(params: StorageUploadFileParams) => void`
--- ---
**<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadParams>) => Promise<UploadFileHandlerResult>` **<span className="parameter-name">upload</span>** <span className="optional-status">required</span> `(params: Partial<StorageUploadFileParams>) => Promise<UploadFileHandlerResult>`
--- ---

Some files were not shown because too many files have changed in this diff Show More