Compare commits

..

221 Commits

Author SHA1 Message Date
Pilou
61ee739f88 Merge pull request #1053 from nhost/changeset-release/main
chore: update versions
2022-10-19 22:08:50 +02:00
github-actions[bot]
65b7995dda chore: update versions 2022-10-19 20:01:09 +00:00
Pilou
30b23eb7a2 Merge pull request #1052 from nhost/fix/no-initial-auth-error
fix: 🐛 Do not create an authentication error when starting with no refresh token
2022-10-19 21:59:09 +02:00
Pierre-Louis Mercereau
4e083bcf25 refactor: don't use Promise.resolve 2022-10-19 21:44:13 +02:00
Pierre-Louis Mercereau
6b9d163e82 fix: 🐛 No authentication error on start with no token 2022-10-19 21:32:30 +02:00
Pilou
35a6dc6d89 Merge pull request #1046 from nhost/chore/bump-hasura-auth-0.15.0
chore: 🤖 bump auth to 0.15.0 and storage to 0.2.5
2022-10-18 15:04:59 +02:00
Pierre-Louis Mercereau
c80f4a28f8 chore: 🤖 bump auth to 0.15.0 and storage to 0.2.5 2022-10-18 14:06:21 +02:00
Pilou
c03f8d996a Merge pull request #1045 from nhost/docs/custom-claims-json-columns
docs: custom claims limitation on json columns
2022-10-18 13:30:10 +02:00
Pierre-Louis Mercereau
7f3472963f docs: custom claims limitation on json columns 2022-10-18 12:13:08 +02:00
Pilou
e283ed1884 Merge pull request #1044 from nhost/chore/remove-react-auth
chore: 🤖 remove @nhost/react-auth
2022-10-18 11:50:39 +02:00
Pierre-Louis Mercereau
93ad06fcc3 Merge branch 'main' into chore/remove-react-auth 2022-10-18 11:50:08 +02:00
Pilou
d6a229926b Merge pull request #1008 from nhost/changeset-release/main
chore: update versions
2022-10-18 09:50:51 +02:00
Pierre-Louis Mercereau
182d29bc2c chore: 🤖 remove @nhost/react-auth 2022-10-18 09:43:14 +02:00
Pierre-Louis Mercereau
becde75341 Merge branch 'main' into changeset-release/main 2022-10-18 09:35:00 +02:00
Pierre-Louis Mercereau
b01ba90243 chore: correct bumps and changelog 2022-10-18 09:30:18 +02:00
Johan Eliasson
1f47c0df4a Merge pull request #1038 from nhost/example/fix-apollo-crm
Fixing React Apollo CRM
2022-10-17 20:01:39 +02:00
github-actions[bot]
dfbdd340a7 chore: update versions 2022-10-17 17:51:05 +00:00
Pilou
3448edb178 Merge pull request #1037 from nhost/fix/offline-auto-signin
fix: refresh useAuthenticationStatus on conn attempt changes
2022-10-17 19:48:53 +02:00
Johan Eliasson
1c0b9c642a removing crm example 2022-10-17 19:37:49 +02:00
Johan Eliasson
62d2eb8c99 update 2022-10-15 21:09:49 +02:00
Johan Eliasson
dc6348df04 updates 2022-10-15 21:06:31 +02:00
Johan Eliasson
ac3bdb6ef1 fix 2022-10-15 20:49:09 +02:00
Pierre-Louis Mercereau
e8c095fedc fix: refresh useAuthenticationStatus on conn attempt changes 2022-10-14 22:52:55 +02:00
Johan Eliasson
d524597557 Merge pull request #1034 from nhost/elitan-patch-3
Update serverless-functions.mdx
2022-10-14 15:07:29 +02:00
Johan Eliasson
43fb4ada76 Merge pull request #1032 from nhost/contributors-readme-action-nKo-3hYuK0
contributors readme action update
2022-10-14 15:06:04 +02:00
Johan Eliasson
e44d6af56c Update serverless-functions.mdx 2022-10-14 15:05:16 +02:00
github-actions[bot]
3a937cae48 contrib-readme-action has updated readme 2022-10-14 13:03:31 +00:00
Johan Eliasson
a60ea128be Merge pull request #1031 from chrtze/patch-3
Update serverless-functions.mdx
2022-10-14 15:03:17 +02:00
Christopher Möller
76c9a124c8 Update docs/docs/platform/serverless-functions.mdx
Co-authored-by: Johan Eliasson <johan@eliasson.me>
2022-10-14 14:32:02 +02:00
Christopher Möller
de558a0150 Update serverless-functions.mdx
I needed to do some research to find out how to see the console.log from your functions in the terminal. Maybe it's helpful to add this to the docs. Not sure if there is a more elegant way though ;) I found the necessary command here: https://youtu.be/1V6KKbRaLhM?t=645
2022-10-13 15:48:22 +02:00
Pilou
0cacd9f3d2 Merge pull request #1022 from nhost/feat/offline-startup
feat: Retry the token import when starting offline
2022-10-13 12:37:38 +02:00
Pierre-Louis Mercereau
aa7338fcdf chore: return rejected promise 2022-10-13 12:37:09 +02:00
Pierre-Louis Mercereau
6da44bf801 feat: 🎸 add connectionAttempts 2022-10-13 11:55:31 +02:00
Pierre-Louis Mercereau
44cbdf9a68 chore: merge branch 'main' into feat/offline-startup 2022-10-13 11:35:24 +02:00
Pierre-Louis Mercereau
632c1da775 chore: merge branch 'main' into feat/offline-startup 2022-10-13 11:35:05 +02:00
Pilou
bd88ea0912 Merge pull request #1029 from nhost/fix/dependencies
fix: changeset gh action and dependencies
2022-10-13 11:30:54 +02:00
Pierre-Louis Mercereau
cf38b3d82b chore: add lockfile 2022-10-13 11:04:42 +02:00
Pierre-Louis Mercereau
945adb253d fix: changeset gh action and dependencies 2022-10-13 10:56:32 +02:00
Pierre-Louis Mercereau
afb8a199eb test: start offline 2022-10-13 10:11:29 +02:00
Johan Eliasson
6c32e3a3bc Merge pull request #1028 from nhost/add-plausible
Added Plausible
2022-10-13 09:49:03 +02:00
Pierre-Louis Mercereau
bd5a6608e9 chore: merge branch 'main' into feat/offline-startup 2022-10-13 09:33:36 +02:00
Pierre-Louis Mercereau
f4eee4b885 chore: don't implement loading token attempts 2022-10-13 09:31:23 +02:00
Pilou
11a5d1ce71 Merge pull request #908 from nhost/upgrade-pnpm
Upgrade tooling and dependencies e.g. pnpm, vitest, xstate
2022-10-13 09:29:35 +02:00
Johan Eliasson
4d8055a4e7 added plausible 2022-10-13 08:52:03 +02:00
Pierre-Louis Mercereau
be10b474da chore: merge branch 'main' into feat/offline-startup 2022-10-12 18:59:36 +02:00
Pierre-Louis Mercereau
a2d77dad08 chore: 🤖 include .vscode 2022-10-12 18:52:27 +02:00
Pilou
b4acc44df6 Merge pull request #1023 from nhost/contributors-readme-action-aAAwVHnScK
contributors readme action update
2022-10-12 18:45:29 +02:00
github-actions[bot]
19f5ffc5b8 contrib-readme-action has updated readme 2022-10-12 16:32:57 +00:00
Pilou
42dde0b573 Merge pull request #1003 from nhost/fix-anonymous-sign-in
fix: 🐛 `nhost.auth.signIn()` to sign in anonymously
2022-10-12 18:32:42 +02:00
Pilou
4ecd311578 Update packages/hasura-auth-js/src/hasura-auth-client.ts
Co-authored-by: Szilárd Dóró <doroszilard@icloud.com>
2022-10-12 18:32:14 +02:00
Pierre-Louis Mercereau
1fa1f8080c ci: 🎡 fix gh actioni 2022-10-12 17:03:57 +02:00
Pierre-Louis Mercereau
d6be615fc5 chore: 🤖 keep the same node/pnpm/cache GH action order 2022-10-12 17:02:31 +02:00
Pierre-Louis Mercereau
25f0cb7144 chore: 🤖 adjust gh action 2022-10-12 16:58:50 +02:00
Pierre-Louis Mercereau
ba785da116 chore: 🤖 fix lint 2022-10-12 16:53:39 +02:00
Pierre-Louis Mercereau
4402844543 chore: adjust gh action and reactivate test 2022-10-12 16:42:36 +02:00
Pierre-Louis Mercereau
f03c458a05 chore: 🤖 add @vitest/coverage-c8 2022-10-12 16:32:31 +02:00
Pierre-Louis Mercereau
2c28cd33be chore: merge branch 'main' into upgrade-pnpm 2022-10-12 16:22:36 +02:00
Pierre-Louis Mercereau
ac65fb9dd4 chore: merge branch 'main' into upgrade-pnpm 2022-10-12 08:40:07 +02:00
Pierre-Louis Mercereau
3ced63abaa feat: Retry the token import when starting offline 2022-10-11 19:35:11 +02:00
Pilou
12fb5847fb Merge pull request #1012 from d4g0/patch-1
Recover documentation consistency
2022-10-08 20:15:31 +02:00
Pilou
ee9ab3f1ef Merge pull request #1011 from piromsurang/main
Add description for all Stripe GraphQL Fields
2022-10-08 20:14:26 +02:00
Dago
d4c2b9870c Recover documentation consistency
This file has diverged from the respective doc [page](https://docs.nhost.io/platform/quickstarts/vue#configure-nhost-with-vue)
Maybe the docs should be updated instead to match the current file, in any case, i think will be nice to fix this and avoid confusion & friction to new comers trying the vue integration out.
2022-10-08 12:05:00 -04:00
Piromsurang Rungserichai
389319582f add description to all schemas 2022-10-08 17:12:04 +07:00
Pilou
c2f9dcbbbd Merge pull request #1007 from nhost/contributors-readme-action-8LZe-sy27n
contributors readme action update
2022-10-07 20:55:32 +02:00
github-actions[bot]
69e701a742 contrib-readme-action has updated readme 2022-10-07 18:54:50 +00:00
Pilou
25db4fa5dc Merge pull request #1006 from piromsurang/main
Add description for all Stripe GraphQL Fields
2022-10-07 20:54:31 +02:00
Pilou
3c70860afa Create fuzzy-paws-raise.md 2022-10-07 19:55:43 +02:00
Piromsurang Rungserichai
0f43b942af add description on customer schema 2022-10-07 20:27:19 +07:00
Pierre-Louis Mercereau
0ea60a643f chore: 🤖 chore: don't check empty object 2022-10-07 10:43:46 +02:00
Pierre-Louis Mercereau
13c41fe667 fix: 🐛 nhost.auth.signIn() to sign in anonymously
 Closes: #1000
2022-10-07 10:41:31 +02:00
Pilou
7692abf98c Merge pull request #988 from nhost/changeset-release/main
chore: update versions
2022-10-05 16:31:01 +02:00
Pilou
4e0aafbf08 Merge pull request #994 from nhost/contributors-readme-action-Q45QQ-Yjc2
contributors readme action update
2022-10-05 16:30:10 +02:00
github-actions[bot]
5f18361d4a chore: update versions 2022-10-05 14:29:49 +00:00
github-actions[bot]
09fe573bff contrib-readme-action has updated readme 2022-10-05 14:28:51 +00:00
Pilou
b7396c3b02 Merge pull request #985 from ejkkan/feat/add-async-support-for-stripe-server-isAllowed-function
feat/added async support for isAllowed prop for createStripeGraphQLServer
2022-10-05 16:28:32 +02:00
Pilou
aa177677b5 Merge pull request #993 from nhost/update-code-owners
Update code owners
2022-10-05 12:06:38 +02:00
Pilou
c922de7b0c Create orange-geckos-pull.md 2022-10-05 10:19:51 +02:00
Pierre-Louis Mercereau
38526d7ef2 chore: update code owners 2022-10-05 10:17:32 +02:00
Erik Magnusson
057c8be55a Update packages/stripe-graphql-js/src/schema/stripe.ts
apply working async iteration of customer data

Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-10-05 10:06:07 +02:00
Pierre-Louis Mercereau
4783657986 chore: update code owners 2022-10-05 09:15:31 +02:00
Erik Magnusson
e3606c091f fix missig type update 2022-10-05 07:36:20 +02:00
Pilou
d5489b71ec Merge pull request #989 from nhost/chore/next-tsconfig-paths
chore: 🤖 remove empty paths in nextjs tsconfig
2022-10-03 17:01:53 +02:00
Pierre-Louis Mercereau
a6bc3091a2 chore: 🤖 remove empty paths in nextjs tsconfig 2022-10-03 16:09:33 +02:00
Pilou
01a086cd05 Merge pull request #987 from nhost/contributors-readme-action-YDPxAfJmCW
contributors readme action update
2022-10-03 13:37:35 +02:00
github-actions[bot]
a8cc2e0c9b contrib-readme-action has updated readme 2022-10-03 11:36:32 +00:00
Pilou
11f0a1493d Merge pull request #986 from altschuler/main
fix: read nextjs context cookie in clientStorage
2022-10-03 13:36:13 +02:00
Pilou
8eafa19810 Create unlucky-months-work.md 2022-10-03 13:35:07 +02:00
Simon Altschuler
1e31a9567d fix: read nextjs context cookie in clientStorage 2022-10-03 12:53:42 +02:00
Erik Magnusson
c6120bfca1 added async handling for isAllowed usages 2022-10-03 10:55:12 +02:00
Erik Magnusson
4c37cc5bc2 added async support for isAllowed prop for createStripeGraphQLServer 2022-10-03 08:47:17 +02:00
Johan Eliasson
66ef8f91a3 Merge pull request #972 from nhost/webauthn-documentation
Webauthn documentation
2022-09-29 17:43:13 +02:00
Pierre-Louis Mercereau
3f135abed9 Revert "fix: 🐛 Return a network error code"
This reverts commit 94d7703f9b.
2022-09-29 12:08:17 +02:00
Pierre-Louis Mercereau
9f127f3333 Merge branch 'webauthn-documentation' of https://github.com/nhost/nhost into webauthn-documentation 2022-09-29 12:07:11 +02:00
Pierre-Louis Mercereau
f9b164baa3 docs: ✏️ Security Keys 2022-09-29 12:07:00 +02:00
Pilou
73804c8450 Merge pull request #968 from nhost/react-apollo-example/other-sign-in-up-options
Improve navigation in the react-apollo example
2022-09-28 21:13:17 +02:00
Johan Eliasson
537259e00b Merge pull request #964 from nhost/fix-stripe-asd91h23
Stripe GraphQL API updates
2022-09-28 17:28:34 +02:00
Pierre-Louis Mercereau
94d7703f9b fix: 🐛 Return a network error code 2022-09-28 17:13:45 +02:00
Pierre-Louis Mercereau
c24207eeea feat: improve navigation 2022-09-28 17:06:13 +02:00
Johan Eliasson
54057ffe8a typo 2022-09-28 16:33:41 +02:00
Johan Eliasson
0e9052e810 added info about stripe secret key 2022-09-28 16:24:38 +02:00
Pilou
3a209a8ee3 Merge pull request #967 from nhost/bump-hasura-auth-0.13.2
chore: 🤖 bump hasura-auth version to 0.13.2
2022-09-28 15:44:25 +02:00
Pierre-Louis Mercereau
f26d38a0f1 chore: 🤖 bump hasura-auth version to 0.13.2 2022-09-28 15:08:38 +02:00
Johan Eliasson
0e06259e24 update 2022-09-27 15:10:30 +02:00
Johan Eliasson
ce7d81c6d3 correct package names 2022-09-27 15:02:44 +02:00
Johan Eliasson
3779772c99 Merge pull request #963 from nhost/docs-database
doc (database): UI updates and direct access
2022-09-27 15:01:28 +02:00
Johan Eliasson
c657cb85cf identity explination 2022-09-27 12:11:45 +02:00
Johan Eliasson
46dfa9634c wording 2022-09-27 12:07:47 +02:00
Johan Eliasson
13f5531b7e update 2022-09-27 12:03:53 +02:00
Johan Eliasson
0ecff620fb Update docs/docs/platform/database/index.mdx
Co-authored-by: Szilárd Dóró <doroszilard@icloud.com>
2022-09-27 11:56:23 +02:00
Johan Eliasson
0470e65a38 Update docs/docs/platform/database/index.mdx
Co-authored-by: Szilárd Dóró <doroszilard@icloud.com>
2022-09-27 11:56:01 +02:00
Johan Eliasson
f031cf9463 update 2022-09-27 10:39:01 +02:00
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
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
Johan Eliasson
5e5a9d6efa updates 2022-09-08 16:16:29 +02:00
Johan Eliasson
a365cadbd7 stripe internally + dotenv fix 2022-09-08 12:29:51 +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
Johan Eliasson
4e30b4ee21 allowed updated 2022-09-06 21:14:21 +02:00
Pierre-Louis Mercereau
99bbdc37f9 Merge branch 'main' into upgrade-pnpm 2022-09-06 11:26:32 +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
ac214019dc docs: move TODO into an issue 2022-09-05 16:52:22 +02:00
Johan Eliasson
2d6e95b8b5 cleanup 2022-09-05 10:25:34 +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
Johan Eliasson
8c12b4117b updates 2022-09-05 07:57:04 +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
06523f2619 ci: new pnpm filter 2022-09-02 17:17:59 +02:00
Pierre-Louis Mercereau
f9f05b4cd7 ci: reactivate e2e tests 2022-09-02 17:14:36 +02:00
Pierre-Louis Mercereau
242a2a97ef ci: install in workspace root 2022-09-02 17:10:52 +02:00
Pierre-Louis Mercereau
62a8a968ec ci: typo 2022-09-02 17:08:38 +02:00
Pierre-Louis Mercereau
8d3c83015c ci: install cypress 2022-09-02 17:05:44 +02:00
Pierre-Louis Mercereau
f783a2d956 ci: cache cypress 2022-09-02 17:04:27 +02:00
Pierre-Louis Mercereau
a8ea4e273e ci: add cypress container 2022-09-02 16:53:45 +02:00
Pierre-Louis Mercereau
4238a6985c ci: adapt cypress 2022-09-02 16:50:13 +02:00
Pierre-Louis Mercereau
494b230868 ci: use cypress gh action 2022-09-02 16:46:12 +02:00
Pierre-Louis Mercereau
7eb7a337ac ci: put the build step in the main install action 2022-09-02 16:36:55 +02:00
Pierre-Louis Mercereau
472dcf2b9c chore: add build step 2022-09-02 16:30:14 +02:00
Pierre-Louis Mercereau
ac02b38bed chore: bump pnpm gh action 2022-09-02 16:20:09 +02:00
Pierre-Louis Mercereau
37e06e1cf7 style: please eslint rules 2022-09-02 15:39:46 +02:00
Pierre-Louis Mercereau
bb2b1f5078 chore: fix dependencies 2022-09-02 15:26:55 +02:00
Pierre-Louis Mercereau
1205a89029 chore: lockfile 2022-09-02 15:21:45 +02:00
Pierre-Louis Mercereau
d498d5d029 chore: downgrade pnpm to please vercel 2022-09-02 15:19:32 +02:00
Pierre-Louis Mercereau
182dfb0b22 chore: bump dependencies 2022-09-02 14:51:00 +02:00
Pierre-Louis Mercereau
3fd9e4601d Merge branch 'main' into upgrade-pnpm 2022-08-30 11:10:12 +02:00
Pierre-Louis Mercereau
cd7d6ddf11 ci: correct pnpm command 2022-08-29 22:27:11 +02:00
Pierre-Louis Mercereau
301d9f1710 refactor: new pnpm 7 -- syntax 2022-08-29 22:18:25 +02:00
Pierre-Louis Mercereau
46d54b9f77 revert: go back to previous pnpm invokation 2022-08-29 22:13:01 +02:00
Pierre-Louis Mercereau
31671aa7b9 build: upgrade pnpm to v7.9.5 2022-08-29 21:55:18 +02:00
393 changed files with 14565 additions and 16302 deletions

13
.github/CODEOWNERS vendored
View File

@@ -1,8 +1,13 @@
# Documentation
# https://help.github.com/en/articles/about-code-owners
/packages @plmercereau
/packages @plmercereau @szilarddoro
/packages/docgen @szilarddoro
/.github/workflows @plmercereau
/docs/ @guicurcio
/examples/ @plmercereau @guicurcio @FuzzyReason
/packages/stripe-graphql-js @elitan
/.github @plmercereau
/docs/ @guicurcio @elitan
/config/ @plmercereau @szilarddoro
/examples/ @plmercereau
/examples/codegen-react-apollo @elitan @plmercereau
/examples/codegen-react-query @elitan @plmercereau
/examples/react-apollo-crm @elitan @plmercereau

View File

@@ -3,9 +3,10 @@ description: 'Install Node dependencies with pnpm'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v2.2.1
- uses: pnpm/action-setup@v2.2.3
with:
version: 6.32.14
version: 7.9.1
run_install: false
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
@@ -15,3 +16,8 @@ runs:
- shell: bash
name: Install packages
run: pnpm install --frozen-lockfile
# * Build all Nhost packages as they are all supposed to be tested.
# * They are reused through the Turborepo cache
- shell: bash
name: Build packages
run: pnpm build

View File

@@ -21,20 +21,9 @@ jobs:
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2.1.0
with:
version: 6.32.3
# run_install: true
- name: Use Node.js 17
uses: actions/setup-node@v2
with:
node-version: '17.8.0'
cache: 'pnpm'
- name: Pick the right npm version
# * See: https://github.com/pnpm/pnpm/issues/4348
run: npm install --global npm@8.4
- name: Install dependencies
run: pnpm install
# * Install Node and dependencies
- name: Install Node and dependencies
uses: ./.github/actions/install-dependencies
- name: Create PR or Publish release
id: changesets
uses: changesets/action@v1

View File

@@ -29,10 +29,6 @@ jobs:
# * Install Node and dependencies. Package downloads will be cached for the next jobs.
- name: Install Node and dependencies
uses: ./.github/actions/install-dependencies
# * Build all Nhost packages as they are all supposed to be tested.
# * They will be reused through the Turborepo cache
- name: Build packages
run: pnpm build
# * List packagesthat has an `e2e` script, except the root, and return an array of their name and path
- name: List examples with an e2e script
id: set-matrix
@@ -62,9 +58,12 @@ jobs:
# * Install Node and dependencies. Package dependencies won't be downloaded again as they have been cached by the `build` job.
- name: Install Node and dependencies
uses: ./.github/actions/install-dependencies
# TODO ugly - check CYPRESS_CACHE_FOLDER
- name: Install Cypress
run: pnpm install -w cypress
# * Run the `ci` script of the current package of the matrix. Dependencies build is cached by Turborepo
- name: Run e2e test
run: pnpm run e2e -- --filter="${{ matrix.package.name }}"
run: pnpm --filter="${{ matrix.package.name }}" run e2e
- id: file-name
if: ${{ failure() }}
name: Tranform package name into a valid file name

1
.gitignore vendored
View File

@@ -12,7 +12,6 @@ logs/
.idea/
.npm/
.vagrant/
/.vscode/
.eslintcache
.yarnclean

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}

View File

@@ -204,21 +204,35 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Pratim</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/chrtze">
<img src="https://avatars.githubusercontent.com/u/3797215?v=4" width="100;" alt="chrtze"/>
<br />
<sub><b>Christopher Möller</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/GavanWilhite">
<img src="https://avatars.githubusercontent.com/u/2085119?v=4" width="100;" alt="GavanWilhite"/>
<br />
<sub><b>Gavan Wilhite</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/FuzzyReason">
<img src="https://avatars.githubusercontent.com/u/62517920?v=4" width="100;" alt="FuzzyReason"/>
<br />
<sub><b>Vadim Smirnov</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/ejkkan">
<img src="https://avatars.githubusercontent.com/u/32518962?v=4" width="100;" alt="ejkkan"/>
<br />
<sub><b>Erik Magnusson</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/macmac49">
<img src="https://avatars.githubusercontent.com/u/831190?v=4" width="100;" alt="macmac49"/>
@@ -240,28 +254,21 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Christian Gambardella</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/chrtze">
<img src="https://avatars.githubusercontent.com/u/3797215?v=4" width="100;" alt="chrtze"/>
<br />
<sub><b>Christopher Möller</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/dbarrosop">
<img src="https://avatars.githubusercontent.com/u/6246622?v=4" width="100;" alt="dbarrosop"/>
<br />
<sub><b>David Barroso</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/hajek-raven">
<img src="https://avatars.githubusercontent.com/u/7288737?v=4" width="100;" alt="hajek-raven"/>
<br />
<sub><b>Filip Hájek</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/MelodicCrypter">
<img src="https://avatars.githubusercontent.com/u/18341500?v=4" width="100;" alt="MelodicCrypter"/>
@@ -296,6 +303,14 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Nicolas Bourdin</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/piromsurang">
<img src="https://avatars.githubusercontent.com/u/17776837?v=4" width="100;" alt="piromsurang"/>
<br />
<sub><b>Piromsurang Rungserichai</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Savinvadim1312">
@@ -303,8 +318,7 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Savin Vadim</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/Svarto">
<img src="https://avatars.githubusercontent.com/u/24279217?v=4" width="100;" alt="Svarto"/>
@@ -332,7 +346,8 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Anders Kjær Damgaard</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/Sonichigo">
<img src="https://avatars.githubusercontent.com/u/53110238?v=4" width="100;" alt="Sonichigo"/>
@@ -346,8 +361,14 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Colin Broderick</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/d4g0">
<img src="https://avatars.githubusercontent.com/u/34744883?v=4" width="100;" alt="d4g0"/>
<br />
<sub><b>Dago</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/dminkovsky">
<img src="https://avatars.githubusercontent.com/u/218725?v=4" width="100;" alt="dminkovsky"/>
@@ -368,7 +389,8 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Gaurav Agrawal</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/alveshelio">
<img src="https://avatars.githubusercontent.com/u/8176422?v=4" width="100;" alt="alveshelio"/>
@@ -389,8 +411,7 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Ikko Ashimine</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/jladuval">
<img src="https://avatars.githubusercontent.com/u/1935359?v=4" width="100;" alt="jladuval"/>
@@ -398,13 +419,6 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Jacob Duval</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/kylehayes">
<img src="https://avatars.githubusercontent.com/u/509932?v=4" width="100;" alt="kylehayes"/>
<br />
<sub><b>Kyle Hayes</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/leothorp">
<img src="https://avatars.githubusercontent.com/u/12928449?v=4" width="100;" alt="leothorp"/>
@@ -418,7 +432,8 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Lucas Bois</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/MarcelloTheArcane">
<img src="https://avatars.githubusercontent.com/u/21159570?v=4" width="100;" alt="MarcelloTheArcane"/>
@@ -432,8 +447,7 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Nacho Aldama</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/ghoshnirmalya">
<img src="https://avatars.githubusercontent.com/u/6391763?v=4" width="100;" alt="ghoshnirmalya"/>
@@ -448,13 +462,21 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Quentin Decré</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/altschuler">
<img src="https://avatars.githubusercontent.com/u/956928?v=4" width="100;" alt="altschuler"/>
<br />
<sub><b>Simon Altschuler</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/atapas">
<img src="https://avatars.githubusercontent.com/u/3633137?v=4" width="100;" alt="atapas"/>
<br />
<sub><b>Tapas Adhikary</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/uulwake">
<img src="https://avatars.githubusercontent.com/u/22399181?v=4" width="100;" alt="uulwake"/>

View File

@@ -1,5 +1,11 @@
# @nhost/docs
## 0.0.4
### Patch Changes
- ba785da1: Bump dependencies versions
## 0.0.3
### Patch Changes

View File

@@ -12,11 +12,15 @@ Nhost Authentication lets you authenticate users using different sign-in methods
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
- [Google](/platform/authentication/sign-in-with-google)
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
- [Apple](/platform/authentication/sign-in-with-apple)
- [Discord](/platform/authentication/sign-in-with-discord)
- [Facebook](/platform/authentication/sign-in-with-facebook)
- [GitHub](/platform/authentication/sign-in-with-github)
- [Google](/platform/authentication/sign-in-with-google)
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
- [Spotify](/platform/authentication/sign-in-with-spotify)
- [Twitch](/platform/authentication/sign-in-with-twitch)
## How it works

View File

@@ -0,0 +1,107 @@
---
title: Sign In with Security Keys
sidebar_label: Security Keys
slug: /platform/authentication/sign-in-with-security-keys
---
Follow this guide to sign in users with security keys and the WebAuthn API.
Examples of security keys:
- [Windows Hello](https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0)
- [Apple Touch ID](https://support.apple.com/en-us/HT201371)
- [Apple Face ID](https://support.apple.com/en-us/HT208109)
- [Yubico security keys](https://www.yubico.com/)
- Android Fingerprint sensors
You can read more about this feature in our [blog post](https://nhost.io/blog/webauthn-sign-in-method)
## Setup
Enable the Security Key sign-in method in the Nhost dashboard under **Users** -> **Authentication Settings** -> **Security Keys**.
You need to make sure you also set a valid client URL under **Users** -> **Authentication Settings** -> **Client URL**.
<video width="99%" autoPlay muted loop controls="true" style={{ marginBottom: '15px' }}>
<source src="/videos/enable-security-keys-sign-in.mp4" type="video/mp4" />
</video>
## Sign Up
Signing up with a security key uses the same method as signing up with an email and a password. Instead of a `password` parameter, you need to set the `securityKey` parameter to `true`:
```tsx
const { error, session } = await nhost.auth.signUp({
email: 'joe@example.com',
securityKey: true
})
if (error) {
// Something unexpected happened, for instance, the user canceled their registration
console.log(error)
} else if (session) {
// Sign up is complete!
console.log(session.user)
} else {
console.log(
'You need to verify your email address by clicking the link in the email we sent you.'
)
}
```
## Sign In
Once a user added a security key, they can use it to sign in:
```tsx
const { error, session } = await nhost.auth.signIn({
email,
securityKey: true
})
if (session) {
// User is signed in
} else {
// Something unexpected happened
console.log(error)
}
```
## Add a Security Key
Any signed-in user with a valid email can add a security key when the feature is enabled. For instance, someone who signed up with an email and a password can add a security key and thus use it for their later sign-in!
Users can use multiple devices to sign in to their account. They can add as many security keys as they like.
```tsx
const { key, error } = await nhost.auth.addSecurityKey()
if (key) {
// Successfully added a new security key
console.log(key.id)
} else {
// Somethine unexpected happened
console.log(error)
}
```
A nickname can be added for each security key to make them easy to identify:
```tsx
await nhost.auth.addSecurityKey('my macbook')
```
## List or Remove Security Keys
To list and to remove security keys can be achieved over GraphQL after setting the correct Hasura permissions to the `auth.security_keys` table:
```graphql
query securityKeys($userId: uuid!) {
authUserSecurityKeys(where: { userId: { _eq: $userId } }) {
id
nickname
}
}
mutation removeSecurityKey($id: uuid!) {
deleteAuthUserSecurityKey(id: $id) {
id
}
}
```

View File

@@ -9,49 +9,12 @@ Nhost Authentication support the following sign-in methods:
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
- [Google](/platform/authentication/sign-in-with-google)
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
- [Apple](/platform/authentication/sign-in-with-apple)
- [Discord](/platform/authentication/sign-in-with-discord)
- [Facebook](/platform/authentication/sign-in-with-facebook)
- [GitHub](/platform/authentication/sign-in-with-github)
- [Google](/platform/authentication/sign-in-with-google)
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
- [Spotify](/platform/authentication/sign-in-with-spotify)
## Enabling Social Sign-In Provider
To start with social sign-in, select your project in Nhost Dashboard and go to **Users****Authentication Settings**.
You need to set the Client ID and Client Secret for each provider that you want to enable.
## Implementing sign-in experience
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in for your project.
Here's an example of how to implement sign-in with GitHub:
```js
nhost.auth.signIn({
provider: 'github'
})
```
Users are redirected to your Nhost project's **client URL** by default. By default, your Nhost project's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users****Authentication Settings****Client URL**.
Here is an example of how to redirect to another host or path:
```js
nhost.auth.signIn({
provider: '<provider>'
options: {
redirectTo: "<host>/<slug>" // Example: "https://example.com/dashboard"
},
})
```
## Provider OAuth scopes
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
By default, Nhost sets the scope to get the name, email, and avatar URL for each user. Editing scope is not currently supported.
## Provider OAuth Tokens
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.
- [Twitch](/platform/authentication/sign-in-with-twitch)

View File

@@ -0,0 +1,46 @@
---
title: Social Providers Configuration
sidebar_label: Social Providers Configuration
sidebar_position: 10
---
## Enabling Social Sign-In Provider
To start with social sign-in, select your project in Nhost Dashboard and go to **Users** → **Authentication Settings**.
You need to set the Client ID and Client Secret for each provider that you want to enable.
## Implementing sign-in experience
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in for your project.
Here's an example of how to implement sign-in with GitHub:
```js
nhost.auth.signIn({
provider: 'github'
})
```
Users are redirected to your Nhost project's **client URL** by default. By default, your Nhost project's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users** → **Authentication Settings** → **Client URL**.
Here is an example of how to redirect to another host or path:
```js
nhost.auth.signIn({
provider: '<provider>'
options: {
redirectTo: "<host>/<slug>" // Example: "https://example.com/dashboard"
},
})
```
## Provider OAuth scopes
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
By default, Nhost sets the scope to get the name, email, and avatar URL for each user. Editing scope is not currently supported.
## Provider OAuth Tokens
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.

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).
- **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 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

@@ -6,13 +6,17 @@ image: /img/og/platform/event-triggers.png
Event Triggers enable you to invoke webhooks when a database event happens. Event Triggers are typically used to do post-processing tasks, using custom backend code, based on database events.
Event Triggers are associated with a specific table in the database the following event types are available:
Event Triggers are associated with a specific table in the database and the following event types are available:
- **INSERT** - A row is inserted into a table
- **UPDATE** - A row is updated in a table
- **DELETE** - A row is deleted from a table
- **INSERT** - A row is inserted into a table.
- **UPDATE** - A row is updated in a table.
- **DELETE** - A row is deleted from a table.
Event Triggers can also be triggered manually in the Hasura Console.
:::info
It's currently only possible to create Event Triggers in the Hasura Console. We're working on adding support for creating Event Triggers in the Nhost Dashboard.
:::
### Example Use Case
@@ -30,7 +34,7 @@ Event Triggers are managed in the Hasura Console. Select **Events** in the main
## Event Triggers and Serverless Functions
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint that can be used as a webhook for your Event Triggers.
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint and can be used as a webhook for Event Triggers.
### Format
@@ -40,7 +44,7 @@ When using Serverless Functions as webhooks you should configure the webhook usi
{{NHOST_BACKEND_URL}}/v1/functions/orders-insert-send-email
```
![as](/img/database/event-triggers/webhook-url-format.png)
![Webhook URL Format](/img/database/event-triggers/webhook-url-format.png)
The `NHOST_BACKEND_URL` is a [system environment variable](/platform/environment-variables#system-environment-variables) and available in production and in development environments using the [CLI](/platform/cli).
@@ -54,7 +58,7 @@ To set this up is a two-step process:
- Step 1: Add the header `nhost-webhook-secret` with the value `NHOST_WEBHOOK_SECRET` (From env var) when creating the Event Trigger in the Hasura Console.
![as](/img/database/event-triggers/webhook-secret-header.png)
![Webhook Secret Header](/img/database/event-triggers/webhook-secret-header.png)
- Step 2: Check the header `nhost-webhook-secret` for incoming requests and make sure the header is the same as the environment variable `NHOST_WEBHOOK_SECRET`.

View File

@@ -9,52 +9,40 @@ import TabItem from '@theme/TabItem'
Every Nhost project comes with its own [Postgres database](https://postgres.org/). Postgres is the world's most advanced open-source relational database and it's the most [popular SQL database for developers](https://insights.stackoverflow.com/survey/2021#section-most-loved-dreaded-and-wanted-databases).
:::info
There are three ways of managing your database:
It's currently not possible to connect directly to the Postgres database via a connection string. We're working on making the database available soon. You can follow [this issue on GitHub](https://github.com/nhost/nhost/issues/113).
:::
The database is managed via the Hasura Console where you can manage the database via an intuitive UI. You can also use SQL to directly interact with the database via the Hasura Console.
## Hasura Console
Hasura Console is where you manage your database. This is where you create and manage tables, schemas, and data.
1. Open the Hasura Console by clicking on **GraphQL** in the top menu in the Nhost Dashboard.
2. Click **Open Hasura Console** at the top right of the page.
3. Copy the **admin secret**, and click **Open Hasura**.
4. Use the **admin secret** to sign in.
<video width="99%" autoPlay muted loop controls="true">
<source src="/videos/open-hasura-console.mp4" type="video/mp4" />
</video>
1. Nhost Database UI (recommended).
2. Hasura Console.
3. [Connect directly to the database.](#postgres-access)
## Schemas
The two schemas `auth` and `storage` are reserved for Nhost Auth and Nhost Storage to work. You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
Generally, you should use the `public` schema for your project. It's also ok to add custom schemas for more advanced usage.
Generally, you should use the `public` schema when creating and managing your tables for your project. It's also ok to add custom schemas for more advanced usage.
The two schemas `auth` and `storage` are reserved for [Nhost Auth](/platform/authentication) and [Nhost Storage](/platform/storage). You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
## Create Table
## Manage Tables
1. In Hasura Console, go to the **Data** tab, select the **public** schema in the left menu and click **Create Table**.
2. Enter a table name.
3. Add table columns.
4. Add a primary key (usually the ID column).
5. (Optional) Add foreign keys.
6. (Optional) Add unique keys.
7. Click **Add Table**.
### Create Table
When a table is created the table is instantly available through the [GraphQL API](/platform/graphql).
1. Go to **Database** in the left menu.
2. Click **New table**.
3. Enter a **name** for the table.
4. Add **columns**.
5. Select a **Primary Key** (usually the `id` column).
6. (Optional) Select an **Identity** column. Identity is for integer columns only and is usually selected for the `id` column so the `id` is automatically incremented (1,2,3...) on new rows.
7. (Optional) Add **Foreign Keys**.
8. Click **Create**.
When a table is created it is instantly available through the [GraphQL API](/platform/graphql).
Here's an example of how to create a `customers` table:
<Tabs groupId="hasura-console-vs-sql">
<TabItem value="hasura-cosnole" label="Hasura Console" default>
<Tabs groupId="nhost-vs-sql">
<TabItem value="nhost" label="Nhost" default>
<video width="99%" autoPlay muted loop controls="true">
<source src="/videos/hasura-create-table.mp4" type="video/mp4" />
<source src="/videos/nhost-table-create.mp4" type="video/mp4" />
</video>
</TabItem>
@@ -62,7 +50,7 @@ Here's an example of how to create a `customers` table:
```sql
CREATE TABLE "public"."customers" (
"id" serial NOT NULL PRIMARY KEY,
"id" bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
"name" text NOT NULL
);
```
@@ -70,19 +58,20 @@ CREATE TABLE "public"."customers" (
</TabItem>
</Tabs>
## Modify Table
### Edit Table
1. In Hasura Console, go to the **Data** tab and click on the table you want to edit in the left menu.
2. Click **Modify**.
3. Modify or add table columns.
1. Go to the **Database** in the left menu
2. Click on the **context menu** of the table you want to change and click **Edit table**.
3. **Edit** (add, change, delete) the table's columns.
4. Click **Save**.
Here's an example of how to modify a `customers` table by adding an `address` column:
Here's an example of how to edit a `customers` table by adding an `address` column:
<Tabs groupId="hasura-console-vs-sql">
<TabItem value="hasura-cosnole" label="Hasura Console" default>
<Tabs groupId="nhost-vs-sql">
<TabItem value="nhost" label="Nhost" default>
<video width="99%" autoPlay muted loop controls="true">
<source src="/videos/hasura-modify-table.mp4" type="video/mp4" />
<source src="/videos/nhost-table-edit.mp4" type="video/mp4" />
</video>
</TabItem>
@@ -95,20 +84,19 @@ ALTER TABLE "public"."customers" ADD COLUMN "address" text;
</TabItem>
</Tabs>
## Delete Table
### Delete Table
1. In Hasura Console, go to the **Data** tab and select the table you want to delete in the left menu.
2. Click **Modify**.
3. Scroll to the bottom of the page and click **Delete table** to open the confirmation dialog.
4. Type the **name of the table** and click OK.
1. Go to the **Database** in the left menu
2. Click on the **context menu** of the table you want to delete and click **Delete table**.
3. Click **Delete** to confirm deleting the table.
Here's an example of how to delete a `customers` table:
**Example:** Delete a `customers` table:
<Tabs groupId="hasura-console-vs-sql">
<TabItem value="hasura-cosnole" label="Hasura Console" default>
<Tabs groupId="nhost-vs-sql">
<TabItem value="nhost" label="Nhost" default>
<video width="99%" autoPlay muted loop controls="true">
<source src="/videos/hasura-delete-table.mp4" type="video/mp4" />
<source src="/videos/nhost-table-delete.mp4" type="video/mp4" />
</video>
</TabItem>
@@ -121,6 +109,34 @@ DROP TABLE "public"."customers";
</TabItem>
</Tabs>
## Postgres Access
It's possible to access your Postgres database directly with your favorite Postgres client.
:::info
For projects older than September 2022, it's not possible to connect directly to the database via a connection string. We're working on a one-click fix that can be expected to be available in October 2022.
:::
Go to **Settings** in the left menu and click on **Database**. You'll find the connection string and credentials to connect to your database.
![Database Connection Info](/img/database/connection-info.png)
### Reset Postgres Password
It's possible to reset the database password that was provided when the project was created.
1. Go to the **Overview** page of your project.
2. Click on **Project Settings**.
3. Click on **Reset Database Password**.
4. Either **copy** the newly automatically generated password, or **type** your own new database password.
5. Click **Reset Database Password**.
<video width="99%" autoPlay muted loop controls="true">
<source src="/videos/nhost-database-reset-password.mp4" type="video/mp4" />
</video>
## Migrations
To track database changes, use the [Nhost CLI](/platform/cli) to develop locally and use our [GitHub integration](/platform/github-integration) to automatically deploy database migrations live.
@@ -148,12 +164,14 @@ nhost/seeds/default/002-products.sql
## Backups
Databases on [Pro and Enterprise plans](https://nhost.io/pricing) are backed up automatically.
Databases on the [Pro and Enterprise plans](https://nhost.io/pricing) are automatically backed up daily.
## Best Practices
- Use lower-case names for tables. E.g. `customers` instead of `Customers`.
- Use plural names for tables. E.g. `customers` instead of `customer`.
- use underscore (`_`) instead of camelCase for table names. E.g. `customer_invoices` instead of `customerInvoices`.
- use underscore (`_`) instead of camelCase for column names. E.g. `first_name` instead of `firstName`.
## Next Steps

View File

@@ -66,6 +66,10 @@ auth:
Your custom claim will be automatically prefixed with `x-hasura-`, therefore, the example above results in a custom permission variable named `x-hasura-organisation-id`.
### Limitation on JSON/JSONB columns
JSON columns cannot be used in custom claims, with the exception of the `users.metadata` column.
## Roles
Every GraphQL request is resolved based on a **single role**. Roles are added in the Hasura Console when selecting a table and clicking **Permisisons**.

View File

@@ -95,12 +95,16 @@ Serverless functions are billed per GB-sec or GB-hour. 1 GB-hour is 3600 GB-seco
1 GB-sec is 1 function with 1 GB of RAM running for 1 second. If 1 function with 1 GB of RAM runs for 3600 seconds, that's the equivalent of 1 GB-hour.
All serverless functions in production are running with 128 MB of RAM.
All serverless functions in production are running with 1 GB of RAM.
## Node Version
All serverless functions in production are running Node.js version 14.x.
All serverless functions in production are running Node.js version 16.x.
## Regions
Serverless Functions are always deployed to the same region as your project.
## Local Debugging
To see the output of `console.log` in your terminal, you can use `nhost logs -f functions`.

View File

@@ -4,7 +4,7 @@ title: signUp()
sidebar_label: signUp()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L106
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L108
---
# `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)
| 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` | | |
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignUpParams`](/reference/docgen/javascript/auth/types/sign-up-params)
---

View File

@@ -4,7 +4,7 @@ title: signIn()
sidebar_label: signIn()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L149
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L170
---
# `signIn()`
@@ -22,7 +22,7 @@ nhost.auth.signIn({
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignInParams`](/reference/docgen/javascript/auth/types/sign-in-params)
**<span className="parameter-name">params</span>** <span className="optional-status">optional</span> [`SignInParams`](/reference/docgen/javascript/auth/types/sign-in-params)
---
@@ -58,3 +58,16 @@ nhost.auth.signIn({ phoneNumber: '+11233213123' })
// [step 2/2] Finish passwordless sign in using SMS (OTP)
nhost.auth.signIn({ phoneNumber: '+11233213123', otp: '123456' })
```
### Sign in anonymously
```ts
// Sign in anonymously
nhost.auth.signIn()
// Later in the application, the user can complete their registration
nhost.auth.signUp({
email: 'joe@example.com',
password: 'secret-password'
})
```

View File

@@ -4,7 +4,7 @@ title: signOut()
sidebar_label: signOut()
slug: /reference/javascript/auth/sign-out
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#L245
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L270
---
# `signOut()`

View File

@@ -4,7 +4,7 @@ title: resetPassword()
sidebar_label: resetPassword()
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()`.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L261
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L286
---
# `resetPassword()`

View File

@@ -4,7 +4,7 @@ title: changePassword()
sidebar_label: changePassword()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L277
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L302
---
# `changePassword()`

View File

@@ -4,7 +4,7 @@ title: sendVerificationEmail()
sidebar_label: sendVerificationEmail()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L296
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L321
---
# `sendVerificationEmail()`

View File

@@ -4,7 +4,7 @@ title: changeEmail()
sidebar_label: changeEmail()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L315
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L340
---
# `changeEmail()`

View File

@@ -4,7 +4,7 @@ title: deanonymize()
sidebar_label: deanonymize()
slug: /reference/javascript/auth/deanonymize
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#L331
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L356
---
# `deanonymize()`

View File

@@ -4,7 +4,7 @@ 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#L369
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L394
---
# `addSecurityKey()`

View File

@@ -4,7 +4,7 @@ title: onTokenChanged()
sidebar_label: onTokenChanged()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L387
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L412
---
# `onTokenChanged()`

View File

@@ -4,7 +4,7 @@ title: onAuthStateChanged()
sidebar_label: onAuthStateChanged()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L422
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L447
---
# `onAuthStateChanged()`

View File

@@ -4,7 +4,7 @@ title: isAuthenticated()
sidebar_label: isAuthenticated()
slug: /reference/javascript/auth/is-authenticated
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#L464
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L489
---
# `isAuthenticated()`

View File

@@ -4,13 +4,16 @@ title: isAuthenticatedAsync()
sidebar_label: isAuthenticatedAsync()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L482
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L510
---
# `isAuthenticatedAsync()`
Use `nhost.auth.isAuthenticatedAsync` to wait (await) for any internal authentication network requests to finish and then return the authentication status.
The promise won't resolve until the authentication status is known.
Attention: when using auto-signin and a refresh token is present in the client storage, the promise won't resolve if the server can't be reached (e.g. offline) or if it returns an internal error.
```ts
const isAuthenticated = await nhost.auth.isAuthenticatedAsync()

View File

@@ -4,7 +4,7 @@ title: getAuthenticationStatus()
sidebar_label: getAuthenticationStatus()
slug: /reference/javascript/auth/get-authentication-status
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#L508
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L538
---
# `getAuthenticationStatus()`
@@ -14,6 +14,8 @@ Use `nhost.auth.getAuthenticationStatus` to get the authentication status of the
If `isLoading` is `true`, the client doesn't know whether the user is authenticated yet or not
because some internal authentication network requests have not been resolved yet.
The `connectionAttempts` returns the number of times the client has tried to connect to the server with no success (offline, or the server retruned an internal error).
```ts
const { isAuthenticated, isLoading } = nhost.auth.getAuthenticationStatus()

View File

@@ -4,7 +4,7 @@ title: getAccessToken()
sidebar_label: getAccessToken()
slug: /reference/javascript/auth/get-access-token
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#L538
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L575
---
# `getAccessToken()`

View File

@@ -4,7 +4,7 @@ title: getDecodedAccessToken()
sidebar_label: getDecodedAccessToken()
slug: /reference/javascript/auth/get-decoded-access-token
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#L553
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L590
---
# `getDecodedAccessToken()`

View File

@@ -4,7 +4,7 @@ title: getHasuraClaims()
sidebar_label: getHasuraClaims()
slug: /reference/javascript/auth/get-hasura-claims
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#L570
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L607
---
# `getHasuraClaims()`

View File

@@ -4,7 +4,7 @@ title: getHasuraClaim()
sidebar_label: getHasuraClaim()
slug: /reference/javascript/auth/get-hasura-claim
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#L588
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L625
---
# `getHasuraClaim()`

View File

@@ -4,7 +4,7 @@ title: refreshSession()
sidebar_label: refreshSession()
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.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L611
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L648
---
# `refreshSession()`

View File

@@ -4,7 +4,7 @@ title: getSession()
sidebar_label: getSession()
slug: /reference/javascript/auth/get-session
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#L652
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L689
---
# `getSession()`

View File

@@ -4,7 +4,7 @@ title: getUser()
sidebar_label: getUser()
slug: /reference/javascript/auth/get-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#L667
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L704
---
# `getUser()`

View File

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

View File

@@ -4,7 +4,7 @@ title: AuthChangeEvent
sidebar_label: AuthChangeEvent
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#L107
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L118
---
# `AuthChangeEvent`

View File

@@ -4,7 +4,7 @@ title: AuthChangedFunction
sidebar_label: AuthChangedFunction
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#L109
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L120
---
# `AuthChangedFunction`

View File

@@ -4,7 +4,7 @@ title: ChangeEmailParams
sidebar_label: ChangeEmailParams
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#L89
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L99
---
# `ChangeEmailParams`

View File

@@ -4,7 +4,7 @@ title: ChangePasswordParams
sidebar_label: ChangePasswordParams
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#L79
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L89
---
# `ChangePasswordParams`

View File

@@ -0,0 +1,18 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: CommonSignUpParams
sidebar_label: CommonSignUpParams
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#L25
---
# `CommonSignUpParams`
## Parameters
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpOptions`
---

View File

@@ -4,14 +4,14 @@ title: DeanonymizeParams
sidebar_label: DeanonymizeParams
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#L94
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L104
---
# `DeanonymizeParams`
```ts
type DeanonymizeParams =
| ({ signInMethod: 'email-password' } & SignUpParams)
| ({ signInMethod: 'email-password' } & SignUpEmailPasswordParams)
| ({
signInMethod: 'passwordless'
connection: 'email'

View File

@@ -4,7 +4,7 @@ title: NhostAuthConstructorParams
sidebar_label: NhostAuthConstructorParams
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#L16
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L17
---
# `NhostAuthConstructorParams`

View File

@@ -4,7 +4,7 @@ title: OnTokenChangedFunction
sidebar_label: OnTokenChangedFunction
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#L111
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L122
---
# `OnTokenChangedFunction`

View File

@@ -4,7 +4,7 @@ title: Provider
sidebar_label: Provider
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L148
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L153
---
# `Provider`

View File

@@ -4,7 +4,7 @@ title: ResetPasswordParams
sidebar_label: ResetPasswordParams
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#L74
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L84
---
# `ResetPasswordParams`

View File

@@ -4,7 +4,7 @@ title: SendVerificationEmailParams
sidebar_label: SendVerificationEmailParams
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#L84
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L94
---
# `SendVerificationEmailParams`

View File

@@ -4,7 +4,7 @@ title: SignInEmailPasswordOtpParams
sidebar_label: SignInEmailPasswordOtpParams
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#L36
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L46
---
# `SignInEmailPasswordOtpParams`

View File

@@ -4,7 +4,7 @@ title: SignInEmailPasswordParams
sidebar_label: SignInEmailPasswordParams
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#L31
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L41
---
# `SignInEmailPasswordParams`

View File

@@ -4,7 +4,7 @@ title: SignInParams
sidebar_label: SignInParams
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#L65
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L75
---
# `SignInParams`

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessEmailParams
sidebar_label: SignInPasswordlessEmailParams
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#L41
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L51
---
# `SignInPasswordlessEmailParams`

View File

@@ -4,7 +4,7 @@ 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#L46
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L56
---
# `SignInPasswordlessSecurityKeyParams`

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsOtpParams
sidebar_label: SignInPasswordlessSmsOtpParams
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
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L66
---
# `SignInPasswordlessSmsOtpParams`

View File

@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsParams
sidebar_label: SignInPasswordlessSmsParams
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#L51
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L61
---
# `SignInPasswordlessSmsParams`

View File

@@ -4,7 +4,7 @@ title: SignInWithProviderOptions
sidebar_label: SignInWithProviderOptions
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#L61
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L71
---
# `SignInWithProviderOptions`

View File

@@ -4,7 +4,7 @@ title: SignUpEmailPasswordParams
sidebar_label: SignUpEmailPasswordParams
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#L24
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L29
---
# `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
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#L30
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L40
---
# `SignUpParams`
```ts
type SignUpParams = SignUpEmailPasswordParams | SignUpSecurityKeyParams
```

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
description: User information
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L101
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L106
---
# `User`

View File

@@ -4,7 +4,7 @@ title: NhostAuthConstructorParams
sidebar_label: NhostAuthConstructorParams
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#L16
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L17
---
# `NhostAuthConstructorParams`

View File

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

@@ -4,7 +4,7 @@ title: NhostSession
sidebar_label: NhostSession
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L136
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L141
---
# `NhostSession`

View File

@@ -4,7 +4,7 @@ title: SignInSecurityKeyPasswordlessHookResult
sidebar_label: SignInSecurityKeyPasswordlessHookResult
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignInSecurityKeyEmail.ts#L14
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignInEmailSecurityKey.ts#L14
---
# `SignInSecurityKeyPasswordlessHookResult`
@@ -65,6 +65,6 @@ Access token (JWT)
---
**<span className="parameter-name">signInSecurityKeyEmail</span>** <span className="optional-status">required</span> `SignInSecurityKeyPasswordlessHandler`
**<span className="parameter-name">signInEmailSecurityKey</span>** <span className="optional-status">required</span> `SignInSecurityKeyPasswordlessHandler`
---

View File

@@ -0,0 +1,72 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignUpSecurityKeyHookResult
sidebar_label: SignUpSecurityKeyHookResult
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignUpEmailSecurityKey.ts#L16
---
# `SignUpSecurityKeyHookResult`
## 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">isLoading</span>** <span className="optional-status">required</span> `boolean`
**`@returns`**
`true` when the action is executing, `false` when it finished its execution.
---
**<span className="parameter-name">isSuccess</span>** <span className="optional-status">required</span> `boolean`
Returns `true` if the action is successful.
---
**<span className="parameter-name">user</span>** <span className="optional-status">required</span> `null` | `User`
User information
---
**<span className="parameter-name">accessToken</span>** <span className="optional-status">required</span> `null` | `string`
Access token (JWT)
---
**<span className="parameter-name">needsEmailVerification</span>** <span className="optional-status">required</span> `boolean`
**`@returns`**
`true` if an email is required to complete the action, and that a verification email has been sent to complete the action.
---
**<span className="parameter-name">signUpEmailSecurityKey</span>** <span className="optional-status">required</span> `SignUpSecurityKeyHandler`
Used for a new user to sign up with a security key. Returns a promise with the current context
---

View File

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

@@ -4,7 +4,7 @@ title: SignInSecurityKeyPasswordlessHookResult
sidebar_label: SignInSecurityKeyPasswordlessHookResult
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignInSecurityKeyEmail.ts#L14
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignInEmailSecurityKey.ts#L14
---
# `SignInSecurityKeyPasswordlessHookResult`
@@ -65,6 +65,6 @@ Access token (JWT)
---
**<span className="parameter-name">signInSecurityKeyEmail</span>** <span className="optional-status">required</span> `SignInSecurityKeyPasswordlessHandler`
**<span className="parameter-name">signInEmailSecurityKey</span>** <span className="optional-status">required</span> `SignInSecurityKeyPasswordlessHandler`
---

View File

@@ -0,0 +1,72 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: SignUpSecurityKeyHookResult
sidebar_label: SignUpSecurityKeyHookResult
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/react/src/useSignUpEmailSecurityKey.ts#L16
---
# `SignUpSecurityKeyHookResult`
## 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">isLoading</span>** <span className="optional-status">required</span> `boolean`
**`@returns`**
`true` when the action is executing, `false` when it finished its execution.
---
**<span className="parameter-name">isSuccess</span>** <span className="optional-status">required</span> `boolean`
Returns `true` if the action is successful.
---
**<span className="parameter-name">user</span>** <span className="optional-status">required</span> `null` | `User`
User information
---
**<span className="parameter-name">accessToken</span>** <span className="optional-status">required</span> `null` | `string`
Access token (JWT)
---
**<span className="parameter-name">needsEmailVerification</span>** <span className="optional-status">required</span> `boolean`
**`@returns`**
`true` if an email is required to complete the action, and that a verification email has been sent to complete the action.
---
**<span className="parameter-name">signUpEmailSecurityKey</span>** <span className="optional-status">required</span> `SignUpSecurityKeyHandler`
Used for a new user to sign up with a security key. Returns a promise with the current context
---

View File

@@ -4,7 +4,7 @@ title: useSignUpEmailPassword()
sidebar_label: useSignUpEmailPassword()
slug: /reference/vue/use-sign-up-email-password
description: Use the composable `useSignUpEmailPassword` to sign up a user using email and password.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/vue/src/useSignUpEmailPassword.ts#L46
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/vue/src/useSignUpEmailPassword.ts#L45
---
# `useSignUpEmailPassword()`

View File

@@ -26,6 +26,9 @@ const config = {
favicon: 'img/favicon.png',
organizationName: 'nhost',
projectName: 'docs',
scripts: [
{ src: 'https://plausible.io/js/script.js', defer: true, 'data-domain': 'docs.nhost.io' }
],
plugins: [require.resolve('docusaurus-plugin-image-zoom')],
presets: [
[

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/docs",
"version": "0.0.3",
"version": "0.0.4",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -19,18 +19,18 @@
"@docusaurus/plugin-sitemap": "2.0.0-beta.20",
"@docusaurus/preset-classic": "2.0.0-beta.20",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"clsx": "^1.2.1",
"docusaurus-plugin-image-zoom": "^0.1.1",
"mdx-mermaid": "^1.2.1",
"mdx-mermaid": "^1.3.2",
"mermaid": "^8.14.0",
"prism-react-renderer": "^1.3.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.20",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.6.3"
"@tsconfig/docusaurus": "^1.0.6",
"typescript": "^4.8.2"
},
"browserslist": {
"production": [

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/static/videos/nhost-table-edit.mp4 vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,11 @@
# @nhost-examples/codegen-react-apollo
## 0.1.1
### Patch Changes
- ba785da1: Bump dependencies versions
- Updated dependencies [ba785da1]
- Updated dependencies [6da44bf8]
- @nhost/react@0.14.0
- @nhost/react-apollo@5.0.0

View File

@@ -5,9 +5,9 @@ services:
environment:
hasura_graphql_enable_remote_schema_permissions: false
auth:
image: nhost/hasura-auth:0.11.0
image: nhost/hasura-auth:0.15.0
storage:
image: nhost/hasura-storage:0.2.4
image: nhost/hasura-storage:0.2.5
auth:
access_control:
email:

View File

@@ -1,12 +1,12 @@
{
"name": "@nhost-examples/codegen-react-apollo",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"dependencies": {
"@apollo/client": "^3.6.9",
"@nhost/react": "*",
"@nhost/react-apollo": "*",
"graphql": "^16.5.0",
"graphql": "15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
@@ -35,15 +35,15 @@
]
},
"devDependencies": {
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript-operations": "^2.4.2",
"@graphql-codegen/typescript-react-apollo": "^3.2.16",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "^8.0.0",
"@graphql-codegen/cli": "^2.12.0",
"@graphql-codegen/typescript-operations": "^2.5.3",
"@graphql-codegen/typescript-react-apollo": "^3.3.3",
"@types/node": "^16.11.56",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"eslint": "^8.23.0",
"eslint-config-react-app": "^7.0.1",
"typescript": "^4.4.2",
"vite": "^2.9.7"
"typescript": "^4.8.2",
"vite": "^2.9.15"
}
}

View File

@@ -0,0 +1,10 @@
# @nhost-examples/codegen-react-query
## 0.1.1
### Patch Changes
- ba785da1: Bump dependencies versions
- Updated dependencies [ba785da1]
- Updated dependencies [6da44bf8]
- @nhost/react@0.14.0

View File

@@ -5,9 +5,9 @@ services:
environment:
hasura_graphql_enable_remote_schema_permissions: false
auth:
image: nhost/hasura-auth:0.11.0
image: nhost/hasura-auth:0.15.0
storage:
image: nhost/hasura-storage:0.2.4
image: nhost/hasura-storage:0.2.5
auth:
access_control:
email:

View File

@@ -1,12 +1,12 @@
{
"name": "@nhost-examples/codegen-react-query",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"dependencies": {
"@nhost/react": "*",
"@tanstack/react-query": "^4.0.10",
"@tanstack/react-query-devtools": "^4.0.10",
"graphql": "^16.5.0",
"@tanstack/react-query": "^4.2.3",
"@tanstack/react-query-devtools": "^4.2.3",
"graphql": "15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
@@ -35,14 +35,14 @@
]
},
"devDependencies": {
"@graphql-codegen/cli": "^2.8.1",
"@graphql-codegen/typescript-operations": "^2.5.1",
"@graphql-codegen/typescript-react-query": "^4.0.0",
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"eslint": "^8.0.0",
"typescript": "^4.4.2",
"vite": "^2.9.7"
"@graphql-codegen/cli": "^2.12.0",
"@graphql-codegen/typescript-operations": "^2.5.3",
"@graphql-codegen/typescript-react-query": "^4.0.1",
"@types/node": "^16.11.56",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"eslint": "^8.23.0",
"typescript": "^4.8.2",
"vite": "^2.9.15"
}
}

View File

@@ -0,0 +1,9 @@
{
"name": "functions",
"version": "1.0.0",
"description": "",
"main": "index.js",
"keywords": [],
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"allowJs": true,
"skipLibCheck": true,
"noEmit": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true,
"strictNullChecks": false
}
}

View File

@@ -0,0 +1,9 @@
# @nhost-examples/multi-tenant-one-to-many
## 1.0.1
### Patch Changes
- ba785da1: Bump dependencies versions
- Updated dependencies [ba785da1]
- @nhost/nhost-js@1.5.1

View File

@@ -5,9 +5,9 @@ services:
environment:
hasura_graphql_enable_remote_schema_permissions: false
auth:
image: nhost/hasura-auth:0.11.0
image: nhost/hasura-auth:0.15.0
storage:
image: nhost/hasura-storage:0.2.4
image: nhost/hasura-storage:0.2.5
auth:
access_control:
email:

View File

@@ -1,20 +1,19 @@
{
"name": "@nhost-examples/multi-tenant-one-to-many",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
},
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@types/express": "^4.17.13",
"express": "^4.17.2",
"typescript": "^4.5.4"
"express": "^4.18.1",
"typescript": "^4.8.2"
},
"dependencies": {
"@nhost/nhost-js": "^0.3.3"
"@nhost/nhost-js": "*"
}
}
}

View File

@@ -1,5 +1,16 @@
# @nhost-examples/nextjs
## 0.1.1
### Patch Changes
- ba785da1: Bump dependencies versions
- Updated dependencies [ba785da1]
- Updated dependencies [6da44bf8]
- @nhost/nextjs@2.0.0
- @nhost/react@0.14.0
- @nhost/react-apollo@5.0.0
## 0.0.2
### Patch Changes

View File

@@ -5,9 +5,9 @@ services:
environment:
hasura_graphql_enable_remote_schema_permissions: false
auth:
image: nhost/hasura-auth:0.11.0
image: nhost/hasura-auth:0.15.0
storage:
image: nhost/hasura-storage:0.2.4
image: nhost/hasura-storage:0.2.5
auth:
access_control:
email:

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/nextjs",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"scripts": {
"dev": "next dev",
@@ -16,27 +16,27 @@
},
"dependencies": {
"@apollo/client": "^3.6.9",
"@mantine/core": "^4.2.2",
"@mantine/hooks": "^4.2.2",
"@mantine/next": "^4.2.2",
"@mantine/notifications": "^4.2.2",
"@mantine/core": "^4.2.12",
"@mantine/hooks": "^4.2.12",
"@mantine/next": "^4.2.12",
"@mantine/notifications": "^4.2.12",
"@nhost/nextjs": "*",
"@nhost/react": "*",
"@nhost/react-apollo": "*",
"graphql": "^16.3.0",
"graphql": "15.7.2",
"next": "12.1.6",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-icons": "^4.3.1"
"react-icons": "^4.4.0"
},
"devDependencies": {
"@next/bundle-analyzer": "^12.1.5",
"@next/bundle-analyzer": "^12.2.5",
"@types/node": "17.0.23",
"@types/react": "18.0.8",
"@xstate/inspect": "^0.6.2",
"eslint-config-next": "12.0.10",
"typescript": "4.5.5",
"ws": "^8.5.0",
"xstate": "^4.32.1"
"ws": "^8.8.1",
"xstate": "^4.33.5"
}
}

View File

@@ -1,8 +1,11 @@
{
"extends": "../../config/tsconfig.base.json",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
@@ -16,6 +19,12 @@
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"node_modules"
]
}

View File

@@ -1 +0,0 @@
VITE_NHOST_URL=http://localhost:1337

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