Compare commits

..

206 Commits

Author SHA1 Message Date
Pilou
dee93bb873 Merge pull request #526 from nhost/changeset-release/main
chore: update versions
2022-05-06 22:29:55 +02:00
github-actions[bot]
173b587802 chore: update versions 2022-05-06 20:24:16 +00:00
Pilou
30ef1660b4 Merge pull request #525 from nhost/fix/cookie-mode
fix: correct cookie storage type
2022-05-06 22:23:12 +02:00
Pierre-Louis Mercereau
a613aa9f0c refactor: unnest if block 2022-05-06 22:12:50 +02:00
Pierre-Louis Mercereau
3c03b9b46f refactor: remove dead code 2022-05-06 22:09:51 +02:00
Pierre-Louis Mercereau
65a3061146 fix: correct cookie storage type 2022-05-06 22:01:38 +02:00
Pilou
55864eac30 Merge pull request #522 from nhost/event-triggers-syntax-error
fixed syntax error in Event Triggers docs
2022-05-06 19:59:46 +02:00
Szilárd Dóró
28494d6c1f fixed syntax error in Event Triggers docs 2022-05-06 19:09:51 +02:00
Pilou
6777738c53 Merge pull request #519 from nhost/changeset-release/main
chore: update versions
2022-05-06 15:24:04 +02:00
github-actions[bot]
0d60693c27 chore: update versions 2022-05-06 11:43:21 +00:00
Pilou
c159c9c98c Merge pull request #518 from nhost/fix/refresh-token-load
fix: corrections and reshape the react-apollo example
2022-05-06 13:42:05 +02:00
Pierre-Louis Mercereau
58fa2a201c fix: corrections and reshape the react-apollo example 2022-05-06 12:55:17 +02:00
Johan Eliasson
db4607ccac Merge pull request #516 from nhost/docs-guides
Docs intro of Nhost
2022-05-06 11:50:05 +02:00
Johan Eliasson
95b14557a0 intro 2022-05-06 11:47:29 +02:00
Johan Eliasson
8b527d0fcb Merge pull request #445 from nhost/docs-guides
docs: intro, architecture and quickstarts
2022-05-06 11:43:41 +02:00
Pilou
fc50beec5e Merge pull request #513 from nhost/docs/clean-nextjs-intro
remove reference to useless component
2022-05-06 10:42:24 +02:00
Pierre-Louis Mercereau
ed0de2d930 remove reference to useless component 2022-05-05 21:53:37 +02:00
Pilou
f26e8c3614 Merge pull request #491 from nhost/changeset-release/main
chore: update versions
2022-05-05 16:11:42 +02:00
Pierre-Louis Mercereau
a05a484426 chore: correct changelog 2022-05-05 16:04:33 +02:00
Pierre-Louis Mercereau
4f0d5aa9c0 chore: downgrade major to minor bump 2022-05-05 16:02:23 +02:00
github-actions[bot]
254e362e95 chore: update versions 2022-05-05 13:58:01 +00:00
Pilou
a2a8839694 Merge pull request #507 from nhost/refactor/simplify-and-correct-options
Make code more consistent, implement the 'custom and 'cookie' storage types
2022-05-05 15:56:41 +02:00
Pierre-Louis Mercereau
d12667ccc5 refactor: post-review 2022-05-05 15:22:35 +02:00
Pierre-Louis Mercereau
feb55fe0ad chore: update lockfile 2022-05-05 14:43:12 +02:00
Pilou
b97c0a9c9d Merge branch 'main' into refactor/simplify-and-correct-options 2022-05-05 14:35:08 +02:00
Pierre-Louis Mercereau
2e98934f75 refactor: expose the interface of NhostReactProvider and use PropsWithChildren type 2022-05-05 13:35:30 +02:00
Pilou
8cedafc807 Merge pull request #503 from nhost/patch/react-18
Patch/react 18
2022-05-05 13:27:24 +02:00
Pierre-Louis Mercereau
322b433994 docs(example): correct nextjs example 2022-05-05 12:07:20 +02:00
Pierre-Louis Mercereau
6082ba6943 docs: remove part of the doc already automatically generated 2022-05-05 10:54:24 +02:00
Pierre-Louis Mercereau
1fb1d25a72 chore: remove testing credentials 2022-05-05 10:39:07 +02:00
Pierre-Louis Mercereau
ae4e4e50f6 chore: update changeset 2022-05-05 10:37:22 +02:00
Pierre-Louis Mercereau
185f39e23f fix: don't take previous errors into account when using SMS and deanonymisation 2022-05-05 10:35:49 +02:00
Pierre-Louis Mercereau
0dd7cab3bf fix: remove async import 2022-05-04 22:35:18 +02:00
Pierre-Louis Mercereau
47c7380d89 refactor: cooooooooookies
(miom miom miom)
2022-05-04 22:28:13 +02:00
Pierre-Louis Mercereau
b56162a74b refactor: make code more consistent, and implement the 'custom and 'cookie' client storage types 2022-05-04 22:25:17 +02:00
Pierre-Louis Mercereau
aeb8b8afda chore: lint, and update changesets 2022-05-04 14:23:58 +02:00
Pierre-Louis Mercereau
f9e107b008 docs: return errors to the UI 2022-05-04 13:42:30 +02:00
Pierre-Louis Mercereau
d748d82483 docs: flesh up the nextjs example 2022-05-04 13:11:00 +02:00
Johan Eliasson
2192fdc92e change cta 2022-05-04 09:04:53 +02:00
Johan Eliasson
eec2601a3a architecture 2022-05-04 08:55:17 +02:00
Johan Eliasson
93eaa85b47 Merge branch 'main' into docs-guides 2022-05-04 07:40:53 +02:00
Pierre-Louis Mercereau
4c8a168c02 refactor: update lockfile 2022-05-03 22:12:57 +02:00
Pierre-Louis Mercereau
eb166cf5ee refactor: remove debug code 2022-05-03 22:07:07 +02:00
Pierre-Louis Mercereau
54e1873461 refactor: wrap again the apollo client creation into useEffect to avoid SSR when CSR 2022-05-03 22:02:15 +02:00
Pierre-Louis Mercereau
e5bc3b356c refactor(nextjs): bump to React 18 and Apollo client 3.6.2 2022-05-03 21:43:39 +02:00
Pierre-Louis Mercereau
42edb74057 refactor: upgrade to React 18 2022-05-03 21:20:10 +02:00
Pierre-Louis Mercereau
3ebeae9294 refactor: upgrade react-apollo to React 18 to reproduce the missing attached headers bug 2022-05-03 19:51:50 +02:00
Pilou
24189bd155 Merge pull request #501 from nhost/contributors-readme-action-tjRSlp2hVR
contributors readme action update
2022-05-03 16:47:01 +02:00
github-actions[bot]
5985b18764 contrib-readme-action has updated readme 2022-05-03 14:43:47 +00:00
Pilou
95efcb4de6 Merge pull request #500 from heygambo/patch-1
Adds environment variables to auth service
2022-05-03 16:43:30 +02:00
Christian Gambardella
609d9001f5 Adds environment variables to auth service
I ran into an issue where I couldn't sign up users because the auth service wasn't able to connect to mailhog.
That caused the auth service to not send an email and not respond to the HTTP request.

fixes #499 

I'm wondering if anyone else had this issue. If I'm the only one then maybe this PR is obsolete.
2022-05-03 16:18:36 +02:00
Pilou
1e44a14b8a Merge pull request #497 from nhost/docs/generate-hasura-auth-openapi
Generate the latest hasura-auth openapi specs
2022-05-02 17:05:26 +02:00
Pierre-Louis Mercereau
5917eff5a6 chore: newline 2022-05-02 09:44:38 +02:00
Pierre-Louis Mercereau
f8ee87ad01 feat: smalls script that generates the latest hasura-auth openapi specs 2022-05-02 09:42:24 +02:00
Szilárd Dóró
a7990b363f Merge pull request #496 from nhost/contributors-readme-action-Vits42iSrd
contributors readme action update
2022-05-02 08:59:28 +02:00
github-actions[bot]
ca8ecb4b5c contrib-readme-action has updated readme 2022-05-02 06:48:04 +00:00
Szilárd Dóró
dfe080b8f6 Merge pull request #495 from GavanWilhite/patch-2
Fixed npm <> yarn instructions
2022-05-02 08:47:50 +02:00
Gavan Wilhite
069a5d4d9a Fixed npm <> yarn instructions 2022-05-01 19:42:53 -06:00
Pilou
efccd54641 Merge pull request #492 from nhost/docs/autogen-edit-page
feat: link the 'Edit Page' button to the source code instead of the generated file
2022-04-29 17:02:18 +02:00
Pilou
a3357265ec Merge pull request #480 from nhost/docs/algolia
docs: enable algolia search
2022-04-29 12:33:20 +02:00
Pierre-Louis Mercereau
494d8127dc refactor: simplify 2022-04-29 12:31:15 +02:00
Pierre-Louis Mercereau
57b628a255 refactor: remove useless condition 2022-04-29 12:28:31 +02:00
Pierre-Louis Mercereau
98b30a5c5e Merge branch 'main' into docs/autogen-edit-page 2022-04-29 12:26:02 +02:00
Pierre-Louis Mercereau
48afcf415d feat: link the 'Edit Page' button to the source code instead of the generated file 2022-04-29 12:24:33 +02:00
Johan Eliasson
58b9488af8 update setting 2022-04-29 11:48:42 +02:00
Pilou
e49528d43e Merge pull request #488 from nhost/chore/rename-user-hooks
fix: rename user data hooks to make them all start with `userUser...`
2022-04-29 11:47:33 +02:00
Pilou
ab0f5582e5 Merge pull request #489 from nhost/docs/developers-guide
Basic developer guide
2022-04-29 11:47:17 +02:00
Pierre-Louis Mercereau
b499548503 post review 2022-04-29 10:30:29 +02:00
Pilou
fbc15cfee1 Merge pull request #452 from nhost/441-user_id-not-seen-in-the-screenshots-before-the-permissions-section-of-todoapp
docs: correct docs for `user_id` column
2022-04-29 09:43:03 +02:00
Pierre-Louis Mercereau
8788de83e8 docs: basic developer guide 2022-04-29 09:14:41 +02:00
Pierre-Louis Mercereau
1fb51a7bed fix: rename user data hooks to make them all start with userUser... 2022-04-29 08:31:32 +02:00
Pilou
365b806755 Merge pull request #487 from nhost/changeset-release/main
chore: update versions
2022-04-28 23:55:00 +02:00
github-actions[bot]
74025a2d90 chore: update versions 2022-04-28 21:51:11 +00:00
Pilou
ebd6f86ea3 Merge pull request #486 from nhost/fix/fine-tune-nextjs
fix: get the refresh token in the right place in the url
2022-04-28 23:50:19 +02:00
Pierre-Louis Mercereau
7b23d33d9b fix: get the refresh token in the right place in the url 2022-04-28 22:18:48 +02:00
Pierre-Louis Mercereau
de177710f7 chore: bump correct version number, and trigger release 2022-04-28 18:39:58 +02:00
Pierre-Louis Mercereau
eebfddb48e build: bump nextjs to correct version 2022-04-28 16:52:17 +02:00
Pilou
f5df7eaa2d Merge pull request #457 from nhost/changeset-release/main
chore: update versions
2022-04-28 16:31:09 +02:00
Pierre-Louis Mercereau
0b4028b1d6 chore: remove duplicate lines in changelog 2022-04-28 15:57:20 +02:00
github-actions[bot]
f2da21026b chore: update versions 2022-04-28 13:48:50 +00:00
Pilou
a8233ea621 Merge pull request #461 from nhost/feat/get-claim
feat: add accessors for decoded access token and Hasura claims
2022-04-28 15:47:30 +02:00
Pierre-Louis Mercereau
f300d8b9f1 build: update lintstagedrc 2022-04-28 15:26:29 +02:00
Pierre-Louis Mercereau
3b625acd96 Merge branch 'main' into feat/get-claim 2022-04-28 15:24:46 +02:00
Pilou
116e23cb13 Merge pull request #459 from nhost/feat/capture-url-errors
feat: capture url errors & improved SSR / NextJs startup
2022-04-28 15:22:54 +02:00
Pierre-Louis Mercereau
954aa43e49 refactor: adjustments from review 2022-04-28 14:01:18 +02:00
Pierre-Louis Mercereau
de6f862c4c style: remove dead code and add minor piece of doc 2022-04-28 13:54:29 +02:00
Pierre-Louis Mercereau
5025333fb4 Merge branch 'main' into feat/capture-url-errors 2022-04-28 13:44:14 +02:00
Pilou
b3991ea9d9 Merge pull request #482 from nhost/docs/404
docs: custom 404 page
2022-04-28 13:42:54 +02:00
Pierre-Louis Mercereau
239db617f3 docs: clean file 2022-04-28 12:48:07 +02:00
Szilárd Dóró
6d6c8b3e2e Merge pull request #481 from nhost/fix/docgen-tags 2022-04-28 12:24:03 +02:00
Pierre-Louis Mercereau
169f163c99 docs: custom 404 page 2022-04-28 10:53:35 +02:00
Szilárd Dóró
5ddd7eda22 fixed some errors caused by undefined values 2022-04-28 10:49:03 +02:00
Szilárd Dóró
00d50f404a temporary support for link removal from TSDoc comments, renamed __tsdoc__ folder to .docgen 2022-04-28 10:21:06 +02:00
Pierre-Louis Mercereau
b52b4fca2d feat: complete NextJs 2022-04-27 22:18:03 +02:00
Pierre-Louis Mercereau
56b1adfa81 docs: enable algolia search 2022-04-27 17:25:34 +02:00
Pierre-Louis Mercereau
9f55f4890e chore: merge main 2022-04-27 16:44:19 +02:00
Szilárd Dóró
284890b437 Merge pull request #477 from nhost/docgen-improvements
DocGen improvements
2022-04-27 16:22:05 +02:00
Szilárd Dóró
1e3cb855f0 improved function overloads in auto-generated docs 2022-04-27 16:12:41 +02:00
Pierre-Louis Mercereau
aaf575f0af chore: remove dev code 2022-04-27 16:09:30 +02:00
Pierre-Louis Mercereau
ff3427ccdb chore: update changeset title 2022-04-27 16:08:40 +02:00
Szilárd Dóró
3834d80a0a improved the way function overloads are displayed
fixed an issue where line breaks broke the layout of parameter table fragments
2022-04-27 15:57:34 +02:00
Pierre-Louis Mercereau
8fcc3fd560 Merge branch 'main' into feat/capture-url-errors 2022-04-27 15:56:04 +02:00
Pierre-Louis Mercereau
616e320421 refactor: simplify startup 2022-04-27 15:55:04 +02:00
Pilou
ff8fdc4db4 Merge pull request #476 from nhost/contributors-readme-action-84g__a20xD
contributors readme action update
2022-04-27 15:43:27 +02:00
Szilárd Dóró
b732bc51e8 fixed an issue where multiple function signatures were not rendered properly in generated docs 2022-04-27 14:42:01 +02:00
Pierre-Louis Mercereau
8b88d6c553 refactor: augment useAuthenticationState instead of creating useAuthenticationError 2022-04-27 14:26:14 +02:00
Szilárd Dóró
af192fbb66 updated lint-staged config 2022-04-27 14:23:27 +02:00
Szilárd Dóró
b7c031d7e0 added deprecation indicator to sidebar items if applicable 2022-04-27 14:21:31 +02:00
Pierre-Louis Mercereau
05e91d93a8 fix: check if window existd 2022-04-27 14:20:52 +02:00
Pierre-Louis Mercereau
261f001a99 fix(nextjs): correct refresh method 2022-04-27 14:14:46 +02:00
Szilárd Dóró
ddb965c7cf added warning message to auto-generated markdown files 2022-04-27 14:10:17 +02:00
github-actions[bot]
ff8af4912b contrib-readme-action has updated readme 2022-04-27 11:42:13 +00:00
Pilou
948aebcf42 Merge pull request #472 from jladuval/patch-1
Docs: Update event-triggers.md with environment variable example
2022-04-27 13:41:57 +02:00
Szilárd Dóró
51a4d7a343 Merge pull request #474 from nhost/fix/docs-redirects
fix: Docs redirects
2022-04-27 13:17:41 +02:00
Johan Eliasson
d521218146 Merge pull request #475 from nhost/typo-hbuyg87y9
Typo
2022-04-27 13:08:06 +02:00
Johan Eliasson
9a1685c2eb typo 2022-04-27 12:55:43 +02:00
Szilárd Dóró
fb8f58503f updated CODEOWNERS 2022-04-27 12:31:02 +02:00
Szilárd Dóró
86409c2f18 changed React Hooks redirect 2022-04-27 12:26:36 +02:00
Szilárd Dóró
f7d8c061a0 added redirects from previously removed docs 2022-04-27 12:23:57 +02:00
Szilárd Dóró
eb59a07c3f Merge pull request #453 from nhost/feat/docgen
feat: Auto-generate documentation from TSDoc
2022-04-27 12:07:58 +02:00
Szilárd Dóró
27add80f95 added index page to JavaScript docs 2022-04-27 11:59:04 +02:00
Szilárd Dóró
cc60a845f3 fixes HasuraStorageClient examples to use code block 2022-04-27 10:53:02 +02:00
Szilárd Dóró
aeea44e4e8 fixed HasuraAuthClient examples to use code block 2022-04-27 10:51:35 +02:00
Jacob Duval
d273825cee Update event-triggers.md with environment variable example
Show how environment variables are used with the correct formatting. I had to search around a while to find the correct {{}} format.
2022-04-27 10:44:57 +02:00
Szilárd Dóró
177733f4b1 added deprecation note to parameters and parameter tables 2022-04-27 10:40:50 +02:00
Szilárd Dóró
efd33a7115 updated docs according to code changes 2022-04-27 10:04:08 +02:00
Szilárd Dóró
e4fe166992 Merge branch 'main' into feat/docgen 2022-04-27 10:02:34 +02:00
Pierre-Louis Mercereau
d9f221b625 feat: get refresh token from url in Next, and remove the refresh token from the url when possible 2022-04-27 09:55:42 +02:00
Szilárd Dóró
e0f5bf3396 fixed example in hasura-auth-client 2022-04-27 09:50:23 +02:00
Szilárd Dóró
17bd23460f added lint-staged configuration 2022-04-27 09:16:12 +02:00
Szilárd Dóró
52c30c25a9 expand Reference > JavaScript menu by default 2022-04-26 17:11:00 +02:00
Szilárd Dóró
989bc54544 added support for DocGen parallelization, improved DocGen configuration 2022-04-26 17:05:07 +02:00
Szilárd Dóró
5781cb0f9c restored accidentally removed docs pages 2022-04-26 15:51:26 +02:00
Szilárd Dóró
24f9ed4c4d fixed slugs, re-generated docs 2022-04-26 15:25:31 +02:00
Szilárd Dóró
2b447af8a7 Merge branch 'feat/docgen' of https://github.com/nhost/nhost into feat/docgen 2022-04-26 14:57:06 +02:00
Szilárd Dóró
2485c83de3 updated documentation URLs, fixed auto-generated documentation slugs 2022-04-26 14:53:26 +02:00
Pilou
707877477f Merge pull request #465 from nhost/chore/inline-react-doc
docs(react): add inline documentation
2022-04-26 14:32:15 +02:00
Pierre-Louis Mercereau
756e1af52d chore: merge 2022-04-26 14:31:35 +02:00
Pierre-Louis Mercereau
7f771e2e8f pre-merge 2022-04-26 14:29:25 +02:00
Szilárd Dóró
a737863c2b added support for flattened navigation structure on References page 2022-04-26 13:32:24 +02:00
Pierre-Louis Mercereau
ca2a61089a docs: add missing backticks 2022-04-26 12:19:53 +02:00
Szilárd Dóró
7432db0fe8 created custom sidebar mapping to support appropriate structure 2022-04-26 12:10:38 +02:00
Pierre-Louis Mercereau
9c25e65df6 docs(react): add inline documentation 2022-04-26 12:06:51 +02:00
Szilárd Dóró
e345895fd8 generated React, Next.js, Nhost JS documentation, fixed issues 2022-04-26 11:55:53 +02:00
Szilárd Dóró
cba7996dcf generated React, Next.js, Nhost JS documentation, fixed issues 2022-04-26 10:58:03 +02:00
Johan Eliasson
d7ceda6ae6 Merge pull request #464 from nhost/contributors-readme-action-yLZgG3Dxtk
contributors readme action update
2022-04-26 08:36:39 +02:00
github-actions[bot]
4e19b7309d contrib-readme-action has updated readme 2022-04-25 18:21:46 +00:00
David Barroso
de8a7d5512 Merge pull request #449 from nhost/dbarroso/update-docker-compose
update hasura-storage example
2022-04-25 20:21:32 +02:00
Pierre-Louis Mercereau
7e7aa5adc4 refactor: explain 2022-04-25 14:11:22 +02:00
Pierre-Louis Mercereau
1ed948952a refactor: remove mock credentials 2022-04-25 14:07:47 +02:00
Pilou
55b0a8f4b9 Merge pull request #458 from nhost/examples/xstate-inspector
react-apollo example: activate xstate inspector with an environment variable
2022-04-25 13:37:43 +02:00
Pierre-Louis Mercereau
1ce55c5568 feat: add aceessors for decoded access token and Hasura claims 2022-04-25 13:24:07 +02:00
Pierre-Louis Mercereau
fabd1da04c feat: new useAuthenticationError hook 2022-04-25 11:19:59 +02:00
Pierre-Louis Mercereau
53f5226d0c feat: capture hasura-auth errors from the url 2022-04-25 11:16:48 +02:00
Pilou
e339cba384 Merge pull request #450 from nhost/fix/filter-logs
Remove filtering of `useLayoutEffect` from logs
2022-04-25 11:14:05 +02:00
Pierre-Louis Mercereau
c14d12e04d docs: activate xstate inspector with an environment variable 2022-04-25 10:57:42 +02:00
Szilárd Dóró
03370da2f4 added DocGen support for React package, generated default React SDK references 2022-04-25 10:46:06 +02:00
Pilou
87d32b2639 Merge pull request #451 from nhost/chore/reprecate-bad-naming
Rename `autoLogin` to `autoSignIn`, and deprecate `autoLogin`
2022-04-25 10:13:08 +02:00
Pilou
61b5fb549c Merge pull request #456 from nhost/docs/use-display-name
docs: `useDisplayName` instead of `displayName`
2022-04-25 10:12:52 +02:00
Szilárd Dóró
28cd8dc5c5 resolved conflicts with main branch 2022-04-25 10:06:33 +02:00
Szilárd Dóró
fb93d8c1af Merge branch 'main' into feat/docgen 2022-04-25 10:05:41 +02:00
Pierre-Louis Mercereau
f4e6aea9c1 docs: fix incorrect example 2022-04-25 09:45:40 +02:00
Johan Eliasson
65d61cf4b8 update 2022-04-25 09:40:23 +02:00
Johan Eliasson
a8d5214b2f grammerly updates 2022-04-25 09:39:14 +02:00
Johan Eliasson
f9e5283fc3 correct docs for column 2022-04-25 09:35:18 +02:00
Pierre-Louis Mercereau
d49b837abb fix: rename autoLogin to autoSignIn, and deprecate autoLogin 2022-04-25 09:09:19 +02:00
Pierre-Louis Mercereau
49545c058b fix: remove filtering of useLayoutEffect from logs 2022-04-25 08:40:34 +02:00
David Barroso
765340f7b2 update hasura-storage example 2022-04-25 08:30:39 +02:00
Johan Eliasson
5a212aaa12 link fix 2022-04-22 22:34:45 +02:00
Pilou
2c3d9b11a6 Merge pull request #446 from nhost/changeset-release/main
chore: update versions
2022-04-22 22:33:18 +02:00
Johan Eliasson
79056d8b48 update 2022-04-22 22:30:02 +02:00
github-actions[bot]
b1678eaad3 chore: update versions 2022-04-22 20:29:10 +00:00
Pilou
f1c16dba6e Merge pull request #444 from nhost/fix/refresh-session-start
fix: fix `refreshSession`
2022-04-22 22:28:23 +02:00
Johan Eliasson
f86883df88 new menu strucutre 2022-04-22 22:20:42 +02:00
Pierre-Louis Mercereau
aa1fdf6c2c fix: fix refreshSession 2022-04-22 22:18:17 +02:00
Pilou
bebf9e1f2b Merge pull request #443 from nhost/changeset-release/main
chore: update versions
2022-04-22 17:35:44 +02:00
github-actions[bot]
2413c10283 chore: update versions 2022-04-22 15:32:40 +00:00
Pilou
0f7fbdab97 Merge pull request #440 from nhost/fix/token-refresher
fix: improve reliability of the token refresher
2022-04-22 17:31:47 +02:00
Pilou
14e5fd63a6 Merge branch 'main' into fix/token-refresher 2022-04-22 17:27:11 +02:00
Pilou
2446913836 Merge pull request #439 from nhost/fix/refresh-session
fix: fix and improve `nhost.auth.refreshSession`
2022-04-22 17:22:47 +02:00
Pierre-Louis Mercereau
1f88a9f47a style: improve readability 2022-04-22 17:20:05 +02:00
Pierre-Louis Mercereau
261e37cda4 fix: fix nullable value miss 2022-04-22 16:50:30 +02:00
Pierre-Louis Mercereau
5ee395ea8e fix: ensure the session is destroyed when signout is done 2022-04-22 16:44:52 +02:00
Szilárd Dóró
e5f00394ae added tests for getNestedParametersFromParameter 2022-04-22 16:41:04 +02:00
Szilárd Dóró
dd08aef4cc added tests for helper functions, improved verbose logging 2022-04-22 15:55:08 +02:00
Szilárd Dóró
4ab85815a0 introduced support for "alias" tag, added tests for DeprecationNoteFragment and CommentTagFragment 2022-04-22 15:18:53 +02:00
Pilou
828633ffc9 Merge pull request #435 from nhost/chore/include-examples-in-monorepo
Chore/include examples in monorepo
2022-04-22 13:28:02 +02:00
Szilárd Dóró
1b0902079b changed reference paths to use root path, improved some examples of HasuraAuthClient 2022-04-22 12:55:07 +02:00
Pierre-Louis Mercereau
7b7527a5e6 fix: improve reliability of the token refresher 2022-04-22 11:32:25 +02:00
Szilárd Dóró
f719d47ed3 created command for Storage docs generation, added initial docs generated with the tool 2022-04-22 11:23:54 +02:00
Szilárd Dóró
8cc88533b1 fixed class references 2022-04-22 10:57:41 +02:00
Szilárd Dóró
71de2bd0c5 added custom styling for optional / required labels of parameters
improved prettier formatter of classes, functions and types
2022-04-21 22:50:40 +02:00
Szilárd Dóró
66d204331b improved function signature formatting, union and intersection types 2022-04-21 22:31:17 +02:00
Szilárd Dóró
ee288fbc5f added tests for ClassTemplate, improved typings of signatures 2022-04-21 21:59:26 +02:00
Szilárd Dóró
1a38b5dca3 fixed parameter reference generator issues, added option to wrap or unwrap values to label generator 2022-04-21 19:39:38 +02:00
Szilárd Dóró
e0bd8cf14b moved docgen to packages, created temporary scripts to execute docgen procedure 2022-04-21 18:21:36 +02:00
Pierre-Louis Mercereau
e0cfcafead fix: fix and improve nhost.auth.refreshSession 2022-04-21 16:57:55 +02:00
Szilárd Dóró
1da0ff9109 fixed ESLint issues, improved error handling, improved DocGen state management 2022-04-21 14:09:44 +02:00
Pierre-Louis Mercereau
75a1428114 chore(examples): fix resolution error with nextjs 2022-04-21 13:42:23 +02:00
Pierre-Louis Mercereau
d82d830849 chore: update pnpm lock file 2022-04-21 13:23:13 +02:00
Pierre-Louis Mercereau
2def59fc6c chore: merge main 2022-04-21 13:21:36 +02:00
Pierre-Louis Mercereau
64ceb2c6bf docs: update examples readme 2022-04-21 12:46:05 +02:00
Pierre-Louis Mercereau
3ee007620c chore: use vite to build react-apollo-crm, and prettier examples 2022-04-21 12:40:19 +02:00
Szilárd Dóró
c08230ae95 disabled import sort command in DocGen because of the Prettier plugin 2022-04-21 12:04:43 +02:00
Szilárd Dóró
18df8921fd initial DocGen code 2022-04-21 11:44:31 +02:00
Pierre-Louis Mercereau
b9cf8172a0 chore(examples): include react-apollo and nextjs examples back in the monorepo workspace 2022-04-21 11:24:32 +02:00
517 changed files with 27716 additions and 23909 deletions

View File

@@ -18,5 +18,7 @@ module.exports = {
useTabs: false
}
}
]
],
importOrderSeparation: true,
importOrderSortSpecifiers: true
}

1
.github/CODEOWNERS vendored
View File

@@ -2,6 +2,7 @@
# https://help.github.com/en/articles/about-code-owners
/packages @plmercereau
/packages/docgen @szilarddoro
/.github/workflows @plmercereau
/docs/ @guicurcio
/examples/ @plmercereau @guicurcio @FuzzyReason

7
.gitignore vendored
View File

@@ -15,7 +15,6 @@ logs/
/.vscode/
.eslintcache
.yarnclean
.husky
# Directories
coverage/
@@ -50,4 +49,8 @@ todo.md
.netlify
.monorepo-example
.next
.next
# TypeDoc output
.docgen

1
.husky/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

6
.lintstagedrc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"packages/(docgen|hasura-auth-js|hasura-storage-js|nextjs|nhost-js|react|core)/src/**/*.{js,ts,jsx,tsx}": [
"pnpm docgen",
"git add docs"
]
}

View File

@@ -24,6 +24,8 @@ If you find an Issue that addresses the problem you're having, please add your r
### Pull Requests
Please have a look at our [developers guide](https://github.com/nhost/nhost/blob/main/DEVELOPERS.md) to start coding!
PRs to our libraries are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:
- Only fix/add the functionality in question **OR** address wide-spread whitespace/style issues, not both.

79
DEVELOPERS.md Normal file
View File

@@ -0,0 +1,79 @@
# Developer guide
## Requirements
- We use [pnpm](https://pnpm.io/) as a package manager to fasten development and builds, and as a backbone to our monorepo. You have to make sure it is installed in your machine. There are [multiple ways to install it](https://pnpm.io/installation), but the easiest way is with `npm`:
```sh
npm install -g pnpm
```
- Our tests and examples are using the Nhost CLI to run the backend services locally. You can follow the instructions to install it in [our documentation](https://docs.nhost.io/get-started/cli-workflow/install-cli)
## Getting things ready
First, clone this repository:
```sh
git clone https://github.com/nhost/nhost
```
Then, install the dependencies with `pnpm`:
```sh
cd nhost
pnpm install
```
## Starting development from an example
Let's follow the instructions to start [react-apollo example](https://github.com/nhost/nhost/blob/main/examples/react-apollo/README.md).
## Running the documentation website locally
The easier way to contribute to our documentation is to move to the `docs` folder and follow the [instructions to start local development](https://github.com/nhost/nhost/blob/main/docs/README.md):
```sh
cd docs
# not necessary step if you've done this step already anywhere in the repository
pnpm install
pnpm start
```
## Testing
In order to run tests, the Nhost testing backend should run locally. You can start it in from a separate terminal:
```sh
cd examples/testing-project
nhost -d
```
Once Nhost started locally, you can run the tests from the root folder of the repository with the following command:
```sh
pnpm test
```
## Changesets
If you made some changes in the packages, you will have to describe these changes so they will be taken into account in the next release.
We are using [changesets](https://github.com/changesets/changesets) to support our version/publish workflows. When submitting a pull request, a bot will check if some changesets are present, and if not, will guide you to add them.
The most comprehensive way to add a changeset is to run the following command from the root directory of the repository:
```sh
pnpm changeset
```
This will generate a file in the `.changeset` directory. You can edit it to give further details about the change you just made.
You can have a look at the changesets documentation on [how to add a changeset](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
## Commiting changes
You may notice `git commit` takes a few seconds to run. We set a commit hook that scan the changes in the code, automatically generates the documentation from the inline [TSDoc](https://tsdoc.org/) annotations, and add these generated documentation files to the commit. They will automatically update the [reference documentation](https://docs.nhost.io/reference).
<!-- ## Good practices
- lint
- prettier
- documentation -->

View File

@@ -98,7 +98,7 @@ Nhost is frontend agnostic, which means Nhost works with all frontend frameworks
Nhost libraries and tools
- [JavaScript/TypeScript SDK](https://docs.nhost.io/reference/sdk)
- [JavaScript/TypeScript SDK](https://docs.nhost.io/reference/javascript)
- [Dart and Flutter SDK](https://github.com/nhost/nhost-dart)
- [Nhost CLI](https://docs.nhost.io/reference/cli)
- [Nhost React](https://docs.nhost.io/reference/react)
@@ -120,7 +120,7 @@ Here are some ways of contributing to making Nhost better:
- **[Try out Nhost](https://docs.nhost.io/get-started/quick-start)**, and think of ways to make the service better. Let us know here on GitHub.
- Join our [Discord](https://discord.com/invite/9V7Qb2U) and connect with other members to share and learn from.
- Send a pull request to any of our [open source repositories](https://github.com/nhost) on Github. Check our [contribution guide](https://github.com/nhost/nhost/blob/main/CONTRIBUTING.md) for more details about how to contribute. We're looking forward to your contribution!
- Send a pull request to any of our [open source repositories](https://github.com/nhost) on Github. Check our [contribution guide](https://github.com/nhost/nhost/blob/main/CONTRIBUTING.md) and our [developers guide](https://github.com/nhost/nhost/blob/main/DEVELOPERS.md) for more details about how to contribute. We're looking forward to your contribution!
### Contributors
@@ -213,6 +213,13 @@ Here are some ways of contributing to making Nhost better:
</a>
</td></tr>
<tr>
<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 align="center">
<a href="https://github.com/hajek-raven">
<img src="https://avatars.githubusercontent.com/u/7288737?v=4" width="100;" alt="hajek-raven"/>
@@ -220,6 +227,13 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Filip Hájek</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 align="center">
<a href="https://github.com/jerryjappinen">
<img src="https://avatars.githubusercontent.com/u/1101002?v=4" width="100;" alt="jerryjappinen"/>
@@ -240,7 +254,8 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Pratim</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/Savinvadim1312">
<img src="https://avatars.githubusercontent.com/u/16936043?v=4" width="100;" alt="Savinvadim1312"/>
@@ -254,8 +269,7 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Amir Ahmic</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/akd-io">
<img src="https://avatars.githubusercontent.com/u/30059155?v=4" width="100;" alt="akd-io"/>
@@ -263,6 +277,13 @@ Here are some ways of contributing to making Nhost better:
<sub><b>Anders Kjær Damgaard</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/heygambo">
<img src="https://avatars.githubusercontent.com/u/449438?v=4" width="100;" alt="heygambo"/>
<br />
<sub><b>Christian Gambardella</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/rustyb">
<img src="https://avatars.githubusercontent.com/u/53086?v=4" width="100;" alt="rustyb"/>
@@ -276,14 +297,8 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Dominic Garms</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/alveshelio">
<img src="https://avatars.githubusercontent.com/u/8176422?v=4" width="100;" alt="alveshelio"/>
@@ -297,8 +312,14 @@ Here are some ways of contributing to making Nhost better:
<br />
<sub><b>Hoang Do</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"/>
<br />
<sub><b>Jacob Duval</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ghoshnirmalya">
<img src="https://avatars.githubusercontent.com/u/6391763?v=4" width="100;" alt="ghoshnirmalya"/>

View File

@@ -3,7 +3,7 @@ title: 'Authenticate users'
slug: /get-started/authentication
---
You defined `select` permissions for the `public` role in the previous section. You will now add `insert` and `create` permissions for authenticated users to secure your app's GraphQL API with authentication.
In the previous section, you defined `select` permissions for the `public` role. You will now add `insert` and `select` permissions for authenticated users to secure your app's GraphQL API with authentication.
> Nhost's authentication service lets you deliver frictionless registration and login experiences to your users. We support most social providers and different methods such as email & password and passwordless (magic link).
@@ -13,13 +13,15 @@ You defined `select` permissions for the `public` role in the previous section.
Manually create a user by going to your app's **Users** tab (top menu) and clicking on **Add User**.
![Add user](/img/quick-start/add-user.gif)
<video width="99%" loop="" muted="" playsInline="" controls="true">
<source src="/videos/add-user.mp4" type="video/mp4" />
</video>
You will now use that newly created user to make authenticated requests to the API.
You will now use that newly created user. We'll use this newly created user to make authenticated requests to the GraphQL API.
---
## Authenticate and query data
## Sign in and query data
Add the following code to sign in the new user and request the list of todos again:
@@ -60,9 +62,41 @@ Why is the return value `null`? Because when making GraphQL requests as an authe
> For authenticated requests, there is always the option to override the default `user` role with any other valid role.
---
To prepare our database and GraphQL API to work for signed-in users we need to do two things:
## Permissions for users
1. Add a `user_id` column to the `todos` table, so we know what todo belongs to which user.
2. Use the `user` role instead of the `public` role for permissions.
## Add `user_id` column
Before adding the `user_id` column, let's delete all existing todos.
Then add the `user_id` column as a `UUID` type. Make sure that `nullable` is **not** checked. This will ensure that all todos must have a `user_id` value.
At last, we'll create a connection between the `todos` table and the `users` table. For that, we need to do yet another two things:
1. Create a Foreign Key (FK) between `todos` and `auth.users.id`.
2. Let Hasura track the relationship between the two tables.
<video width="99%" loop="" muted="" playsInline="" controls="true">
<source src="/videos/user-id-column.mp4" type="video/mp4" />
</video>
### Create FK
Create a FK between the `auth.users.id` column and the `public.todos.user_id` column. See video above.
### Track relationship
Click on the `public` schema and track the untracked foreign key relationship. Then click on the `auth` schema and track the relationship again. See video above.
We track these relationships to create the GrpahQL relationships between the `todos` table to the `users` table and the `users` table to the `todos` table.
Ok, our `user_id` column is added and connected correctly. Let's continue with setting permissions for signed-in users.
## Permissions for signed-in users
Let us organize the permissions so it works for signed in users too.
### Remove permissions for the public role
@@ -72,7 +106,7 @@ We won't use the `public` role anymore, so let's remove all permission for that
Now we'll add permissions for the `user` role.
> All logged-in users have the `user` role.
> Signed-in users use the `user` role by default
### Insert permission

View File

@@ -30,7 +30,7 @@ Create a new folder called `nhost-todos`, initialize a new JavaScript app there,
```bash
npm init -y
yarn add @nhost/nhost-js graphql
npm install @nhost/nhost-js graphql
```
</TabItem>
@@ -38,7 +38,7 @@ yarn add @nhost/nhost-js graphql
```bash
yarn init -y
npm install @nhost/nhost-js graphql
yarn add @nhost/nhost-js graphql
```
</TabItem>

View File

@@ -65,7 +65,9 @@ This is all we need! A new table will be created when you click **Add Table**.
Go to the **Insert Row** tab to add some data to your database.
![Inserting todos](/img/quick-start/insert-todos.gif)
<video width="99%" loop="" muted="" playsInline="" controls="true">
<source src="/videos/insert-todos.mp4" type="video/mp4" />
</video>
---

View File

@@ -1,5 +0,0 @@
{
"label": "The Nhost Platform",
"position": 1,
"link": { "type": "generated-index", "slug": "/platform" }
}

View File

@@ -1,5 +1,4 @@
{
"label": "Authentication",
"position": 4,
"link": { "id": "platform/authentication/index", "type": "doc" }
"position": 6
}

View File

@@ -9,7 +9,7 @@ Nhost provides a ready-to-use authentication service, integrated with Nhost Java
## Getting Started
Sign up a user with the [Nhost JavaScript SDK](/reference/sdk):
Sign up a user with the [Nhost JavaScript SDK](/reference/javascript):
```js
import { NhostClient } from '@nhost/nhost-js';
@@ -48,7 +48,7 @@ query {
Nhost authentication uses two tokens: Access tokens and refresh tokens.
[Nhost JavaScript SDK](/reference/sdk) automatically handles access and refresh tokens.
[Nhost JavaScript SDK](/reference/javascript) automatically handles access and refresh tokens.
### Access tokens

View File

@@ -58,7 +58,7 @@ To make sure we can fetch all user data (email, profile picture and name). For t
## Sign In users in your app
Use the [Nhost JavaScript client](/reference/sdk) to sign in users in your app:
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
```js
nhost.auth.signIn({

View File

@@ -43,7 +43,7 @@ Follow this guide to sign in users with GitHub with your Nhost App.
## Sign In users in your app
Use the [Nhost JavaScript client](/reference/sdk) to sign in users in your app:
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
```js
nhost.auth.signIn({

View File

@@ -23,7 +23,7 @@ You need to set client ID and client secret for each provider that you want to e
## Implementing sign-in experience
Use the [Nhost JavaScript SDK](/reference/sdk) and the `signIn()` method to implement social sign-in in your app,
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in in your app,
Here's an example of how to implement sign-in with GitHub:

View File

@@ -50,7 +50,7 @@ Follow this guide to sign in users with LinkedIn with your Nhost App.
## Sign In users in your app
Use the [Nhost JavaScript client](/reference/sdk) to sign in users in your app:
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
```js
nhost.auth.signIn({

View File

@@ -43,7 +43,7 @@ Follow this guide to sign in users with Spotify with your Nhost App.
## Sign In users in your app
Use the [Nhost JavaScript client](/reference/sdk) to sign in users in your app:
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
```js
nhost.auth.signIn({

View File

@@ -1,6 +1,6 @@
---
title: 'Nhost CLI'
sidebar_position: 3
title: 'CLI'
sidebar_position: 11
---
import Tabs from '@theme/Tabs';

View File

@@ -1,4 +1,4 @@
{
"label": "Database",
"position": 2
"position": 4
}

View File

@@ -1,6 +1,6 @@
---
title: 'Environment variables'
sidebar_position: 1
sidebar_position: 9
---
Environment variables are key-value pairs configured outside your source code. They are used to store environment-specific values such as API keys.

View File

@@ -1,6 +1,6 @@
---
title: 'GitHub integration'
sidebar_position: 2
sidebar_position: 10
---
You can connect your Nhost app to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed.
@@ -21,7 +21,7 @@ Specifically, the following will be deployed:
## Workflow
Create a new Nhost app. Then use [Nhost CLI](/platform/nhost/local-development) to initialize your Nhost app locally.
Create a new Nhost app. Then use [Nhost CLI](/platform/cli) to initialize your Nhost app locally.
The workflow is as follows:

View File

@@ -1,4 +1,4 @@
{
"label": "GraphQL",
"position": 3
"position": 5
}

View File

@@ -20,7 +20,7 @@ To interact with the GraphQL API it's recommended to use a GraphQL client:
- [React Query](https://react-query.tanstack.com/graphql)
- [SWR](https://swr.vercel.app/docs/data-fetching#graphql)
It's also possible to use the built-in [GraphQL client](/reference/sdk/graphql) in the Nhost JavaScript client.
It's also possible to use the built-in [GraphQL client](/reference/javascript/nhost-js/graphql) in the Nhost JavaScript client.
---

View File

@@ -1,11 +0,0 @@
---
title: 'The Nhost Platform'
sidebar_position: 1
---
- [Database](/platform/database)
- [GraphQL](/platform/graphql)
- [Authentication](/platform/authentication)
- [Storage](/platform/storage)
- [Serverless Functions](/platform/serverless-functions)
- [Nhost](/platform/nhost)

View File

@@ -0,0 +1,28 @@
---
title: 'Introduction to Nhost'
sidebar_label: Introduction
sidebar_position: 1
---
Nhost is the open source GraphQL backend (Firebase Alternative) and a development platform. Nhost is doing for the backend, what [Netlify](https://netlify.com/) and [Vercel](https://vercel.com/) are doing for the frontend.
We provide a modern backend with the general building blocks required to build fantastic digital products.
We make it easy to build and deploy this backend using our platform that takes care of configuration, security, and performance. Things just works and scale automatically so you can focus on your product and on your business.
## Quickstart
Get started quickly by following one of our quickstart guides:
- [Next.js](/platform/quickstarts/nextjs)
- [React](/platform/quickstarts/react)
## Products and features
Learn more about the product and features of Nhost.
- [Database](/platform/database)
- [GraphQL](/platform/graphql)
- [Authentication](/platform/authentication)
- [Storage](/platform/storage)
- [Serverless Functions](/platform/serverless-functions)

View File

@@ -1,4 +0,0 @@
{
"label": "Nhost",
"position": 7
}

View File

@@ -1,9 +0,0 @@
---
title: 'Overview'
---
Documentation for other platform features:
- [Environment variables](/platform/nhost/environment-variables)
- [GitHub integration](/platform/nhost/github-integration)
- [Local development](/platform/nhost/local-development)

View File

@@ -0,0 +1,5 @@
{
"label": "Overview",
"position": 2,
"collapsed": false
}

View File

@@ -0,0 +1,30 @@
---
title: 'Architecture'
sidebar_position: 2
---
Nhost is a backend as a service built with open source tools to provide developers the general building blocks required to build fantastic digital apps and products.
Here's a diagram of the Nhost stack on a high level:
![Nhost Architecture Diagram](/img/architecture/nhost-diagram.png)
As you see in the image above, Nhost provides endpoints for:
- GraphQL (`/graphql`)
- Authentication (`/auth`)
- Storage (`/storage`)
- Functions (`/functions`)
Data is stored in Postgres and files are stored in S3.
## Open Source
The open source tools used for the full Nhost stack are:
- Database: [Postgres](https://www.postgresql.org/)
- S3: [Minio](https://github.com/minio/minio)
- GraphQL: [Hasura](https://github.com/hasura/graphql-engine)
- Authentication: [Hasura Auth](https://github.com/nhost/hasura-auth)
- Storage: [Hasura Storage](https://github.com/nhost/hasura-storage)
- Functions: [Node.js](https://nodejs.org/en/)

View File

@@ -0,0 +1,5 @@
{
"label": "Quickstarts",
"position": 3,
"collapsed": false
}

View File

@@ -0,0 +1,8 @@
---
title: 'Quickstart: Next.js'
sidebar_position: 2
---
## Introduction
This is a quickstart guide for React with Nhost.

View File

@@ -0,0 +1,8 @@
---
title: 'Quickstart: React'
sidebar_position: 1
---
## Introduction
This is a quickstart guide for React with Nhost.

View File

@@ -1,4 +1,4 @@
{
"label": "Serverless Functions",
"position": 6
"position": 8
}

View File

@@ -15,7 +15,7 @@ Event triggers are managed in Hasura. Go to Hasura, then select **Events** in th
![Creating event trigger in Hasura](/img/platform/hasura-create-event-trigger.png)
Nhost's [environment variables](/platform/nhost/environment-variables) can be used in event trigger headers. For example, you can attach `NHOST_WEBHOOK_SECRET` to an outgoing webhook here.
Nhost's [environment variables](/platform/environment-variables) can be used in event trigger headers. For example, you can attach `NHOST_WEBHOOK_SECRET` to an outgoing webhook here.
---
@@ -29,6 +29,10 @@ https://[app-subdomain].nhost.run/v1/functions/my-endpoint
The environment variable `NHOST_BACKEND_URL` will have the correct value.
```bash
{{NHOST_BACKEND_URL}}/v1/functions/my-endpoint
```
---
## Security
@@ -39,7 +43,7 @@ In your serverless function, you need to make sure the request actually comes fr
- Check the header in the serverless function. It should match the environment variable `NHOST_WEBHOOK_SECRET`.
```js
export default function async handler(req, res) {
export default async function handler(req, res) {
// Check webhook secret to make sure the request is valid
if (

View File

@@ -1,4 +1,4 @@
{
"label": "Storage",
"position": 5
"position": 7
}

View File

@@ -0,0 +1,3 @@
{
"label": "Auth"
}

View File

@@ -0,0 +1,30 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: signUp()
sidebar_label: signUp()
slug: /reference/javascript/auth/sign-up
description: Use `signUp` to sign up users using email an password.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L106
---
# `signUp()`
Use `signUp` to sign up users using email an password.
```ts
auth.signIn({ email, password }) // email password
```
## Parameters
---
**<span className="parameter-name">params</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">params.</span>password</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>email</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>options</span> | `SignUpOptions` | | |
---

View File

@@ -0,0 +1,54 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: signIn()
sidebar_label: signIn()
slug: /reference/javascript/auth/sign-in
description: Use `signIn` to sign in users using email and password, passwordless (email or sms) or an external provider. `signIn` can be used 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#L166
---
# `signIn()`
Use `signIn` to sign in users using email and password, passwordless
(email or sms) or an external provider.
`signIn` can be used in various ways depending on the parameters.
```ts
signIn({ email, password })
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignInParams`](/reference/docgen/javascript/auth/types/sign-in-params)
---
## Examples
### Sign in with email and password
```ts
signIn({ email, password })
```
### Sign in with an external provider (e.g: Google or Facebook)
```ts
signIn({ provider })
```
### Passwordless sign in with email (magic link)
```ts
signIn({ email }) // [step 1/2] Passwordless sign in with Email (Magic Link)
signIn({ email, otp }) // [step 2/2] Finish passwordless sign in with email (OTP)
```
### Passwordless sign in with SMS
```ts
signIn({ phoneNumber }) // [step 1/2] Passwordless sign in with SMS
signIn({ phoneNumber, otp }) // [step 2/2] Finish passwordless sign in with SMS (OTP)
```

View File

@@ -0,0 +1,24 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: signOut()
sidebar_label: signOut()
slug: /reference/javascript/auth/sign-out
description: Use `signOut` to sign out a user
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L315
---
# `signOut()`
Use `signOut` to sign out a user
```ts
signOut()
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">optional</span> `{ all: boolean }`
---

View File

@@ -0,0 +1,29 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: resetPassword()
sidebar_label: resetPassword()
slug: /reference/javascript/auth/reset-password
description: Use `resetPassword` to reset a user's password.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L342
---
# `resetPassword()`
Use `resetPassword` to reset a user's password.
```ts
auth.resetPassword({ email })
```
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`ResetPasswordParams`](/reference/docgen/javascript/auth/types/reset-password-params)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------ | :--------------- | :------: | :---- |
| <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> | `RedirectOption` | | |
---

View File

@@ -0,0 +1,28 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: changePassword()
sidebar_label: changePassword()
slug: /reference/javascript/auth/change-password
description: Use `changePassword` to change a user's password.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L367
---
# `changePassword()`
Use `changePassword` to change a user's password.
```ts
auth.changePassword({ newPassword })
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`ChangePasswordParams`](/reference/docgen/javascript/auth/types/change-password-params)
| Property | Type | Required | Notes |
| :--------------------------------------------------------------------------------------------- | :------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">params.</span>newPassword</span> | `string` | ✔️ | |
---

View File

@@ -0,0 +1,30 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: sendVerificationEmail()
sidebar_label: sendVerificationEmail()
slug: /reference/javascript/auth/send-verification-email
description: Use `sendVerificationEmail` to send a verification email to the specified email.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L393
---
# `sendVerificationEmail()`
Use `sendVerificationEmail` to send a verification email
to the specified email.
```ts
auth.sendVerificationEmail({ email })
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SendVerificationEmailParams`](/reference/docgen/javascript/auth/types/send-verification-email-params)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------- | :--------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">params.</span>email</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>options</span> | `RedirectOption` | | |
---

View File

@@ -0,0 +1,29 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: changeEmail()
sidebar_label: changeEmail()
slug: /reference/javascript/auth/change-email
description: Use `changeEmail` to change a user's email
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L420
---
# `changeEmail()`
Use `changeEmail` to change a user's email
```ts
auth.changeEmail({ newEmail })
```
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`ChangeEmailParams`](/reference/docgen/javascript/auth/types/change-email-params)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------- | :--------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>newEmail</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>options</span> | `RedirectOption` | | |
---

View File

@@ -0,0 +1,33 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: deanonymize()
sidebar_label: deanonymize()
slug: /reference/javascript/auth/deanonymize
description: Use `deanonymize` to deanonymize a user
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L445
---
# `deanonymize()`
Use `deanonymize` to deanonymize a user
```ts
auth.deanonymize({ signInMethod: 'email-password', email })
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`DeanonymizeParams`](/reference/docgen/javascript/auth/types/deanonymize-params)
| Property | Type | Required | Notes |
| :---------------------------------------------------------------------------------------------- | :------------------------------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">params.</span>email</span> | `string` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>signInMethod</span> | `"email-password"` \| `"passwordless"` | ✔️ | |
| <span className="parameter-name"><span className="light-grey">params.</span>allowedRoles</span> | `Array<string>` | | |
| <span className="parameter-name"><span className="light-grey">params.</span>defaultRole</span> | `string` | | |
| <span className="parameter-name"><span className="light-grey">params.</span>connection</span> | `"email"` \| `"sms"` | | |
| <span className="parameter-name"><span className="light-grey">params.</span>password</span> | `string` | | |
---

View File

@@ -0,0 +1,25 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: onTokenChanged()
sidebar_label: onTokenChanged()
slug: /reference/javascript/auth/on-token-changed
description: Use `onTokenChanged` to add a custom function that will trigger whenever the access and refresh token is changed.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L479
---
# `onTokenChanged()`
Use `onTokenChanged` to add a custom function that will trigger whenever
the access and refresh token is changed.
```ts
auth.onTokenChanged(() => console.log('access token changed'))
```
## Parameters
---
**<span className="parameter-name">fn</span>** <span className="optional-status">required</span> [`OnTokenChangedFunction`](/reference/docgen/javascript/auth/types/on-token-changed-function)
---

View File

@@ -0,0 +1,30 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: onAuthStateChanged()
sidebar_label: onAuthStateChanged()
slug: /reference/javascript/auth/on-auth-state-changed
description: Use `onAuthStateChanged` to add a custom function that will trigger whenever the state of the user changed. Ex from signed in to signed out or vice versa.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L516
---
# `onAuthStateChanged()`
Use `onAuthStateChanged` to add a custom function that will trigger
whenever the state of the user changed. Ex from signed in to signed out or
vice versa.
```ts
auth.onAuthStateChanged((event, session) => {
console.log(
`Auth state changed. State is now ${event} with session: ${session}`
)
})
```
## Parameters
---
**<span className="parameter-name">fn</span>** <span className="optional-status">required</span> [`AuthChangedFunction`](/reference/docgen/javascript/auth/types/auth-changed-function)
---

View File

@@ -0,0 +1,20 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: isAuthenticated()
sidebar_label: isAuthenticated()
slug: /reference/javascript/auth/is-authenticated
description: Use `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#L556
---
# `isAuthenticated()`
Use `isAuthenticated` to check if the user is authenticated or not.
```ts
const = auth.isAuthenticated();
if (authenticated) {
console.log('User is authenticated');
}
```

View File

@@ -0,0 +1,20 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: isAuthenticatedAsync()
sidebar_label: isAuthenticatedAsync()
slug: /reference/javascript/auth/is-authenticated-async
description: Use `isAuthenticatedAsync` to wait and 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#L574
---
# `isAuthenticatedAsync()`
Use `isAuthenticatedAsync` to wait and check if the user is authenticated or not.
```ts
const isAuthenticated = awiat auth.isAuthenticatedAsync();
if (isAuthenticated) {
console.log('User is authenticated');
}
```

View File

@@ -0,0 +1,24 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getAuthenticationStatus()
sidebar_label: getAuthenticationStatus()
slug: /reference/javascript/auth/get-authentication-status
description: Use `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#L601
---
# `getAuthenticationStatus()`
Use `getAuthenticationStatus` to get the authentication status of the user.
```ts
const { isAuthenticated, isLoading } = auth.getAuthenticationStatus()
if (isLoading) {
console.log('Loading...')
}
if (isAuthenticated) {
console.log('User is authenticated')
}
```

View File

@@ -0,0 +1,15 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getJWTToken()
sidebar_label: getJWTToken()
slug: /reference/javascript/auth/get-jwt-token
sidebar_class_name: deprecated
description: No description provided.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L615
---
# `getJWTToken()`
:::caution Deprecated
Use `getAccessToken()` instead.
:::

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getAccessToken()
sidebar_label: getAccessToken()
slug: /reference/javascript/auth/get-access-token
description: Use `getAccessToken` to get the logged in user's access token.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L629
---
# `getAccessToken()`
Use `getAccessToken` to get the logged in user's access token.
```ts
const accessToken = auth.getAccessToken()
```

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getDecodedAccessToken()
sidebar_label: getDecodedAccessToken()
slug: /reference/javascript/auth/get-decoded-access-token
description: Decode the current decoded access token (JWT), or return `null` if the user is not authenticated (no token)
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L637
---
# `getDecodedAccessToken()`
Decode the current decoded access token (JWT), or return `null` if the user is not authenticated (no token)
**`@see`**
{@link https://hasura.io/docs/latest/graphql/core/auth/authentication/jwt/|Hasura documentation}

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getHasuraClaims()
sidebar_label: getHasuraClaims()
slug: /reference/javascript/auth/get-hasura-claims
description: Decode the Hasura claims from the current access token (JWT) located in the `https://hasura.io/jwt/claims` namespace, or return `null` if the user is not authenticated (no token)
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L647
---
# `getHasuraClaims()`
Decode the Hasura claims from the current access token (JWT) located in the `https://hasura.io/jwt/claims` namespace, or return `null` if the user is not authenticated (no token)
**`@see`**
{@link https://hasura.io/docs/latest/graphql/core/auth/authentication/jwt/|Hasura documentation}

View File

@@ -0,0 +1,27 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getHasuraClaim()
sidebar_label: getHasuraClaim()
slug: /reference/javascript/auth/get-hasura-claim
description: Get the value of a given Hasura claim in the current access token (JWT). Returns null if the user is not authenticated, or if the claim is not in the token. Return `null` if the user is not authenticated (no token)
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L657
---
# `getHasuraClaim()`
Get the value of a given Hasura claim in the current access token (JWT). Returns null if the user is not authenticated, or if the claim is not in the token.
Return `null` if the user is not authenticated (no token)
**`@see`**
{@link https://hasura.io/docs/latest/graphql/core/auth/authentication/jwt/|Hasura documentation}
## Parameters
---
**<span className="parameter-name">name</span>** <span className="optional-status">required</span> `string`
name of the variable. Automatically adds the `x-hasura-` prefix if it is missing
---

View File

@@ -0,0 +1,26 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: refreshSession()
sidebar_label: refreshSession()
slug: /reference/javascript/auth/refresh-session
description: Use `refreshSession()` to refresh the current session or refresh the session with an provided `refreshToken`.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L676
---
# `refreshSession()`
Use `refreshSession()` to refresh the current session or refresh the
session with an provided `refreshToken`.
```ts
refreshToken()
refreshToken(refreshToken)
```
## Parameters
---
**<span className="parameter-name">refreshToken</span>** <span className="optional-status">optional</span> `string`
---

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getSession()
sidebar_label: getSession()
slug: /reference/javascript/auth/get-session
description: Use `getSession()` to get the current session.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L719
---
# `getSession()`
Use `getSession()` to get the current session.
```ts
const session = getSession()
```

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: getUser()
sidebar_label: getUser()
slug: /reference/javascript/auth/get-user
description: Use `getUser()` to get the current user.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L734
---
# `getUser()`
Use `getUser()` to get the current user.
```ts
const user = getUser()
```

View File

@@ -0,0 +1,31 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L64
---
# `HasuraAuthClient`
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`NhostAuthConstructorParams`](/reference/docgen/javascript/auth/types/nhost-auth-constructor-params)
| Property | Type | Required | Notes |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------ | :------: | :---------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>url</span> | `string` | ✔️ | |
| <span className="parameter-name deprecated"><span className="light-grey">\_\_namedParameters.</span>autoLogin</span> <span className="deprecation-sign" title="@alias autoSignIn - use autoSignIn instead">⚠️</span> | `boolean` | | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>start</span> | `boolean` | | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>autoSignIn</span> | `boolean` | | When set to true, will parse the url on startup to check if it contains a refresh token to start the session with |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>autoRefreshToken</span> | `boolean` | | When set to true, will automatically refresh token before it expires |
| <span className="parameter-name deprecated"><span className="light-grey">\_\_namedParameters.</span>clientStorageSetter</span> <span className="deprecation-sign" title="Use clientStorage / clientStorageType instead">⚠️</span> | [`StorageSetter`](/reference/docgen/javascript/auth/types/storage-setter) | | Define a way to set information about the refresh token and its exipration date. |
| <span className="parameter-name deprecated"><span className="light-grey">\_\_namedParameters.</span>clientStorageGetter</span> <span className="deprecation-sign" title="Use clientStorage / clientStorageType instead">⚠️</span> | [`StorageGetter`](/reference/docgen/javascript/auth/types/storage-getter) | | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>clientStorage</span> | `ClientStorage` | | Object where the refresh token will be persisted and read locally. |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>clientStorageType</span> | `ClientStorageType` | | Define a way to get information about the refresh token and its exipration date. |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>refreshIntervalTime</span> | `number` | | Time interval until token refreshes, in seconds |
---

View File

@@ -0,0 +1,9 @@
{
"label": "Types",
"position": 1,
"className": "hidden",
"link": {
"type": "generated-index",
"slug": "/reference/docgen/javascript/auth/types"
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: ApiError
sidebar_label: ApiError
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#L27
---
# `ApiError`
## Parameters
---
**<span className="parameter-name">message</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">status</span>** <span className="optional-status">required</span> `number`
---

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,14 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L117
---
# `AuthChangeEvent`
```ts
type AuthChangeEvent = 'SIGNED_IN' | 'SIGNED_OUT'
```

View File

@@ -0,0 +1,17 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L119
---
# `AuthChangedFunction`
```ts
type AuthChangedFunction = () => (
event: AuthChangeEvent,
session: Session | null
) => void
```

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L91
---
# `ChangeEmailParams`
## Parameters
---
**<span className="parameter-name">newEmail</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `RedirectOption`
---

View File

@@ -0,0 +1,18 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L82
---
# `ChangePasswordParams`
## Parameters
---
**<span className="parameter-name">newPassword</span>** <span className="optional-status">required</span> `string`
---

View File

@@ -0,0 +1,38 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L97
---
# `DeanonymizeParams`
## Parameters
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">signInMethod</span>** <span className="optional-status">required</span> `"email-password"` | `"passwordless"`
---
**<span className="parameter-name">allowedRoles</span>** <span className="optional-status">optional</span> `Array<string>`
---
**<span className="parameter-name">defaultRole</span>** <span className="optional-status">optional</span> `string`
---
**<span className="parameter-name">connection</span>** <span className="optional-status">optional</span> `"email"` | `"sms"`
---
**<span className="parameter-name">password</span>** <span className="optional-status">optional</span> `string`
---

View File

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

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: LoginData
sidebar_label: LoginData
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#L123
---
# `LoginData`
## Parameters
---
**<span className="parameter-name">mfa</span>** <span className="optional-status">optional</span> `boolean`
---
**<span className="parameter-name">ticket</span>** <span className="optional-status">optional</span> `string`
---

View File

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

View File

@@ -0,0 +1,82 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L14
---
# `NhostAuthConstructorParams`
## Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name deprecated">autoLogin</span>** <span className="optional-status">optional</span> `boolean`
:::caution Deprecated
@alias autoSignIn - use autoSignIn instead
:::
---
**<span className="parameter-name">start</span>** <span className="optional-status">optional</span> `boolean`
---
**<span className="parameter-name">autoSignIn</span>** <span className="optional-status">optional</span> `boolean`
When set to true, will parse the url on startup to check if it contains a refresh token to start the session with
---
**<span className="parameter-name">autoRefreshToken</span>** <span className="optional-status">optional</span> `boolean`
When set to true, will automatically refresh token before it expires
---
**<span className="parameter-name deprecated">clientStorageSetter</span>** <span className="optional-status">optional</span> [`StorageSetter`](/reference/docgen/javascript/auth/types/storage-setter)
Define a way to set information about the refresh token and its exipration date.
:::caution Deprecated
Use clientStorage / clientStorageType instead
:::
---
**<span className="parameter-name deprecated">clientStorageGetter</span>** <span className="optional-status">optional</span> [`StorageGetter`](/reference/docgen/javascript/auth/types/storage-getter)
:::caution Deprecated
Use clientStorage / clientStorageType instead
:::
---
**<span className="parameter-name">clientStorage</span>** <span className="optional-status">optional</span> `ClientStorage`
Object where the refresh token will be persisted and read locally.
---
**<span className="parameter-name">clientStorageType</span>** <span className="optional-status">optional</span> `ClientStorageType`
Define a way to get information about the refresh token and its exipration date.
**`@default`**
`web`
---
**<span className="parameter-name">refreshIntervalTime</span>** <span className="optional-status">optional</span> `number`
Time interval until token refreshes, in seconds
---

View File

@@ -0,0 +1,14 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L121
---
# `OnTokenChangedFunction`
```ts
type OnTokenChangedFunction = () => (session: Session | null) => void
```

View File

@@ -0,0 +1,25 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L138
---
# `Provider`
```ts
type Provider =
| 'apple'
| 'facebook'
| 'github'
| 'google'
| 'linkedin'
| 'spotify'
| 'twitter'
| 'windowslive'
| 'strava'
| 'gitlab'
| 'bitbucket'
```

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L77
---
# `ResetPasswordParams`
## 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> `RedirectOption`
---

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L86
---
# `SendVerificationEmailParams`
## 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> `RedirectOption`
---

View File

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

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L46
---
# `SignInEmailPasswordParams`
## Parameters
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> `string`
---

View File

@@ -0,0 +1,19 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L70
---
# `SignInParams`
```ts
type SignInParams =
| SignInEmailPasswordParams
| SignInPasswordlessEmailParams
| SignInPasswordlessSmsOtpParams
| SignInPasswordlessSmsParams
| SignInWithProviderOptions
```

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L51
---
# `SignInPasswordlessEmailParams`
## 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> `PasswordlessOptions`
---

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L61
---
# `SignInPasswordlessSmsOtpParams`
## Parameters
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">otp</span>** <span className="optional-status">required</span> `string`
---

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L56
---
# `SignInPasswordlessSmsParams`
## Parameters
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">required</span> `string`
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `PasswordlessOptions`
---

View File

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

View File

@@ -0,0 +1,22 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L65
---
# `SignInWithProviderOptions`
## Parameters
---
**<span className="parameter-name">provider</span>** <span className="optional-status">required</span> [`Provider`](/reference/docgen/javascript/auth/types/provider)
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `ProviderOptions`
---

View File

@@ -0,0 +1,26 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L33
---
# `SignUpEmailPasswordParams`
## Parameters
---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> `string`
---
**<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> `SignUpOptions`
---

View File

@@ -0,0 +1,10 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L39
---
# `SignUpParams`

View File

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

View File

@@ -0,0 +1,16 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: StorageGetter
sidebar_label: StorageGetter
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/storage.ts#L4
---
# `StorageGetter`
```ts
type StorageGetter = () => (
key: string
) => string | null | Promise<string | null>
```

View File

@@ -0,0 +1,17 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
title: StorageSetter
sidebar_label: StorageSetter
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/storage.ts#L5
---
# `StorageSetter`
```ts
type StorageSetter = () => (
key: string,
value: string | null
) => void | Promise<void>
```

View File

@@ -0,0 +1,94 @@
---
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
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#L91
---
# `User`
User information
## Parameters
---
**<span className="parameter-name">id</span>** <span className="optional-status">required</span> `string`
User's unique identifier (uuid)
---
**<span className="parameter-name">createdAt</span>** <span className="optional-status">required</span> `string`
The date-time when the user has been created
---
**<span className="parameter-name">displayName</span>** <span className="optional-status">required</span> `string`
User's display name
---
**<span className="parameter-name">avatarUrl</span>** <span className="optional-status">required</span> `string`
The URL to the user's profile picture
---
**<span className="parameter-name">locale</span>** <span className="optional-status">required</span> `string`
The locale of the user, as a two-characters string
---
**<span className="parameter-name">email</span>** <span className="optional-status">optional</span> `string`
User's email address
---
**<span className="parameter-name">isAnonymous</span>** <span className="optional-status">required</span> `boolean`
Whether or not the user is anonymous
---
**<span className="parameter-name">defaultRole</span>** <span className="optional-status">required</span> `string`
The default role of the user
---
**<span className="parameter-name">roles</span>** <span className="optional-status">required</span> `Array<string>`
The roles assigned to the user
---
**<span className="parameter-name">metadata</span>** <span className="optional-status">required</span> `Record<string, unknown>`
Additional attributes used for user information
---
**<span className="parameter-name">emailVerified</span>** <span className="optional-status">required</span> `boolean`
Is `true` if the user email has not been verified
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">required</span> `null` | `string`
---
**<span className="parameter-name">phoneNumberVerified</span>** <span className="optional-status">required</span> `boolean`
---
**<span className="parameter-name">activeMfaType</span>** <span className="optional-status">required</span> `null` | `"totp"`
---

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