Compare commits
718 Commits
@nhost/rea
...
@nhost/cor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6a229926b | ||
|
|
becde75341 | ||
|
|
b01ba90243 | ||
|
|
1f47c0df4a | ||
|
|
dfbdd340a7 | ||
|
|
3448edb178 | ||
|
|
1c0b9c642a | ||
|
|
62d2eb8c99 | ||
|
|
dc6348df04 | ||
|
|
ac3bdb6ef1 | ||
|
|
e8c095fedc | ||
|
|
d524597557 | ||
|
|
43fb4ada76 | ||
|
|
e44d6af56c | ||
|
|
3a937cae48 | ||
|
|
a60ea128be | ||
|
|
76c9a124c8 | ||
|
|
de558a0150 | ||
|
|
0cacd9f3d2 | ||
|
|
aa7338fcdf | ||
|
|
6da44bf801 | ||
|
|
44cbdf9a68 | ||
|
|
632c1da775 | ||
|
|
bd88ea0912 | ||
|
|
cf38b3d82b | ||
|
|
945adb253d | ||
|
|
afb8a199eb | ||
|
|
6c32e3a3bc | ||
|
|
bd5a6608e9 | ||
|
|
f4eee4b885 | ||
|
|
11a5d1ce71 | ||
|
|
4d8055a4e7 | ||
|
|
be10b474da | ||
|
|
a2d77dad08 | ||
|
|
b4acc44df6 | ||
|
|
19f5ffc5b8 | ||
|
|
42dde0b573 | ||
|
|
4ecd311578 | ||
|
|
1fa1f8080c | ||
|
|
d6be615fc5 | ||
|
|
25f0cb7144 | ||
|
|
ba785da116 | ||
|
|
4402844543 | ||
|
|
f03c458a05 | ||
|
|
2c28cd33be | ||
|
|
ac65fb9dd4 | ||
|
|
3ced63abaa | ||
|
|
12fb5847fb | ||
|
|
ee9ab3f1ef | ||
|
|
d4c2b9870c | ||
|
|
389319582f | ||
|
|
c2f9dcbbbd | ||
|
|
69e701a742 | ||
|
|
25db4fa5dc | ||
|
|
3c70860afa | ||
|
|
0f43b942af | ||
|
|
0ea60a643f | ||
|
|
13c41fe667 | ||
|
|
7692abf98c | ||
|
|
4e0aafbf08 | ||
|
|
5f18361d4a | ||
|
|
09fe573bff | ||
|
|
b7396c3b02 | ||
|
|
aa177677b5 | ||
|
|
c922de7b0c | ||
|
|
38526d7ef2 | ||
|
|
057c8be55a | ||
|
|
4783657986 | ||
|
|
e3606c091f | ||
|
|
d5489b71ec | ||
|
|
a6bc3091a2 | ||
|
|
01a086cd05 | ||
|
|
a8cc2e0c9b | ||
|
|
11f0a1493d | ||
|
|
8eafa19810 | ||
|
|
1e31a9567d | ||
|
|
c6120bfca1 | ||
|
|
4c37cc5bc2 | ||
|
|
66ef8f91a3 | ||
|
|
3f135abed9 | ||
|
|
9f127f3333 | ||
|
|
f9b164baa3 | ||
|
|
73804c8450 | ||
|
|
537259e00b | ||
|
|
94d7703f9b | ||
|
|
c24207eeea | ||
|
|
54057ffe8a | ||
|
|
0e9052e810 | ||
|
|
3a209a8ee3 | ||
|
|
f26d38a0f1 | ||
|
|
0e06259e24 | ||
|
|
ce7d81c6d3 | ||
|
|
3779772c99 | ||
|
|
c657cb85cf | ||
|
|
46dfa9634c | ||
|
|
13f5531b7e | ||
|
|
0ecff620fb | ||
|
|
0470e65a38 | ||
|
|
f031cf9463 | ||
|
|
9f81ba9713 | ||
|
|
2f815e5eb6 | ||
|
|
2cabd2d29a | ||
|
|
d4ee6cc756 | ||
|
|
8208b1c385 | ||
|
|
4c6c094f71 | ||
|
|
3dadc7eab9 | ||
|
|
784041020b | ||
|
|
74758f2c36 | ||
|
|
ea34a3856b | ||
|
|
c9175b76d3 | ||
|
|
1c82522163 | ||
|
|
5794357374 | ||
|
|
3edf41f989 | ||
|
|
44f069a253 | ||
|
|
cb0988cb87 | ||
|
|
27752ca8a7 | ||
|
|
855181abbc | ||
|
|
bc0515bd59 | ||
|
|
271c401b1a | ||
|
|
cbed7cdc72 | ||
|
|
fca620f050 | ||
|
|
5200a4f272 | ||
|
|
19458cf076 | ||
|
|
1a94359a81 | ||
|
|
96001f683a | ||
|
|
dd08453fb5 | ||
|
|
739a3c4563 | ||
|
|
20f3eb9086 | ||
|
|
7b5f8647fb | ||
|
|
486ddec751 | ||
|
|
6475047158 | ||
|
|
14b26bdbc7 | ||
|
|
8e4d790b04 | ||
|
|
d814c7b46b | ||
|
|
5baeddba0b | ||
|
|
0262723329 | ||
|
|
1cf8a58d2c | ||
|
|
b9a19d8251 | ||
|
|
465d248456 | ||
|
|
9e4861f2bb | ||
|
|
4ca738ba56 | ||
|
|
be27ed73e1 | ||
|
|
f4d81d33b9 | ||
|
|
730c7d7b28 | ||
|
|
38de442a7f | ||
|
|
22b8f02504 | ||
|
|
79f268ea08 | ||
|
|
24825adb08 | ||
|
|
96e59f0251 | ||
|
|
9e43c320b9 | ||
|
|
f199ed5474 | ||
|
|
2f00d7f309 | ||
|
|
d35dfb1aa0 | ||
|
|
93f1d1944c | ||
|
|
efd3904966 | ||
|
|
133e682e91 | ||
|
|
72eebe538e | ||
|
|
af313212f7 | ||
|
|
06b29f14fc | ||
|
|
4b960227cf | ||
|
|
a9e2db678d | ||
|
|
4d0738d51c | ||
|
|
1a8160632e | ||
|
|
084ea77355 | ||
|
|
19e5abb4a9 | ||
|
|
fe6514fa14 | ||
|
|
92e9659cc7 | ||
|
|
d5a2a259ce | ||
|
|
6929c7f423 | ||
|
|
d5f56f7e18 | ||
|
|
6ddaf47a4b | ||
|
|
11200934a8 | ||
|
|
653f6b5766 | ||
|
|
653c886ec0 | ||
|
|
ecba8f78ac | ||
|
|
d7b5261f5a | ||
|
|
164e8cac28 | ||
|
|
ad0d56416c | ||
|
|
c47ba63dd9 | ||
|
|
47fb75302f | ||
|
|
2c95ed2d14 | ||
|
|
07eb26ca29 | ||
|
|
90843a9feb | ||
|
|
5e5a9d6efa | ||
|
|
5fc3b643a7 | ||
|
|
a365cadbd7 | ||
|
|
eb93a20bc0 | ||
|
|
ac2cd3f34e | ||
|
|
26cb0de087 | ||
|
|
6d93aa4235 | ||
|
|
8221664f61 | ||
|
|
9396bdbbe3 | ||
|
|
63fd6abd54 | ||
|
|
03d7083d3e | ||
|
|
618e5a8db2 | ||
|
|
3a217fd490 | ||
|
|
4e30b4ee21 | ||
|
|
99bbdc37f9 | ||
|
|
9eb78e06db | ||
|
|
3d7369a19e | ||
|
|
8e03774bc1 | ||
|
|
13937fa026 | ||
|
|
9e57a2bfe6 | ||
|
|
b07a61b8e4 | ||
|
|
f52336f698 | ||
|
|
bf4cc38f8d | ||
|
|
4e7d1fbe90 | ||
|
|
ac214019dc | ||
|
|
5ff6876aea | ||
|
|
d392ed86fb | ||
|
|
2d6e95b8b5 | ||
|
|
3bbe09c4b1 | ||
|
|
648c880445 | ||
|
|
c286a0bbb1 | ||
|
|
745d9a958d | ||
|
|
a47ce29173 | ||
|
|
8c12b4117b | ||
|
|
2f432b5c5f | ||
|
|
afcced2417 | ||
|
|
88fa68e74c | ||
|
|
47b4a3ecf1 | ||
|
|
9095a0f6ae | ||
|
|
4629b952c6 | ||
|
|
f6cfca9288 | ||
|
|
06523f2619 | ||
|
|
f9f05b4cd7 | ||
|
|
242a2a97ef | ||
|
|
62a8a968ec | ||
|
|
8d3c83015c | ||
|
|
f783a2d956 | ||
|
|
a8ea4e273e | ||
|
|
4238a6985c | ||
|
|
494b230868 | ||
|
|
7eb7a337ac | ||
|
|
472dcf2b9c | ||
|
|
ac02b38bed | ||
|
|
37e06e1cf7 | ||
|
|
bb2b1f5078 | ||
|
|
1205a89029 | ||
|
|
d498d5d029 | ||
|
|
182dfb0b22 | ||
|
|
b9c012e263 | ||
|
|
0e112674a4 | ||
|
|
0feac15d10 | ||
|
|
f42b693aa2 | ||
|
|
9687581dc7 | ||
|
|
9bf938a507 | ||
|
|
06bc8856dd | ||
|
|
1c3c7c225f | ||
|
|
42fba7a095 | ||
|
|
3fd9e4601d | ||
|
|
0ff633760a | ||
|
|
6c51571182 | ||
|
|
3825a09aed | ||
|
|
1768b1e069 | ||
|
|
cd7d6ddf11 | ||
|
|
301d9f1710 | ||
|
|
46d54b9f77 | ||
|
|
31671aa7b9 | ||
|
|
fba5c819ce | ||
|
|
9dea25ebe1 | ||
|
|
9b063abe32 | ||
|
|
cea97ba333 | ||
|
|
607c457f9d | ||
|
|
6ea9ed69ce | ||
|
|
6450dcc02e | ||
|
|
0b18704d5b | ||
|
|
0c53f9034e | ||
|
|
0c90292779 | ||
|
|
2333aeb0c8 | ||
|
|
3b686a231b | ||
|
|
136b85c5fb | ||
|
|
3d715d5f95 | ||
|
|
6d5295aeca | ||
|
|
45f6285249 | ||
|
|
01fb999c7d | ||
|
|
8b8412d5fa | ||
|
|
0f1311c5b0 | ||
|
|
6b197aa886 | ||
|
|
0353c6648e | ||
|
|
978b8f8f68 | ||
|
|
3643449a9a | ||
|
|
8e25971e7d | ||
|
|
5cf05c8731 | ||
|
|
4da70abcfb | ||
|
|
2d5203872c | ||
|
|
882f1531ab | ||
|
|
6126d77b01 | ||
|
|
09debbd746 | ||
|
|
604ed6b314 | ||
|
|
2f1fec1dcf | ||
|
|
293bdc3f1c | ||
|
|
70f537841f | ||
|
|
b670dc396b | ||
|
|
88800ba4b4 | ||
|
|
d412669c86 | ||
|
|
8600acb6f2 | ||
|
|
0e2e2344f2 | ||
|
|
8a91673242 | ||
|
|
63f27235be | ||
|
|
7feadbe55d | ||
|
|
98e5680f48 | ||
|
|
8d6ebf9032 | ||
|
|
9feea987e6 | ||
|
|
c2d77bbb7c | ||
|
|
4468654054 | ||
|
|
998291ea9d | ||
|
|
eb46f7d8b7 | ||
|
|
7bc11a1985 | ||
|
|
0fadc0d3da | ||
|
|
814856da0d | ||
|
|
1bf5114d6b | ||
|
|
ed618e0c41 | ||
|
|
8a272b5b72 | ||
|
|
2a0107db55 | ||
|
|
48a90c4f69 | ||
|
|
686d3f1b09 | ||
|
|
6b4b4a5798 | ||
|
|
3a14b90557 | ||
|
|
9871bd42e0 | ||
|
|
7982702e26 | ||
|
|
7e21fe5c2b | ||
|
|
cc4d2ee81a | ||
|
|
a96adbcd9d | ||
|
|
f1ad4a37db | ||
|
|
83b4f7c0eb | ||
|
|
45fd0669ee | ||
|
|
d20add9329 | ||
|
|
58854835e0 | ||
|
|
88a6f3f500 | ||
|
|
8336e53931 | ||
|
|
674fd66922 | ||
|
|
fc94bfdd66 | ||
|
|
f299578d69 | ||
|
|
221032f087 | ||
|
|
72799762c9 | ||
|
|
6464584d71 | ||
|
|
7ca196955a | ||
|
|
90b84ea8c4 | ||
|
|
7ca3c42d23 | ||
|
|
bb10741334 | ||
|
|
50293e7dd8 | ||
|
|
bebe65c4c5 | ||
|
|
e2f5cfe9c0 | ||
|
|
cac64f70c4 | ||
|
|
302e0aa1e0 | ||
|
|
e6a44dc008 | ||
|
|
93cc6920b6 | ||
|
|
4c6e9c7839 | ||
|
|
f4a1eef3d4 | ||
|
|
2766875ff7 | ||
|
|
ea61275404 | ||
|
|
1191cb4fd8 | ||
|
|
f6e1517a7a | ||
|
|
e15cb8b798 | ||
|
|
024f026241 | ||
|
|
736b0512da | ||
|
|
a422a4850d | ||
|
|
a7e67979fe | ||
|
|
1dcbf268db | ||
|
|
5c5d489740 | ||
|
|
a2559e3482 | ||
|
|
bbef104a85 | ||
|
|
7843b1aec1 | ||
|
|
4711bfa8ec | ||
|
|
6f3f8a5020 | ||
|
|
a120bcc8fc | ||
|
|
53e20e87f3 | ||
|
|
9479aeb596 | ||
|
|
c4f11af072 | ||
|
|
747aa96914 | ||
|
|
5682d92592 | ||
|
|
2cf6556499 | ||
|
|
89553fcaf6 | ||
|
|
10beea7246 | ||
|
|
1334ddb693 | ||
|
|
d212128815 | ||
|
|
302c28b202 | ||
|
|
f3f760b987 | ||
|
|
9d9caf9834 | ||
|
|
96cbf023ca | ||
|
|
1ed534cb4a | ||
|
|
dcdee0b426 | ||
|
|
e31f4756b4 | ||
|
|
259e198d80 | ||
|
|
1d10a47414 | ||
|
|
34470ff6e0 | ||
|
|
f30d6779bb | ||
|
|
2a3b2c3af5 | ||
|
|
a0db6b58de | ||
|
|
523d52aa7f | ||
|
|
6e1ee1802d | ||
|
|
51ad1eb355 | ||
|
|
ee2dd8481b | ||
|
|
b8e787cb47 | ||
|
|
2ef5c238c1 | ||
|
|
e084643032 | ||
|
|
5514e81186 | ||
|
|
16f38aa893 | ||
|
|
76c6e8d0d6 | ||
|
|
197d1d5cfc | ||
|
|
abd43d0a8b | ||
|
|
70383c8c80 | ||
|
|
a7d5c85f60 | ||
|
|
bc657251d6 | ||
|
|
5abc362a4d | ||
|
|
7a4c9fa806 | ||
|
|
348318d709 | ||
|
|
4e4600d769 | ||
|
|
44d57d4b89 | ||
|
|
84ba29dd7f | ||
|
|
b5f7f7fe5f | ||
|
|
7116a4df8a | ||
|
|
7e4c52dbd1 | ||
|
|
446dc01bde | ||
|
|
a1989c51f8 | ||
|
|
1383de558a | ||
|
|
d828107f74 | ||
|
|
4a1650cb35 | ||
|
|
913651d440 | ||
|
|
6af2d52666 | ||
|
|
da7c2a2362 | ||
|
|
4a7940b59a | ||
|
|
ddda8bb031 | ||
|
|
b146e60f7e | ||
|
|
5591789840 | ||
|
|
fac5ddb866 | ||
|
|
f2fab8dac2 | ||
|
|
6e3f2c382d | ||
|
|
05385d01dc | ||
|
|
7ea72b799c | ||
|
|
4936261cee | ||
|
|
80902b9cf1 | ||
|
|
c3af490e67 | ||
|
|
6a24e32857 | ||
|
|
0ebddd30cf | ||
|
|
d019f1de21 | ||
|
|
3abb57f510 | ||
|
|
4a2ad15f14 | ||
|
|
ca45b612c9 | ||
|
|
27ee9b721f | ||
|
|
2a373dd50f | ||
|
|
a91f714c4c | ||
|
|
3b4d89d5b6 | ||
|
|
16d1b26298 | ||
|
|
86d8beb044 | ||
|
|
17f870f31f | ||
|
|
fbfffe25ca | ||
|
|
87a472b27e | ||
|
|
779b03b0b2 | ||
|
|
9d933b6ffd | ||
|
|
34d643868d | ||
|
|
0023f5f6f6 | ||
|
|
48f5c8bfb9 | ||
|
|
f398b2e3ac | ||
|
|
11795abe61 | ||
|
|
e2eafc9ee1 | ||
|
|
4a5a2fac43 | ||
|
|
4a908af7ef | ||
|
|
a7b6498053 | ||
|
|
7f418a7559 | ||
|
|
8493129750 | ||
|
|
26b817c5fa | ||
|
|
e61ea19421 | ||
|
|
401f2cb540 | ||
|
|
6363a289fb | ||
|
|
f09037ccef | ||
|
|
a4dea7339e | ||
|
|
50474810bf | ||
|
|
f356c7176b | ||
|
|
cb99c6d989 | ||
|
|
7cef49bb02 | ||
|
|
6eaa5c7920 | ||
|
|
5485d48ce5 | ||
|
|
64574ee892 | ||
|
|
d3d38b2631 | ||
|
|
023afae3cd | ||
|
|
19d2242918 | ||
|
|
ead2c16aac | ||
|
|
a5f02e8056 | ||
|
|
aeb85a1e01 | ||
|
|
821912e23e | ||
|
|
8608a78eaf | ||
|
|
2d2da4f6e0 | ||
|
|
19d7262b05 | ||
|
|
1c750bd652 | ||
|
|
8a3943a942 | ||
|
|
62385a7866 | ||
|
|
9e21de3819 | ||
|
|
c101a26ce5 | ||
|
|
21fa83d115 | ||
|
|
522839d8f7 | ||
|
|
87aad599f3 | ||
|
|
5b097e635d | ||
|
|
bfdcacd5a3 | ||
|
|
dcb9055475 | ||
|
|
6f0bf3d67c | ||
|
|
3c96c561a0 | ||
|
|
3d319364f3 | ||
|
|
80468ac3ac | ||
|
|
d03653f1fd | ||
|
|
a7f3599fb1 | ||
|
|
c789102189 | ||
|
|
b638173181 | ||
|
|
d65df02adb | ||
|
|
5dff7ad5d3 | ||
|
|
9263bea2ae | ||
|
|
4f994b536e | ||
|
|
4f9287562e | ||
|
|
58f82f9aad | ||
|
|
c907021313 | ||
|
|
12a218b12c | ||
|
|
196156ff93 | ||
|
|
28ca032f70 | ||
|
|
38462c45b6 | ||
|
|
8e03ed43b7 | ||
|
|
333292ab89 | ||
|
|
b4d52debff | ||
|
|
287e48a51a | ||
|
|
9370e06b68 | ||
|
|
d5b775c630 | ||
|
|
ea8e1df8da | ||
|
|
20005986a9 | ||
|
|
ced8100168 | ||
|
|
36d6db526c | ||
|
|
fb53e94193 | ||
|
|
c1d722390f | ||
|
|
165ff16cdc | ||
|
|
111d6d99a1 | ||
|
|
dabbb6ec0d | ||
|
|
7174aa1384 | ||
|
|
e3ef4a0188 | ||
|
|
82ac9b9684 | ||
|
|
bd494434d9 | ||
|
|
0ee47821cd | ||
|
|
0dc01a99e9 | ||
|
|
3a04c272ee | ||
|
|
0e782b8e99 | ||
|
|
3e9d864899 | ||
|
|
dd38973515 | ||
|
|
9ab5b7a927 | ||
|
|
406132902d | ||
|
|
7503b0d840 | ||
|
|
d42cb698c1 | ||
|
|
73e4702a1a | ||
|
|
93cc6bc1cf | ||
|
|
db955e3b71 | ||
|
|
c944ef11e4 | ||
|
|
d9e2e41efd | ||
|
|
1219356c8f | ||
|
|
2eb7467afa | ||
|
|
12f42319f9 | ||
|
|
bbc9c6131b | ||
|
|
c16be7fb05 | ||
|
|
872e44ebe0 | ||
|
|
a898a19ffa | ||
|
|
dbc10e6205 | ||
|
|
b04d01f022 | ||
|
|
29d0c7250f | ||
|
|
b59f571048 | ||
|
|
64cc648d19 | ||
|
|
5f05d46c3d | ||
|
|
bfcabe8e73 | ||
|
|
233a6e4bd6 | ||
|
|
577792b3d5 | ||
|
|
3ba026e7d7 | ||
|
|
fa740867c5 | ||
|
|
30f4e53181 | ||
|
|
a417c8468a | ||
|
|
2dc020a676 | ||
|
|
f49d14cc1b | ||
|
|
5a141453f0 | ||
|
|
788bb9c90d | ||
|
|
09fa429125 | ||
|
|
c505281250 | ||
|
|
7ea5523375 | ||
|
|
c5cd6b1d7b | ||
|
|
2d1185f7ec | ||
|
|
c6d4c5e943 | ||
|
|
0a536ccfda | ||
|
|
4107287c8e | ||
|
|
651c481874 | ||
|
|
90a7999346 | ||
|
|
b54b0c0743 | ||
|
|
d07373d255 | ||
|
|
73c8fa1fb2 | ||
|
|
67f2622642 | ||
|
|
780f95d950 | ||
|
|
cb84db7688 | ||
|
|
67d76ebbb6 | ||
|
|
48af3fb4d1 | ||
|
|
e5adc515d4 | ||
|
|
5f4b16f2f9 | ||
|
|
be50d4ad1d | ||
|
|
d40afbb744 | ||
|
|
7e0035a856 | ||
|
|
2fec74e501 | ||
|
|
e94b28b3bc | ||
|
|
f591f76256 | ||
|
|
58fb955dc6 | ||
|
|
5826baa57e | ||
|
|
3c789629a4 | ||
|
|
f472d42ae9 | ||
|
|
9993bea7ab | ||
|
|
6f33fc6ce6 | ||
|
|
b6858c5638 | ||
|
|
9b01c3ba93 | ||
|
|
fcfd6a9c13 | ||
|
|
e4daefe637 | ||
|
|
59a5fe97b1 | ||
|
|
a0bcbb6269 | ||
|
|
1ec1004507 | ||
|
|
756d996096 | ||
|
|
c0f1d03c3c | ||
|
|
af55789d07 | ||
|
|
cb28676895 | ||
|
|
939a3d1090 | ||
|
|
0163d0588b | ||
|
|
c4124f22b0 | ||
|
|
7188b0971c | ||
|
|
6ac969320c | ||
|
|
414bc2e75b | ||
|
|
6862e1e24d | ||
|
|
4b9deaa2f7 | ||
|
|
cf366cef35 | ||
|
|
00d041f6b4 | ||
|
|
da06fef64e | ||
|
|
09be9582f8 | ||
|
|
6b26fed8ae | ||
|
|
5a62c66fc4 | ||
|
|
17e0e6d116 | ||
|
|
938000e61b | ||
|
|
d700107222 | ||
|
|
7f1b8a5881 | ||
|
|
7fd5f0fedf | ||
|
|
bf551fe705 | ||
|
|
69d9e40187 | ||
|
|
fc5b18fdf0 | ||
|
|
fa3eb980a0 | ||
|
|
efad3a2b08 | ||
|
|
563fa4fe9b | ||
|
|
6f0a30059a | ||
|
|
47cda5d716 | ||
|
|
3f625ce9e1 | ||
|
|
38d2609249 | ||
|
|
030243cd45 | ||
|
|
c1905243d0 | ||
|
|
37627cc50e | ||
|
|
009f68d500 | ||
|
|
b752cc2be8 | ||
|
|
72fc7d4e44 | ||
|
|
d20bfe3431 | ||
|
|
80ef14e50a | ||
|
|
543ea2a0e7 | ||
|
|
6764d476fd | ||
|
|
7bed0eadc9 | ||
|
|
c7644ace34 | ||
|
|
49cdb2843e | ||
|
|
6f45856c46 | ||
|
|
dcf5e28e06 | ||
|
|
5c10169972 | ||
|
|
abdbbe6fcc | ||
|
|
61e719eea0 | ||
|
|
208bdbba2d | ||
|
|
cd62e1e833 | ||
|
|
1dfb11d7e8 | ||
|
|
8b5c4ed443 | ||
|
|
6bd5c96ed5 | ||
|
|
6b8762a62e | ||
|
|
ddeff7cbd6 | ||
|
|
ed952c1251 | ||
|
|
34e73f18bd | ||
|
|
84262a24f1 | ||
|
|
ec2a88d69c | ||
|
|
fe1049df6b | ||
|
|
a924d21815 | ||
|
|
4405535d4a | ||
|
|
479a2ed08d | ||
|
|
af15771517 | ||
|
|
c066ea5b75 | ||
|
|
80e42b939b | ||
|
|
3ea6f685e2 | ||
|
|
ac77f427c3 | ||
|
|
0f95ee5bb4 | ||
|
|
47406d3617 | ||
|
|
125bc9a749 | ||
|
|
18ac56d097 | ||
|
|
366fc2403d | ||
|
|
3db941eb46 | ||
|
|
42a7aaf916 | ||
|
|
2443399cdc | ||
|
|
b8f4b75b0c | ||
|
|
5227c84820 | ||
|
|
de81942fb2 | ||
|
|
5a60c5cb29 | ||
|
|
752812a321 | ||
|
|
0af2337499 | ||
|
|
b238bd7b6b | ||
|
|
f87403108f | ||
|
|
20f8fe9eb4 | ||
|
|
6f6044c49c | ||
|
|
4ffb14b240 | ||
|
|
f9854b15c4 | ||
|
|
cf206a4d1c | ||
|
|
eae285bfc9 | ||
|
|
51a115eaf7 | ||
|
|
da9c043fb5 | ||
|
|
e821af279a | ||
|
|
1d3469a455 | ||
|
|
9ff668d26c | ||
|
|
8f100e6e56 | ||
|
|
42dc93100c | ||
|
|
04aadb6fa4 | ||
|
|
e08a08973d | ||
|
|
3b11caf3bc | ||
|
|
049f67e54a | ||
|
|
6da1f90bc3 | ||
|
|
59fd68dee3 |
13
.github/CODEOWNERS
vendored
13
.github/CODEOWNERS
vendored
@@ -1,8 +1,13 @@
|
||||
# Documentation
|
||||
# https://help.github.com/en/articles/about-code-owners
|
||||
|
||||
/packages @plmercereau
|
||||
/packages @plmercereau @szilarddoro
|
||||
/packages/docgen @szilarddoro
|
||||
/.github/workflows @plmercereau
|
||||
/docs/ @guicurcio
|
||||
/examples/ @plmercereau @guicurcio @FuzzyReason
|
||||
/packages/stripe-graphql-js @elitan
|
||||
/.github @plmercereau
|
||||
/docs/ @guicurcio @elitan
|
||||
/config/ @plmercereau @szilarddoro
|
||||
/examples/ @plmercereau
|
||||
/examples/codegen-react-apollo @elitan @plmercereau
|
||||
/examples/codegen-react-query @elitan @plmercereau
|
||||
/examples/react-apollo-crm @elitan @plmercereau
|
||||
|
||||
10
.github/actions/install-dependencies/action.yaml
vendored
10
.github/actions/install-dependencies/action.yaml
vendored
@@ -3,9 +3,10 @@ description: 'Install Node dependencies with pnpm'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v2.2.1
|
||||
- uses: pnpm/action-setup@v2.2.3
|
||||
with:
|
||||
version: 6.32.14
|
||||
version: 7.9.1
|
||||
run_install: false
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
@@ -15,3 +16,8 @@ runs:
|
||||
- shell: bash
|
||||
name: Install packages
|
||||
run: pnpm install --frozen-lockfile
|
||||
# * Build all Nhost packages as they are all supposed to be tested.
|
||||
# * They are reused through the Turborepo cache
|
||||
- shell: bash
|
||||
name: Build packages
|
||||
run: pnpm build
|
||||
|
||||
18
.github/workflows/changesets.yaml
vendored
18
.github/workflows/changesets.yaml
vendored
@@ -5,7 +5,6 @@ on:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'templates/**'
|
||||
- 'examples/**'
|
||||
- 'assets/**'
|
||||
- '**.md'
|
||||
@@ -22,20 +21,9 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: pnpm/action-setup@v2.1.0
|
||||
with:
|
||||
version: 6.32.3
|
||||
# run_install: true
|
||||
- name: Use Node.js 17
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17.8.0'
|
||||
cache: 'pnpm'
|
||||
- name: Pick the right npm version
|
||||
# * See: https://github.com/pnpm/pnpm/issues/4348
|
||||
run: npm install --global npm@8.4
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
# * Install Node and dependencies
|
||||
- name: Install Node and dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
- name: Create PR or Publish release
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
|
||||
19
.github/workflows/tests.yaml
vendored
19
.github/workflows/tests.yaml
vendored
@@ -5,7 +5,6 @@ on:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'templates/**'
|
||||
- 'assets/**'
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
@@ -14,7 +13,6 @@ on:
|
||||
types: [opened, synchronize]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'templates/**'
|
||||
- 'assets/**'
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
@@ -31,10 +29,6 @@ jobs:
|
||||
# * Install Node and dependencies. Package downloads will be cached for the next jobs.
|
||||
- name: Install Node and dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
# * Build all Nhost packages as they are all supposed to be tested.
|
||||
# * They will be reused through the Turborepo cache
|
||||
- name: Build packages
|
||||
run: pnpm build
|
||||
# * List packagesthat has an `e2e` script, except the root, and return an array of their name and path
|
||||
- name: List examples with an e2e script
|
||||
id: set-matrix
|
||||
@@ -64,15 +58,24 @@ jobs:
|
||||
# * Install Node and dependencies. Package dependencies won't be downloaded again as they have been cached by the `build` job.
|
||||
- name: Install Node and dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
# TODO ugly - check CYPRESS_CACHE_FOLDER
|
||||
- name: Install Cypress
|
||||
run: pnpm install -w cypress
|
||||
# * Run the `ci` script of the current package of the matrix. Dependencies build is cached by Turborepo
|
||||
- name: Run e2e test
|
||||
run: pnpm run e2e -- --filter="${{ matrix.package.name }}"
|
||||
run: pnpm --filter="${{ matrix.package.name }}" run e2e
|
||||
- id: file-name
|
||||
if: ${{ failure() }}
|
||||
name: Tranform package name into a valid file name
|
||||
run: |
|
||||
PACKAGE_FILE_NAME=$(echo "${{ matrix.package.name }}" | sed 's/@//g; s/\//-/g')
|
||||
echo "::set-output name=fileName::$PACKAGE_FILE_NAME"
|
||||
# * Run this step only if the previous step failed, and some Cypress screenshots/videos exist
|
||||
- name: Upload Cypress videos and screenshots
|
||||
if: ${{ failure() && hashFiles(format('{0}/cypress/screenshots/**', matrix.package.path), format('{0}/cypress/videos/**', matrix.package.path)) != ''}}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cypress-${{ matrix.package.name }}
|
||||
name: cypress-${{ steps.file-name.outputs.fileName }}
|
||||
path: |
|
||||
${{format('{0}/cypress/screenshots/**', matrix.package.path)}}
|
||||
${{format('{0}/cypress/videos/**', matrix.package.path)}}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,7 +12,6 @@ logs/
|
||||
.idea/
|
||||
.npm/
|
||||
.vagrant/
|
||||
/.vscode/
|
||||
.eslintcache
|
||||
.yarnclean
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"packages/(docgen|hasura-auth-js|hasura-storage-js|nextjs|nhost-js|react|core|vue)/src/**/*.{js,ts,jsx,tsx}": [
|
||||
"pnpm docgen",
|
||||
"git add docs"
|
||||
]
|
||||
}
|
||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": true
|
||||
}
|
||||
}
|
||||
183
README.md
183
README.md
@@ -12,7 +12,7 @@
|
||||
<span> • </span>
|
||||
<a href="https://nhost.io/blog">Blog</a>
|
||||
<span> • </span>
|
||||
<a href="https://twitter.com/nhostio">Twitter</a>
|
||||
<a href="https://twitter.com/nhost">Twitter</a>
|
||||
<span> • </span>
|
||||
<a href="https://nhost.io/discord">Discord</a>
|
||||
<br />
|
||||
@@ -32,7 +32,7 @@ Nhost consists of open source software:
|
||||
- Database: [PostgreSQL](https://www.postgresql.org/)
|
||||
- Instant GraphQL API: [Hasura](https://hasura.io/)
|
||||
- Authentication: [Hasura Auth](https://github.com/nhost/hasura-auth/)
|
||||
- Storage: [Hasura Storage](https://hub.docker.com/r/nhost/hasura-storage)
|
||||
- Storage: [Hasura Storage](https://github.com/nhost/hasura-storage)
|
||||
- Serverless Functions: Node.js (JavaScript and TypeScript)
|
||||
- [Nhost CLI](https://docs.nhost.io/reference/cli) for local development
|
||||
|
||||
@@ -67,7 +67,8 @@ Install the `@nhost/nhost-js` package and start build your app:
|
||||
import { NhostClient } from '@nhost/nhost-js'
|
||||
|
||||
const nhost = new NhostClient({
|
||||
backendUrl: 'https://awesome-app.nhost.run'
|
||||
subdomain: '<your-subdomain>',
|
||||
region: '<your-region>'
|
||||
})
|
||||
|
||||
await nhost.auth.signIn({ email: 'elon@musk.com', password: 'spaceX' })
|
||||
@@ -86,12 +87,12 @@ await nhost.graphql.request(`{
|
||||
Nhost is frontend agnostic, which means Nhost works with all frontend frameworks.
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/nhost/nhost/tree/main/templates/web/nextjs-apollo"><img src="assets/nextjs.svg"/></a>
|
||||
<a href="https://github.com/nhost/nhost/tree/main/examples/nuxt-apollo"><img src="assets/nuxtjs.svg"/></a>
|
||||
<a href="https://github.com/nhost/nhost/tree/main/templates/web/react-apollo"><img src="assets/react.svg"/></a>
|
||||
<img src="assets/react-native.svg"/>
|
||||
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/svelte.svg"/></a>
|
||||
<a href="https://github.com/nhost/nhost/tree/main/packages/nhost-js"><img src="assets/vuejs.svg"/></a>
|
||||
<a href="https://docs.nhost.io/platform/quickstarts/nextjs"><img src="assets/nextjs.svg"/></a>
|
||||
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/nuxtjs.svg"/></a>
|
||||
<a href="https://docs.nhost.io/platform/quickstarts/react"><img src="assets/react.svg"/></a>
|
||||
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/react-native.svg"/></a>
|
||||
<a href="https://docs.nhost.io/reference/javascript"><img src="assets/svelte.svg"/></a>
|
||||
<a href="https://docs.nhost.io/platform/quickstarts/vue"><img src="assets/vuejs.svg"/></a>
|
||||
</div>
|
||||
|
||||
# Resources
|
||||
@@ -115,6 +116,10 @@ Also, follow Nhost on [GitHub Discussions](https://github.com/nhost/nhost/discus
|
||||
|
||||
This repository, and most of our other open source projects, are licensed under the MIT license.
|
||||
|
||||
<a href="https://runacap.com/ross-index/q1-2022/" target="_blank" rel="noopener">
|
||||
<img style="width: 260px; height: 56px" src="https://runacap.com/wp-content/uploads/2022/06/ROSS_badge_black_Q1_2022.svg" alt="ROSS Index - Fastest Growing Open-Source Startups in Q1 2022 | Runa Capital" width="260" height="56" />
|
||||
</a>
|
||||
|
||||
### How to contribute
|
||||
|
||||
Here are some ways of contributing to making Nhost better:
|
||||
@@ -143,10 +148,10 @@ Here are some ways of contributing to making Nhost better:
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/szilarddoro">
|
||||
<img src="https://avatars.githubusercontent.com/u/310881?v=4" width="100;" alt="szilarddoro"/>
|
||||
<a href="https://github.com/nunopato">
|
||||
<img src="https://avatars.githubusercontent.com/u/1523504?v=4" width="100;" alt="nunopato"/>
|
||||
<br />
|
||||
<sub><b>Szilárd Dóró</b></sub>
|
||||
<sub><b>Nuno Pato</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
@@ -157,26 +162,26 @@ Here are some ways of contributing to making Nhost better:
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/nunopato">
|
||||
<img src="https://avatars.githubusercontent.com/u/1523504?v=4" width="100;" alt="nunopato"/>
|
||||
<a href="https://github.com/szilarddoro">
|
||||
<img src="https://avatars.githubusercontent.com/u/310881?v=4" width="100;" alt="szilarddoro"/>
|
||||
<br />
|
||||
<sub><b>Nuno Pato</b></sub>
|
||||
<sub><b>Szilárd Dóró</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/subatuba21">
|
||||
<img src="https://avatars.githubusercontent.com/u/34824571?v=4" width="100;" alt="subatuba21"/>
|
||||
<br />
|
||||
<sub><b>Subha Das</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/guicurcio">
|
||||
<img src="https://avatars.githubusercontent.com/u/20285232?v=4" width="100;" alt="guicurcio"/>
|
||||
<br />
|
||||
<sub><b>Guido Curcio</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/subatuba21">
|
||||
<img src="https://avatars.githubusercontent.com/u/34824571?v=4" width="100;" alt="subatuba21"/>
|
||||
<br />
|
||||
<sub><b>Subha Das</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/sebagudelo">
|
||||
@@ -199,6 +204,21 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Pratim</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/chrtze">
|
||||
<img src="https://avatars.githubusercontent.com/u/3797215?v=4" width="100;" alt="chrtze"/>
|
||||
<br />
|
||||
<sub><b>Christopher Möller</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/GavanWilhite">
|
||||
<img src="https://avatars.githubusercontent.com/u/2085119?v=4" width="100;" alt="GavanWilhite"/>
|
||||
<br />
|
||||
<sub><b>Gavan Wilhite</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/FuzzyReason">
|
||||
<img src="https://avatars.githubusercontent.com/u/62517920?v=4" width="100;" alt="FuzzyReason"/>
|
||||
@@ -206,14 +226,20 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Vadim Smirnov</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/ejkkan">
|
||||
<img src="https://avatars.githubusercontent.com/u/32518962?v=4" width="100;" alt="ejkkan"/>
|
||||
<br />
|
||||
<sub><b>Erik Magnusson</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/macmac49">
|
||||
<img src="https://avatars.githubusercontent.com/u/831190?v=4" width="100;" alt="macmac49"/>
|
||||
<br />
|
||||
<sub><b>Macmac49</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/subhendukundu">
|
||||
<img src="https://avatars.githubusercontent.com/u/20059141?v=4" width="100;" alt="subhendukundu"/>
|
||||
@@ -228,20 +254,14 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Christian Gambardella</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/chrtze">
|
||||
<img src="https://avatars.githubusercontent.com/u/3797215?v=4" width="100;" alt="chrtze"/>
|
||||
<br />
|
||||
<sub><b>Christopher Möller</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/dbarrosop">
|
||||
<img src="https://avatars.githubusercontent.com/u/6246622?v=4" width="100;" alt="dbarrosop"/>
|
||||
<br />
|
||||
<sub><b>David Barroso</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/hajek-raven">
|
||||
<img src="https://avatars.githubusercontent.com/u/7288737?v=4" width="100;" alt="hajek-raven"/>
|
||||
@@ -250,13 +270,12 @@ Here are some ways of contributing to making Nhost better:
|
||||
</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"/>
|
||||
<a href="https://github.com/MelodicCrypter">
|
||||
<img src="https://avatars.githubusercontent.com/u/18341500?v=4" width="100;" alt="MelodicCrypter"/>
|
||||
<br />
|
||||
<sub><b>Gavan Wilhite</b></sub>
|
||||
<sub><b>Hugh Caluscusin</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/jerryjappinen">
|
||||
<img src="https://avatars.githubusercontent.com/u/1101002?v=4" width="100;" alt="jerryjappinen"/>
|
||||
@@ -264,6 +283,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Jerry Jäppinen</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mdp18">
|
||||
<img src="https://avatars.githubusercontent.com/u/11698527?v=4" width="100;" alt="mdp18"/>
|
||||
<br />
|
||||
<sub><b>Max</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/mustafa-hanif">
|
||||
<img src="https://avatars.githubusercontent.com/u/30019262?v=4" width="100;" alt="mustafa-hanif"/>
|
||||
@@ -277,6 +303,14 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Nicolas Bourdin</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/piromsurang">
|
||||
<img src="https://avatars.githubusercontent.com/u/17776837?v=4" width="100;" alt="piromsurang"/>
|
||||
<br />
|
||||
<sub><b>Piromsurang Rungserichai</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Savinvadim1312">
|
||||
@@ -285,6 +319,20 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Savin Vadim</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Svarto">
|
||||
<img src="https://avatars.githubusercontent.com/u/24279217?v=4" width="100;" alt="Svarto"/>
|
||||
<br />
|
||||
<sub><b>Svarto</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/muttenzer">
|
||||
<img src="https://avatars.githubusercontent.com/u/49474412?v=4" width="100;" alt="muttenzer"/>
|
||||
<br />
|
||||
<sub><b>Muttenzer</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/ahmic">
|
||||
<img src="https://avatars.githubusercontent.com/u/13452362?v=4" width="100;" alt="ahmic"/>
|
||||
@@ -314,6 +362,20 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Colin Broderick</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/d4g0">
|
||||
<img src="https://avatars.githubusercontent.com/u/34744883?v=4" width="100;" alt="d4g0"/>
|
||||
<br />
|
||||
<sub><b>Dago</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/dminkovsky">
|
||||
<img src="https://avatars.githubusercontent.com/u/218725?v=4" width="100;" alt="dminkovsky"/>
|
||||
<br />
|
||||
<sub><b>Dmitry Minkovsky</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/dohomi">
|
||||
<img src="https://avatars.githubusercontent.com/u/489221?v=4" width="100;" alt="dohomi"/>
|
||||
@@ -327,7 +389,8 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Gaurav Agrawal</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/alveshelio">
|
||||
<img src="https://avatars.githubusercontent.com/u/8176422?v=4" width="100;" alt="alveshelio"/>
|
||||
@@ -341,13 +404,12 @@ 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/MelodicCrypter">
|
||||
<img src="https://avatars.githubusercontent.com/u/18341500?v=4" width="100;" alt="MelodicCrypter"/>
|
||||
<a href="https://github.com/eltociear">
|
||||
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="100;" alt="eltociear"/>
|
||||
<br />
|
||||
<sub><b>Hugh Caluscusin</b></sub>
|
||||
<sub><b>Ikko Ashimine</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
@@ -364,6 +426,14 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Leo Thorp</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/LucasBois1">
|
||||
<img src="https://avatars.githubusercontent.com/u/44686060?v=4" width="100;" alt="LucasBois1"/>
|
||||
<br />
|
||||
<sub><b>Lucas Bois</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/MarcelloTheArcane">
|
||||
<img src="https://avatars.githubusercontent.com/u/21159570?v=4" width="100;" alt="MarcelloTheArcane"/>
|
||||
@@ -371,6 +441,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Max Reynolds</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/nachoaldamav">
|
||||
<img src="https://avatars.githubusercontent.com/u/22749943?v=4" width="100;" alt="nachoaldamav"/>
|
||||
<br />
|
||||
<sub><b>Nacho Aldama</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"/>
|
||||
@@ -384,14 +461,28 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Quentin Decré</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/altschuler">
|
||||
<img src="https://avatars.githubusercontent.com/u/956928?v=4" width="100;" alt="altschuler"/>
|
||||
<br />
|
||||
<sub><b>Simon Altschuler</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/atapas">
|
||||
<img src="https://avatars.githubusercontent.com/u/3633137?v=4" width="100;" alt="atapas"/>
|
||||
<br />
|
||||
<sub><b>Tapas Adhikary</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/uulwake">
|
||||
<img src="https://avatars.githubusercontent.com/u/22399181?v=4" width="100;" alt="uulwake"/>
|
||||
<br />
|
||||
<sub><b>Ulrich Wake</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/komninoschat">
|
||||
|
||||
@@ -20,7 +20,8 @@ module.exports = {
|
||||
'tests/**/*.ts',
|
||||
'tests/**/*.d.ts'
|
||||
],
|
||||
plugins: ['@typescript-eslint', 'simple-import-sort'],
|
||||
plugins: ['@typescript-eslint', 'simple-import-sort', 'cypress'],
|
||||
extends: ['plugin:cypress/recommended'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module'
|
||||
@@ -60,13 +61,5 @@ module.exports = {
|
||||
allowAnonymousFunction: true
|
||||
}
|
||||
]
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.test.js', '*.spec.js', '*.test.ts', '*.spec.ts', '*.cy.js', '*.cy.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-expressions': 'off'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
const base = require('./.eslint.base')
|
||||
module.exports = {
|
||||
...base,
|
||||
extends: ['react-app', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
|
||||
extends: [
|
||||
...base.extends,
|
||||
'react-app',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:react/jsx-runtime'
|
||||
],
|
||||
plugins: [...base.plugins, 'react', 'react-hooks']
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const base = require('./.eslint.base')
|
||||
module.exports = {
|
||||
...base,
|
||||
extends: ['plugin:import/recommended', 'plugin:import/typescript'],
|
||||
extends: [...base.extends, 'plugin:import/recommended', 'plugin:import/typescript'],
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
...base.parserOptions,
|
||||
|
||||
4
config/.husky/pre-commit
Executable file
4
config/.husky/pre-commit
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged --config config/.lintstagedrc.js
|
||||
8
config/.lintstagedrc.js
Normal file
8
config/.lintstagedrc.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
'packages/(docgen|hasura-auth-js|hasura-storage-js|nextjs|nhost-js|react|core|vue)/src/**/*.{js,ts,jsx,tsx}':
|
||||
['pnpm docgen', 'git add docs'],
|
||||
'(nhost-cloud.yaml|**/nhost/config.yaml)': () => [
|
||||
'pnpm sync-versions',
|
||||
"git add ':(glob)**/nhost/config.yaml'"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,23 @@
|
||||
# @nhost/docs
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ba785da1: Bump dependencies versions
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- eb46f7d8: Use port 1337 if no port is specified when using "localhost" as `subdomain`.
|
||||
|
||||
## 0.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 747aa969: fix: added twitch and discord as provider
|
||||
|
||||
## 0.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -12,11 +12,11 @@ The following email templates are available:
|
||||
- **signin-passwordless** - Magic Link
|
||||
- **password-reset** - Reset password
|
||||
|
||||
Changing email templates is only available for apps on the [Pro and Enterprise plan](https://nhost.io/pricing).
|
||||
Changing email templates is only available for projects on the [Pro and Enterprise plan](https://nhost.io/pricing).
|
||||
|
||||
## Update Email Templates
|
||||
|
||||
Your app must be connected to a GitHub repository using the [GitHub Integration](/platform/github-integration) to be able to change the email templates.
|
||||
Your project must be connected to a GitHub repository using the [GitHub Integration](/platform/github-integration) to be able to change the email templates.
|
||||
|
||||
Email templates are automatically deployed during a deployment, just like database migrations, Hasura metadata, and Serverless Functions.
|
||||
|
||||
@@ -29,7 +29,7 @@ The email templates should be provided as body.html and subject.txt files in thi
|
||||
**Example:** Email templates for `en` (English) and `es` (Spanish):
|
||||
|
||||
```txt
|
||||
my-nhost-app/
|
||||
my-nhost-project/
|
||||
└── nhost/
|
||||
├── config.yaml
|
||||
├── emails/
|
||||
@@ -70,7 +70,7 @@ As you see, the format is:
|
||||
nhost/emails/{two-letter-language-code}/{email-template}/[subject.txt, body.html]
|
||||
```
|
||||
|
||||
Default templates for English (`en`) and French (`fr`) are automatically generated when the app is initialized with the [CLI](/platform/cli).
|
||||
Default templates for English (`en`) and French (`fr`) are automatically generated when the project is initialized with the [CLI](/platform/cli).
|
||||
|
||||
## Languages
|
||||
|
||||
|
||||
@@ -7,16 +7,20 @@ image: /img/og/platform/authentication.png
|
||||
|
||||
Nhost Authentication is a ready-to-use authentication service that is integrated with the [GraphQL API](/platform/graphql) and its permission system from Hasura.
|
||||
|
||||
Nhost Authentication lets you authenticate users to your app using different sign-in methods:
|
||||
Nhost Authentication lets you authenticate users using different sign-in methods:
|
||||
|
||||
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
|
||||
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
|
||||
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Apple](/platform/authentication/sign-in-with-apple)
|
||||
- [Discord](/platform/authentication/sign-in-with-discord)
|
||||
- [Facebook](/platform/authentication/sign-in-with-facebook)
|
||||
- [GitHub](/platform/authentication/sign-in-with-github)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
|
||||
- [Spotify](/platform/authentication/sign-in-with-spotify)
|
||||
- [Twitch](/platform/authentication/sign-in-with-twitch)
|
||||
|
||||
## How it works
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ image: /img/og/platform/sign-in-with-email-and-password.png
|
||||
|
||||
Follow this guide to sign in users with email and password.
|
||||
|
||||
The email and password sign-in method is enabled by default for all Nhost apps.
|
||||
The email and password sign-in method is enabled by default for all Nhost projects.
|
||||
|
||||
## Sign Up
|
||||
|
||||
@@ -22,7 +22,7 @@ await nhost.auth.signUp({
|
||||
})
|
||||
```
|
||||
|
||||
If you've turned on email verification in your app's **Authentication Settings**, a user will be sent a verification email upon signup. The user must click the verification link in the email before they can sign in.
|
||||
If you've turned on email verification in your project's **Authentication Settings**, a user will be sent a verification email upon signup. The user must click the verification link in the email before they can sign in.
|
||||
|
||||
## Sign In
|
||||
|
||||
@@ -39,6 +39,6 @@ await nhost.auth.signIn({
|
||||
|
||||
## Verified Emails
|
||||
|
||||
You can decide if only verified emails should be able to sign in or not. Modify the **Only allow login for verified emails.** setting in the **Authentication Settings** section under **Users** in your Nhost app.
|
||||
You can decide if only verified emails should be able to sign in or not. Modify the **Only allow users with verified emails to sign in.** setting in the **Authentication Settings** section under **Users** in your Nhost project.
|
||||
|
||||
An email-verification email is automatically sent to the user during sign-up if your app only allows to sign in users with verified emails. You can also manually send the verification email to the user using [`nhost.auth.sendVerificationEmail()`](/reference/javascript/auth/send-verification-email).
|
||||
An email-verification email is automatically sent to the user during sign-up if your project only allows to sign in users with verified emails. You can also manually send the verification email to the user using [`nhost.auth.sendVerificationEmail()`](/reference/javascript/auth/send-verification-email).
|
||||
|
||||
@@ -7,7 +7,7 @@ image: /img/og/platform/sign-in-with-magic-link.png
|
||||
|
||||
Follow this guide to sign in users with Magic Link, also called passwordless email.
|
||||
|
||||
The Magic Link sign-in method enables you to sign in users to your app using an email address, without requiring a password.
|
||||
The Magic Link sign-in method enables you to sign in users using an email address, without requiring a password.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -20,9 +20,9 @@ Enable the Magic Link sign-in method in the Nhost dashboard under **Users** -> *
|
||||
To sign in users with Magic Link is a two-step process:
|
||||
|
||||
1. Send a Magic Link to the user's email address.
|
||||
2. The user clicks the Magic Link in their email to sign in to your app.
|
||||
2. The user clicks the Magic Link in their email to sign in.
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign up users with Magic Link in your app:
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users with Magic Link:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
title: Sign In with Security Keys
|
||||
sidebar_label: Security Keys
|
||||
slug: /platform/authentication/sign-in-with-security-keys
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with security keys and the WebAuthn API.
|
||||
|
||||
Examples of security keys:
|
||||
|
||||
- [Windows Hello](https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0)
|
||||
- [Apple Touch ID](https://support.apple.com/en-us/HT201371)
|
||||
- [Apple Face ID](https://support.apple.com/en-us/HT208109)
|
||||
- [Yubico security keys](https://www.yubico.com/)
|
||||
- Android Fingerprint sensors
|
||||
|
||||
You can read more about this feature in our [blog post](https://nhost.io/blog/webauthn-sign-in-method)
|
||||
|
||||
## Setup
|
||||
|
||||
Enable the Security Key sign-in method in the Nhost dashboard under **Users** -> **Authentication Settings** -> **Security Keys**.
|
||||
|
||||
You need to make sure you also set a valid client URL under **Users** -> **Authentication Settings** -> **Client URL**.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true" style={{ marginBottom: '15px' }}>
|
||||
<source src="/videos/enable-security-keys-sign-in.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## Sign Up
|
||||
|
||||
Signing up with a security key uses the same method as signing up with an email and a password. Instead of a `password` parameter, you need to set the `securityKey` parameter to `true`:
|
||||
|
||||
```tsx
|
||||
const { error, session } = await nhost.auth.signUp({
|
||||
email: 'joe@example.com',
|
||||
securityKey: true
|
||||
})
|
||||
if (error) {
|
||||
// Something unexpected happened, for instance, the user canceled their registration
|
||||
console.log(error)
|
||||
} else if (session) {
|
||||
// Sign up is complete!
|
||||
console.log(session.user)
|
||||
} else {
|
||||
console.log(
|
||||
'You need to verify your email address by clicking the link in the email we sent you.'
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Sign In
|
||||
|
||||
Once a user added a security key, they can use it to sign in:
|
||||
|
||||
```tsx
|
||||
const { error, session } = await nhost.auth.signIn({
|
||||
email,
|
||||
securityKey: true
|
||||
})
|
||||
if (session) {
|
||||
// User is signed in
|
||||
} else {
|
||||
// Something unexpected happened
|
||||
console.log(error)
|
||||
}
|
||||
```
|
||||
|
||||
## Add a Security Key
|
||||
|
||||
Any signed-in user with a valid email can add a security key when the feature is enabled. For instance, someone who signed up with an email and a password can add a security key and thus use it for their later sign-in!
|
||||
|
||||
Users can use multiple devices to sign in to their account. They can add as many security keys as they like.
|
||||
|
||||
```tsx
|
||||
const { key, error } = await nhost.auth.addSecurityKey()
|
||||
if (key) {
|
||||
// Successfully added a new security key
|
||||
console.log(key.id)
|
||||
} else {
|
||||
// Somethine unexpected happened
|
||||
console.log(error)
|
||||
}
|
||||
```
|
||||
|
||||
A nickname can be added for each security key to make them easy to identify:
|
||||
|
||||
```tsx
|
||||
await nhost.auth.addSecurityKey('my macbook')
|
||||
```
|
||||
|
||||
## List or Remove Security Keys
|
||||
|
||||
To list and to remove security keys can be achieved over GraphQL after setting the correct Hasura permissions to the `auth.security_keys` table:
|
||||
|
||||
```graphql
|
||||
query securityKeys($userId: uuid!) {
|
||||
authUserSecurityKeys(where: { userId: { _eq: $userId } }) {
|
||||
id
|
||||
nickname
|
||||
}
|
||||
}
|
||||
mutation removeSecurityKey($id: uuid!) {
|
||||
deleteAuthUserSecurityKey(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,98 @@
|
||||
---
|
||||
title: Sign In with Apple
|
||||
sidebar_label: Apple
|
||||
slug: /platform/authentication/sign-in-with-apple
|
||||
image: /img/og/platform/sign-in-with-apple.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Apple.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
alt="Apple Sign In Preview"
|
||||
src="/img/social-providers/apple-preview.svg"
|
||||
width={480}
|
||||
height={267}
|
||||
/>
|
||||
</p>
|
||||
|
||||
## Create Apple Developer Account
|
||||
|
||||
- Click on "Account" in the top menu.
|
||||
- Create a new [Apple Developer account](https://developer.apple.com) if you don't have one already and sign in to the Apple Developer platform.
|
||||
|
||||
## Get an App ID
|
||||
|
||||
- Go to the [Apple Developer Dashboard](https://developer.apple.com/account/).
|
||||
- Click on **Certificates, IDs & Profiles** in the left menu.
|
||||
- Click on **Identifiers** in the left menu.
|
||||
- Click on the "+" button in the header next to "Identifiers".
|
||||
- Select **App IDs** and click **Continue**.
|
||||
- Select type **App** and click **Continue**.
|
||||
- Fill in the App information:
|
||||
|
||||
- Description.
|
||||
- Bundle ID (ex. io.nhost.app or com.your-startup.app).
|
||||
- Scroll down and check **Sign In With Apple**.
|
||||
- Click **Continue** in the top right corner.
|
||||
- Click **Register** in the top right corner.
|
||||
|
||||
- Click on the newly created app to see **Team ID**.
|
||||
|
||||
- **Team ID**: Copy and paste the **Team ID** to your Nhost OAuth settings for Apple.
|
||||
|
||||
## Get a Service ID
|
||||
|
||||
- Go to the [Apple Developer Dashboard](https://developer.apple.com/account/).
|
||||
- Click on **Certificates, IDs & Profiles** in the left menu.
|
||||
- Click on **Identifiers** in the left menu.
|
||||
- Click on **Certificates, IDs & Profiles** in the left menu.
|
||||
- Click on **Identifiers** in the left menu.
|
||||
- Click on the "+" button in the header next to "Identifiers".
|
||||
- Select **Service IDs** and click **Continue**.
|
||||
|
||||
- Fill in the Service information:
|
||||
|
||||
- Description.
|
||||
- Identifier (Service ID) (ex. _service_.io.nhost.app or _service_.com.your-startup.app). Notice you can't use the same identifier as for the app so we recommend adding "service" at the beginning if the identifier.
|
||||
- **Service ID**: Copy and paste the **Identifier (Service ID)** to your Nhost OAuth settings for Apple.
|
||||
- Click **Continue** in the top right corner.
|
||||
- Click **Register** in the top right corner.
|
||||
|
||||
- Click on the newly created service in the list of Identifiers.
|
||||
- Click the checkbox to enable "Sign in with Apple".
|
||||
- Click **Configure** next to "Sign in with Apple".
|
||||
- Make sure your newly created Bundle ID is selected under Primary App ID.
|
||||
- Add your base auth domain under "Domains and Subdomains". E.g. `<subdomain>.nhost.run`.
|
||||
- Add the full callback URL under "Return URLs". E.g. `https://<subdomain>.nhost.run/v1/auth/signin/provider/apple/callback`.
|
||||
- Click **Next**.
|
||||
- Click **Done**.
|
||||
- Click **Continue** in the top right corner.
|
||||
- Click **Save** in the top right corner.
|
||||
|
||||
## Generate Key
|
||||
|
||||
- Go to the [Apple Developer Dashboard](https://developer.apple.com/account/).
|
||||
- Click on **Certificates, IDs & Profiles** in the left menu.
|
||||
- Click on **Keys** in the left menu.
|
||||
- Click on **Create a key**.
|
||||
- Fill in a name for your key.
|
||||
- Click the checkbox to enable "Sign in with Apple".
|
||||
- Click **Configure** next to "Sign in with Apple".
|
||||
- Select your newly created App ID in the dropdown selector.
|
||||
- Click **Save** in the top right corner.
|
||||
- Click **Continue** in the top right corner.
|
||||
- Click **Register** in the top right corner.
|
||||
- **Key ID**: Copy and paste the **Key ID** to your Nhost OAuth settings for Apple.
|
||||
- Click **Download** to download the key to your computer.
|
||||
- **Private Key**: Copy and paste the content of the downloaded key to your Nhost OAuth settings for Apple.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'apple'
|
||||
})
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Sign In with Discord
|
||||
sidebar_label: Discord
|
||||
slug: /platform/authentication/sign-in-with-discord
|
||||
image: /img/og/platform/sign-in-with-discord.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Discord.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
alt="Discord Sign In Preview"
|
||||
src="/img/social-providers/discord-preview.svg"
|
||||
width={480}
|
||||
height={267}
|
||||
/>
|
||||
</p>
|
||||
|
||||
## Create Discord Account
|
||||
|
||||
- Create a new [Discord account](https://discord.com/) if you don't have one already.
|
||||
|
||||
## Create Discord App
|
||||
|
||||
- Sign in to the [Discord Developer Portal](https://discord.com/developers/applications).
|
||||
- Click on **New Application** in the top right corner.
|
||||
- Fill in the name of your Discord Application and click **Create**.
|
||||
- Click on **OAuth2** settings in the left menu.
|
||||
- Copy the **Client ID** and paste it into your Nhost OAuth settings for Discord.
|
||||
- Click on **Reset Secret**.
|
||||
- Click **Yes, do it** to generate a new secret.
|
||||
- Copy the **Client Secret** and paste it into your Nhost OAuth settings for Discord.
|
||||
- Click on **Add Redirect**.
|
||||
- Copy and paste the callback URL from your Nhost OAuth settings for Discord to the input field in the Discord Developer portal.
|
||||
- Click **Save Changes** to save the added callback URL.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'discord'
|
||||
})
|
||||
```
|
||||
@@ -5,7 +5,7 @@ slug: /platform/authentication/sign-in-with-facebook
|
||||
image: /img/og/platform/sign-in-with-facebook.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Facebook with your Nhost App.
|
||||
Follow this guide to sign in users with Facebook.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
@@ -59,7 +59,7 @@ To make sure we can fetch all user data (email, profile picture and name). For t
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
@@ -5,7 +5,7 @@ slug: /platform/authentication/sign-in-with-github
|
||||
image: /img/og/platform/sign-in-with-github.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with GitHub with your Nhost App.
|
||||
Follow this guide to sign in users with GitHub.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
@@ -44,7 +44,7 @@ Follow this guide to sign in users with GitHub with your Nhost App.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
@@ -5,7 +5,7 @@ slug: /platform/authentication/sign-in-with-google
|
||||
image: /img/og/platform/sign-in-with-google.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Google with your Nhost App.
|
||||
Follow this guide to sign in users with Google.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
@@ -68,7 +68,7 @@ Follow this guide to sign in users with Google with your Nhost App.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the Nhost JavaScript client to sign in users in your app:
|
||||
Use the Nhost JavaScript client to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
@@ -5,7 +5,7 @@ slug: /platform/authentication/sign-in-with-linkedin
|
||||
image: /img/og/platform/sign-in-with-linkedin.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with LinkedIn with your Nhost App.
|
||||
Follow this guide to sign in users with LinkedIn.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
@@ -51,7 +51,7 @@ Follow this guide to sign in users with LinkedIn with your Nhost App.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
@@ -5,7 +5,7 @@ slug: /platform/authentication/sign-in-with-spotify
|
||||
image: /img/og/platform/sign-in-with-spotify.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Spotify with your Nhost App.
|
||||
Follow this guide to sign in users with Spotify.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
@@ -44,7 +44,7 @@ Follow this guide to sign in users with Spotify with your Nhost App.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users in your app:
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Sign In with Twitch
|
||||
sidebar_label: Twitch
|
||||
slug: /platform/authentication/sign-in-with-twitch
|
||||
image: /img/og/platform/sign-in-with-twitch.png
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with Twitch.
|
||||
|
||||
<p align="center">
|
||||
<img
|
||||
alt="Twitch Sign In Preview"
|
||||
src="/img/social-providers/twitch-preview.svg"
|
||||
width={480}
|
||||
height={267}
|
||||
/>
|
||||
</p>
|
||||
|
||||
## Create Twitch Account
|
||||
|
||||
- Create a new [Twitch account](https://twitch.tv/) if you don't have one already.
|
||||
|
||||
## Create Twitch App
|
||||
|
||||
- Sign in to the [Twitch Developer Console](https://dev.twitch.tv/console).
|
||||
- Click on **Register Your Application**.
|
||||
- Fill in a **Twitch application name**.
|
||||
- Copy and paste the callback URL from your Nhost OAuth settings for Twitch to the input field under **OAuth Redirect URLs** and click **Add** to the right of the input field.
|
||||
- Select an application **Category**. E.g. _Application Integration_.
|
||||
- Click **Create**.
|
||||
|
||||
## Get Twitch Appplication Client ID and Client Secret
|
||||
|
||||
- Click on **Manage** on your newly created Twitch application.
|
||||
- Copy the **Client ID** and paste it into your Nhost OAuth settings for Twitch.
|
||||
- Click on **New Secret** to generate a new client secret.
|
||||
- Copy the **Client Secret** and paste it into your Nhost OAuth settings for Twitch.
|
||||
|
||||
## Sign In Users
|
||||
|
||||
Use the [Nhost JavaScript client](/reference/javascript) to sign in users:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'twitch'
|
||||
})
|
||||
```
|
||||
@@ -9,38 +9,12 @@ Nhost Authentication support the following sign-in methods:
|
||||
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
|
||||
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
|
||||
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Apple](/platform/authentication/sign-in-with-apple)
|
||||
- [Discord](/platform/authentication/sign-in-with-discord)
|
||||
- [Facebook](/platform/authentication/sign-in-with-facebook)
|
||||
- [GitHub](/platform/authentication/sign-in-with-github)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
|
||||
- [Spotify](/platform/authentication/sign-in-with-spotify)
|
||||
|
||||
## Enabling Social Sign-In Provider
|
||||
|
||||
To start with social sign-in, select your app in Nhost Console and go to **Users** → **Authentication Settings**.
|
||||
|
||||
You need to set the Client ID and Client Secret for each provider that you want to enable.
|
||||
|
||||
## Implementing sign-in experience
|
||||
|
||||
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in in your app,
|
||||
|
||||
Here's an example of how to implement sign-in with GitHub:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'github'
|
||||
})
|
||||
```
|
||||
|
||||
Users are redirected to your Nhost app's **client URL** by default. By default, your Nhost app's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users** → **Authentication Settings** → **Client URL**.
|
||||
|
||||
## Provider OAuth scopes
|
||||
|
||||
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
|
||||
|
||||
By default, Nhost sets the scope to get the name, email, and avatar url for each user. Editing scope is not currently supported.
|
||||
|
||||
## Provider OAuth Tokens
|
||||
|
||||
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.
|
||||
- [Twitch](/platform/authentication/sign-in-with-twitch)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Social Providers Configuration
|
||||
sidebar_label: Social Providers Configuration
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
## Enabling Social Sign-In Provider
|
||||
|
||||
To start with social sign-in, select your project in Nhost Dashboard and go to **Users** → **Authentication Settings**.
|
||||
|
||||
You need to set the Client ID and Client Secret for each provider that you want to enable.
|
||||
|
||||
## Implementing sign-in experience
|
||||
|
||||
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in for your project.
|
||||
|
||||
Here's an example of how to implement sign-in with GitHub:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'github'
|
||||
})
|
||||
```
|
||||
|
||||
Users are redirected to your Nhost project's **client URL** by default. By default, your Nhost project's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users** → **Authentication Settings** → **Client URL**.
|
||||
|
||||
Here is an example of how to redirect to another host or path:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: '<provider>'
|
||||
options: {
|
||||
redirectTo: "<host>/<slug>" // Example: "https://example.com/dashboard"
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Provider OAuth scopes
|
||||
|
||||
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
|
||||
|
||||
By default, Nhost sets the scope to get the name, email, and avatar URL for each user. Editing scope is not currently supported.
|
||||
|
||||
## Provider OAuth Tokens
|
||||
|
||||
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.
|
||||
@@ -39,7 +39,7 @@ query {
|
||||
|
||||
Users should be created using the sign-up or sign-in flows as described under [sign-in methods](/platform/authentication/sign-in-methods).
|
||||
|
||||
- **Never** create users directly via GraphQL or database.
|
||||
- **Never** create users directly via GraphQL or database, unless you [import users](#import-users) from an external system.
|
||||
- **Never** modify the `auth.users` table.
|
||||
- **Never** modify the GraphQL root queries or fields for any of the tables in the `auth` schema.
|
||||
|
||||
@@ -60,11 +60,35 @@ The default role is used when no role is specified in the GraphQL request. By de
|
||||
|
||||
### Allowed Roles
|
||||
|
||||
Allowed roles are roles the user is allowed to use when making a GraphQL request. Usually you would change the role from `user` (the default role) to some other role because you want Hasura to use a different role to resolve permissions for a particular GraphQL request.
|
||||
|
||||
By default, users have two allowed roles:
|
||||
|
||||
- `user`
|
||||
- `me`
|
||||
|
||||
You can manage what allowed roles users should get when they sign up under **Users** -> **Roles & Permissions**.
|
||||
|
||||
:::info
|
||||
|
||||
You must also add the roles manually to the `auth.roles` table.
|
||||
|
||||
:::
|
||||
|
||||
It's also possible to give users a subset of allowed roles during signup.
|
||||
|
||||
**Example:** Only give the `user` role (without the `me` role) for the user's allowed roles:
|
||||
|
||||
```js
|
||||
await nhost.auth.signUp({
|
||||
email: 'joe@example.com',
|
||||
password: 'secret-password'
|
||||
options: {
|
||||
allowedRoles: ['user']
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### Public Role
|
||||
|
||||
The `public` role is used to resolve GraphQL permissions for unauthenticated users.
|
||||
@@ -112,3 +136,31 @@ await nhost.auth.signUp({
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Import Users
|
||||
|
||||
If you have users in a different system, you can import them into Nhost. When importing users you should insert the users directly into the database instead of using the authentication endpoints (`/signup/email-password`).
|
||||
|
||||
It's possible to insert users via GraphQL or SQL.
|
||||
|
||||
### GraphQL
|
||||
|
||||
Make a GraphQL request to insert a user like this:
|
||||
|
||||
```graphql
|
||||
mutation insertUser($user: users_insert_input!) {
|
||||
insertUser(object: $user) {
|
||||
id
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### SQL
|
||||
|
||||
Connect directly to the database and insert a user like this:
|
||||
|
||||
```sql
|
||||
INSERT INTO auth.users (id, email, display_name, password_hash, ..) VALUES ('<user-id>', '<email>', '<display-name>', '<password-hash>', ..);
|
||||
```
|
||||
|
||||
User passwords are hashed using [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) in Nhost.
|
||||
|
||||
@@ -7,9 +7,9 @@ image: /img/og/platform/cli.png
|
||||
import Tabs from '@theme/Tabs'
|
||||
import TabItem from '@theme/TabItem'
|
||||
|
||||
Nhost CLI, or `nhost`, is a command-line interface that lets you run and manage Nhost apps locally on Mac, Linux and Windows (WSL2).
|
||||
Nhost CLI, or `nhost`, is a command-line interface that lets you run and manage Nhost projects locally on Mac, Linux and Windows (WSL2).
|
||||
|
||||
This means you get a full-featured Nhost app running locally on your machine:
|
||||
This means you get a full-featured Nhost project running locally on your machine:
|
||||
|
||||
- Postgres Database
|
||||
- Hasura GraphQL API
|
||||
@@ -55,42 +55,64 @@ Start by authenticating yourself to Nhost Cloud:
|
||||
nhost login
|
||||
```
|
||||
|
||||
Once signed in, you can list all your Nhost apps using:
|
||||
Once signed in, you can list all your Nhost projects using:
|
||||
|
||||
```
|
||||
nhost list
|
||||
```
|
||||
|
||||
Let's start by initializing a remote Nhost app locally with the following command:
|
||||
Let's start by initializing a remote Nhost project locally with the following command:
|
||||
|
||||
```
|
||||
nhost init --remote
|
||||
```
|
||||
|
||||
Pick a Nhost app to use then change the directory once the app initialization is completed:
|
||||
Pick a Nhost project to use then change the directory once the project initialization is completed:
|
||||
|
||||
```
|
||||
cd my_test_app
|
||||
```
|
||||
|
||||
Then start the Nhost app locally:
|
||||
Then start the Nhost project locally:
|
||||
|
||||
```
|
||||
nhost up
|
||||
```
|
||||
|
||||
Hasura Console starts automatically and your Nhost app is running locally with the backend URL: `http://localhost:1337`.
|
||||
Hasura Console starts automatically and your Nhost project is running locally.
|
||||
|
||||
## Subdomain and Region
|
||||
|
||||
Use `localhost` as the `subdomain`, and skip `region` when using the CLI and the [JavaScript SDK](/reference/javascript):
|
||||
|
||||
```
|
||||
import { NhostClient } from '@nhost/nhost-js'
|
||||
|
||||
const nhost = new NhostClient({
|
||||
subdomain: 'localhost',
|
||||
})
|
||||
```
|
||||
|
||||
## Emails
|
||||
|
||||
During local development with the CLI, all transactional emails from Authentication are sent to a local Mailhog instance, instead of to the recipient's email address. You'll see an address where after starting [`nhost up`](/reference/cli/up) where all emails are sent to.
|
||||
|
||||
For the example below, all emails are accessable at `http://localhost:8839`.
|
||||
For the example below, all emails are accessible at `http://localhost:8025`.
|
||||
|
||||
```bash
|
||||
$ nhost up
|
||||
✔ Your app is running at http://localhost:1337 (Ctrl+C to stop)
|
||||
ℹ Emails will be sent to http://localhost:8839
|
||||
URLs:
|
||||
- Postgres: postgres://postgres:postgres@localhost:5432/postgres
|
||||
- GraphQL: http://localhost:1337/v1/graphql
|
||||
- Auth: http://localhost:1337/v1/auth
|
||||
- Storage: http://localhost:1337/v1/storage
|
||||
- Functions: http://localhost:1337/v1/functions
|
||||
|
||||
- Hasura console: http://localhost:9695
|
||||
- Mailhog: http://localhost:8025
|
||||
|
||||
- subdomain: localhost
|
||||
- region: (empty)
|
||||
```
|
||||
|
||||
## What's next?
|
||||
|
||||
@@ -6,13 +6,17 @@ image: /img/og/platform/event-triggers.png
|
||||
|
||||
Event Triggers enable you to invoke webhooks when a database event happens. Event Triggers are typically used to do post-processing tasks, using custom backend code, based on database events.
|
||||
|
||||
Event Triggers are associated with a specific table in the database the following event types are available:
|
||||
Event Triggers are associated with a specific table in the database and the following event types are available:
|
||||
|
||||
- **INSERT** - A row is inserted into a table
|
||||
- **UPDATE** - A row is updated in a table
|
||||
- **DELETE** - A row is deleted from a table
|
||||
- **INSERT** - A row is inserted into a table.
|
||||
- **UPDATE** - A row is updated in a table.
|
||||
- **DELETE** - A row is deleted from a table.
|
||||
|
||||
Event Triggers can also be triggered manually in the Hasura Console.
|
||||
:::info
|
||||
|
||||
It's currently only possible to create Event Triggers in the Hasura Console. We're working on adding support for creating Event Triggers in the Nhost Dashboard.
|
||||
|
||||
:::
|
||||
|
||||
### Example Use Case
|
||||
|
||||
@@ -30,7 +34,7 @@ Event Triggers are managed in the Hasura Console. Select **Events** in the main
|
||||
|
||||
## Event Triggers and Serverless Functions
|
||||
|
||||
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint that can be used as a webhook for your Event Triggers.
|
||||
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint and can be used as a webhook for Event Triggers.
|
||||
|
||||
### Format
|
||||
|
||||
@@ -40,7 +44,7 @@ When using Serverless Functions as webhooks you should configure the webhook usi
|
||||
{{NHOST_BACKEND_URL}}/v1/functions/orders-insert-send-email
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
The `NHOST_BACKEND_URL` is a [system environment variable](/platform/environment-variables#system-environment-variables) and available in production and in development environments using the [CLI](/platform/cli).
|
||||
|
||||
@@ -54,7 +58,7 @@ To set this up is a two-step process:
|
||||
|
||||
- Step 1: Add the header `nhost-webhook-secret` with the value `NHOST_WEBHOOK_SECRET` (From env var) when creating the Event Trigger in the Hasura Console.
|
||||
|
||||

|
||||

|
||||
|
||||
- Step 2: Check the header `nhost-webhook-secret` for incoming requests and make sure the header is the same as the environment variable `NHOST_WEBHOOK_SECRET`.
|
||||
|
||||
|
||||
@@ -7,51 +7,42 @@ image: /img/og/platform/database.png
|
||||
import Tabs from '@theme/Tabs'
|
||||
import TabItem from '@theme/TabItem'
|
||||
|
||||
Every Nhost app comes with its own [Postgres database](https://postgres.org/). Postgres is the world's most advanced open-source relational database and it's the most [popular SQL database for developers](https://insights.stackoverflow.com/survey/2021#section-most-loved-dreaded-and-wanted-databases).
|
||||
Every Nhost project comes with its own [Postgres database](https://postgres.org/). Postgres is the world's most advanced open-source relational database and it's the most [popular SQL database for developers](https://insights.stackoverflow.com/survey/2021#section-most-loved-dreaded-and-wanted-databases).
|
||||
|
||||
:::info
|
||||
There are three ways of managing your database:
|
||||
|
||||
It's currently not possible to connect directly to the Postgres database via a connection string. We're working on making the database available soon. You can follow [this issue on GitHub](https://github.com/nhost/nhost/issues/113).
|
||||
|
||||
:::
|
||||
|
||||
The database is managed via the Hasura Console where you can manage the database via an intuitive UI. You can also use SQL to directly interact with the database via the Hasura Console.
|
||||
|
||||
## Hasura Console
|
||||
|
||||
Hasura Console is where you manage your database. This is where you create and manage tables, schemas, and data.
|
||||
|
||||
Open the Hasura Console by clicking on **Data** in the top menu in the Nhost Dashboard, copy the **admin secret**, and click **Open Hasura**. Use the **admin secret** to sign in.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/open-hasura-console.mp4" type="video/mp4" />
|
||||
</video>
|
||||
1. Nhost Database UI (recommended).
|
||||
2. Hasura Console.
|
||||
3. [Connect directly to the database.](#postgres-access)
|
||||
|
||||
## Schemas
|
||||
|
||||
The two schemas `auth` and `storage` are reserved for Nhost Auth and Nhost Storage to work. You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
|
||||
Generally, you should use the `public` schema for your project. It's also ok to add custom schemas for more advanced usage.
|
||||
|
||||
Generally, you should use the `public` schema when creating and managing your tables for your app. It's also ok to add custom schemas for more advanced usage.
|
||||
The two schemas `auth` and `storage` are reserved for [Nhost Auth](/platform/authentication) and [Nhost Storage](/platform/storage). You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
|
||||
|
||||
## Create Table
|
||||
## Manage Tables
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab, select the **public** schema in the left menu and click **Create Table**.
|
||||
2. Enter a table name.
|
||||
3. Add table columns.
|
||||
4. Add a primary key (usually the ID column).
|
||||
5. (Optional) Add foreign keys.
|
||||
6. (Optional) Add unique keys.
|
||||
7. Click **Add Table**.
|
||||
### Create Table
|
||||
|
||||
When a table is created the table is instantly available through the [GraphQL API](/platform/graphql).
|
||||
1. Go to **Database** in the left menu.
|
||||
2. Click **New table**.
|
||||
3. Enter a **name** for the table.
|
||||
4. Add **columns**.
|
||||
5. Select a **Primary Key** (usually the `id` column).
|
||||
6. (Optional) Select an **Identity** column. Identity is for integer columns only and is usually selected for the `id` column so the `id` is automatically incremented (1,2,3...) on new rows.
|
||||
7. (Optional) Add **Foreign Keys**.
|
||||
8. Click **Create**.
|
||||
|
||||
When a table is created it is instantly available through the [GraphQL API](/platform/graphql).
|
||||
|
||||
Here's an example of how to create a `customers` table:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-create-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-create.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -59,7 +50,7 @@ Here's an example of how to create a `customers` table:
|
||||
|
||||
```sql
|
||||
CREATE TABLE "public"."customers" (
|
||||
"id" serial NOT NULL PRIMARY KEY,
|
||||
"id" bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
"name" text NOT NULL
|
||||
);
|
||||
```
|
||||
@@ -67,19 +58,20 @@ CREATE TABLE "public"."customers" (
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Modify Table
|
||||
### Edit Table
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab and click on the table you want to edit in the left menu.
|
||||
2. Click **Modify**.
|
||||
3. Modify or add table columns.
|
||||
1. Go to the **Database** in the left menu
|
||||
2. Click on the **context menu** of the table you want to change and click **Edit table**.
|
||||
3. **Edit** (add, change, delete) the table's columns.
|
||||
4. Click **Save**.
|
||||
|
||||
Here's an example of how to modify a `customers` table by adding an `address` column:
|
||||
Here's an example of how to edit a `customers` table by adding an `address` column:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-modify-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-edit.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -92,20 +84,19 @@ ALTER TABLE "public"."customers" ADD COLUMN "address" text;
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Delete Table
|
||||
### Delete Table
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab and select the table you want to delete in the left menu.
|
||||
2. Click **Modify**.
|
||||
3. Scroll to the bottom of the page and click **Delete table** to open the confirmation dialog.
|
||||
4. Type the **name of the table** and click OK.
|
||||
1. Go to the **Database** in the left menu
|
||||
2. Click on the **context menu** of the table you want to delete and click **Delete table**.
|
||||
3. Click **Delete** to confirm deleting the table.
|
||||
|
||||
Here's an example of how to delete a `customers` table:
|
||||
**Example:** Delete a `customers` table:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-delete-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-delete.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -118,6 +109,34 @@ DROP TABLE "public"."customers";
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Postgres Access
|
||||
|
||||
It's possible to access your Postgres database directly with your favorite Postgres client.
|
||||
|
||||
:::info
|
||||
|
||||
For projects older than September 2022, it's not possible to connect directly to the database via a connection string. We're working on a one-click fix that can be expected to be available in October 2022.
|
||||
|
||||
:::
|
||||
|
||||
Go to **Settings** in the left menu and click on **Database**. You'll find the connection string and credentials to connect to your database.
|
||||
|
||||

|
||||
|
||||
### Reset Postgres Password
|
||||
|
||||
It's possible to reset the database password that was provided when the project was created.
|
||||
|
||||
1. Go to the **Overview** page of your project.
|
||||
2. Click on **Project Settings**.
|
||||
3. Click on **Reset Database Password**.
|
||||
4. Either **copy** the newly automatically generated password, or **type** your own new database password.
|
||||
5. Click **Reset Database Password**.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/nhost-database-reset-password.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## Migrations
|
||||
|
||||
To track database changes, use the [Nhost CLI](/platform/cli) to develop locally and use our [GitHub integration](/platform/github-integration) to automatically deploy database migrations live.
|
||||
@@ -128,14 +147,31 @@ To track database changes, use the [Nhost CLI](/platform/cli) to develop locally
|
||||
|
||||
Learn how to [get started with Nhost CLI](/platform/overview/get-started-with-nhost-cli).
|
||||
|
||||
## Seed Data
|
||||
|
||||
Seed data is a way of automatically adding data to your database using SQL when a new environment is created. This is, for the moment, only applicable when you're using the [Nhost CLI](/platform/cli) to develop locally. When you're running `nhost up` for the first time, seed data is added.
|
||||
|
||||
In the future, seed data will also be added to new preview environments.
|
||||
|
||||
Seed data should be located in `nhost/seeds/default/` and are executed in alphabetical order.
|
||||
|
||||
**Example:** Two seed scripts with countries and products.
|
||||
|
||||
```text
|
||||
nhost/seeds/default/001-countries.sql
|
||||
nhost/seeds/default/002-products.sql
|
||||
```
|
||||
|
||||
## Backups
|
||||
|
||||
Databases on [Pro and Enterprise plans](https://nhost.io/pricing) are backed up automatically.
|
||||
Databases on the [Pro and Enterprise plans](https://nhost.io/pricing) are automatically backed up daily.
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use lower-case names for tables. E.g. `customers` instead of `Customers`.
|
||||
- Use plural names for tables. E.g. `customers` instead of `customer`.
|
||||
- use underscore (`_`) instead of camelCase for table names. E.g. `customer_invoices` instead of `customerInvoices`.
|
||||
- use underscore (`_`) instead of camelCase for column names. E.g. `first_name` instead of `firstName`.
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ image: /img/og/platform/environment-variables.png
|
||||
|
||||
Environment Variables are key-value pairs configured outside your source code. They are used to store environment-specific values such as API keys.
|
||||
|
||||
You can manage your app's environment variables in Nhost Console under **Variables**. When you define a new variable, you can set one value for **production** and one for **development**.
|
||||
You can manage your project's Environment Variables in Nhost Dashboard under **Variables**. When you define a new variable, you can set one value for **production** and one for **development**.
|
||||
|
||||

|
||||
|
||||
When an environment variable is changed, you must deploy your app again using the [GitHub integration](/platform/github-integration) for the changes to take effect.
|
||||
When an Environment Variable is changed, you must deploy your project again using the [GitHub integration](/platform/github-integration) for the changes to take effect.
|
||||
|
||||
Environment Variables are available in:
|
||||
|
||||
@@ -19,7 +19,7 @@ Environment Variables are available in:
|
||||
|
||||
## System Environment Variables
|
||||
|
||||
System environment variables are automatically available in production and during development. The following system environment variables are available:
|
||||
System Environment Variables are automatically available in production and during development. The following system Environment Variables are available:
|
||||
|
||||
- `NHOST_ADMIN_SECRET`
|
||||
- `NHOST_WEBHOOK_SECRET`
|
||||
@@ -38,7 +38,7 @@ NHOST_BACKEND_URL=https://xxxxxxx.nhost.run
|
||||
|
||||
## Development Environment Variables
|
||||
|
||||
When developing locally using the [CLI](/platform/cli), environment variables set in `.env.development` are available in your local environment. There are two ways to manage them:
|
||||
When developing locally using the [CLI](/platform/cli), Environment Variables set in `.env.development` are available in your local environment. There are two ways to manage them:
|
||||
|
||||
1. Edit the `.env.development` file manually.
|
||||
2. Add development environment variables in the Nhost Console and use `nhost env pull` to sync them. This way, your team members will also have access to the same variables.
|
||||
2. Add development Environment Variables in the Nhost Dashboard and use `nhost env pull` to sync them. This way, your team members will also have access to the same Environment Variables.
|
||||
|
||||
@@ -4,9 +4,9 @@ sidebar_position: 10
|
||||
image: /img/og/platform/github-integration.png
|
||||
---
|
||||
|
||||
The GitHub integration allows you to automatically deploy your Nhost app when on push and merge to a GitHub repository that is connected to your Nhost app.
|
||||
The GitHub integration allows you to automatically deploy your Nhost project when on push and merge to a GitHub repository that is connected to your Nhost project.
|
||||
|
||||
When a GitHub repository is connected to a Nhost app, Nhost automatically deploys changes when you push code to the repo.
|
||||
When a GitHub repository is connected to a Nhost project, Nhost automatically deploys changes when you push code to the repo.
|
||||
|
||||
The following things are deployed:
|
||||
|
||||
@@ -20,11 +20,11 @@ Settings in `nhost/config.yaml` are **not** deployed. That means you need to man
|
||||
|
||||
## Connecting a GitHub repository
|
||||
|
||||
1. From your Nhost app, click **Connect to Github**.
|
||||
1. From your Nhost project, click **Connect to Github**.
|
||||
|
||||

|
||||
|
||||
2. **Install the Nhost app** on your Github account.
|
||||
2. **Install the Nhost project** on your Github account.
|
||||
|
||||

|
||||
|
||||
@@ -36,9 +36,9 @@ Settings in `nhost/config.yaml` are **not** deployed. That means you need to man
|
||||
|
||||
Nhost only deploys your **deployment branch**. By default, your deployment branch matches the default branch set on GitHub (usually `main`).
|
||||
|
||||
You can change the deployment branch by clicking **Edit** next to the repository in your Nhost app's dashboard.
|
||||
You can change the deployment branch by clicking **Edit** next to the repository in your Nhost project's Overview.
|
||||
|
||||
You can have multiple Nhost apps connected to the same GitHub repository and use different deployment branches (e.g., `main` and `staging`).
|
||||
You can have multiple Nhost projects connected to the same GitHub repository and use different deployment branches (e.g., `main` and `staging`).
|
||||
|
||||
<center>
|
||||
<img src="/img/platform/github-integration/deployment-branch.png" alt="drawing" width="50%" />
|
||||
@@ -46,7 +46,7 @@ You can have multiple Nhost apps connected to the same GitHub repository and use
|
||||
|
||||
## Base Directory
|
||||
|
||||
If your Nhost app is not at the root of your git repository, you can set a custom base directory. The base directory is where the `nhost` and `functions` directories are located. In other words, the base directory is the **parent directory** of the `nhost` and `functions` directories.
|
||||
If your Nhost project is not at the root of your git repository (typically when using a monorepo), you can set a custom base directory. The base directory is where the `nhost` directory is located. In other words, the base directory is the **parent directory** of the `nhost` folder.
|
||||
|
||||
<center>
|
||||
<img src="/img/platform/github-integration/base-directory.png" alt="drawing" width="50%" />
|
||||
@@ -54,4 +54,4 @@ If your Nhost app is not at the root of your git repository, you can set a custo
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Learn how to [use the CLI to deploy your Nhost app](/platform/overview/get-started-with-nhost-cli).
|
||||
- Learn how to [use the CLI to deploy your Nhost project](/platform/overview/get-started-with-nhost-cli).
|
||||
|
||||
@@ -6,7 +6,7 @@ image: /img/og/platform/graphql.png
|
||||
|
||||
A GraphQL API is automatically and instantly available based on the tables and columns in your [database](/platform/database).
|
||||
|
||||
The GraphQL API has instant support for inserting, selecting, updating, and deleting data, which usually account for 80% of all operations you need in your app.
|
||||
The GraphQL API has instant support for inserting, selecting, updating, and deleting data, which usually account for 80% of all API operations you need.
|
||||
|
||||
It's the [Hasura GraphQL engine](https://github.com/hasura/graphql-engine) that powers the GraphQL API which means that all documentation about [queries](https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/index/), [mutations](https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/index/), and [subscriptions](https://hasura.io/docs/latest/graphql/core/databases/postgres/subscriptions/index/) from Hasura's documentation is applicable.
|
||||
|
||||
@@ -40,7 +40,7 @@ When building more complex frontend applications, we recommend using a more adva
|
||||
A GraphQL query is used to fetch data from the database.
|
||||
|
||||
:::tip
|
||||
The [Queries documentation from Hasura](https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/index/) is applicable since Nhost uses Hasura's GraphQL Engine for your app.
|
||||
The [Queries documentation from Hasura](https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/index/) is applicable since we're using Hasura's GraphQL Engine for your project.
|
||||
:::
|
||||
|
||||
**Example:** A GraphQL query to select `title`, `body`, and `isCompleted` for every row in the `todos` table.
|
||||
@@ -131,7 +131,7 @@ query GetTodosWithLatestComments {
|
||||
A GraphQL mutation is used to insert, upsert, update, or delete data.
|
||||
|
||||
:::tip
|
||||
The [Mutations documentation from Hasura](https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/index/) is applicable since Nhost uses Hasura's GraphQL Engine for your app.
|
||||
The [Mutations documentation from Hasura](https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/index/) is applicable since we're using Hasura's GraphQL Engine for your project.
|
||||
:::
|
||||
|
||||
### Insert Data
|
||||
|
||||
@@ -32,7 +32,7 @@ The rule above make it so users can only select posts where the value of `user_i
|
||||
|
||||
`x-hasura-user-id` is a permission variable that is used to create permission rules in Hasura. The permission variable comes from the [access token](platform/authentication#access-tokens) that signed-in users have.
|
||||
|
||||
The `x-hasura-user-id` permission variable is always available for all signed-in users. You can add [custom permission variables](#custom-permission-variables) to create more complex permission rules unique to your app.
|
||||
The `x-hasura-user-id` permission variable is always available for all signed-in users. You can add [custom permission variables](#custom-permission-variables) to create more complex permission rules unique to your project.
|
||||
|
||||
## Custom Permission Variables
|
||||
|
||||
@@ -54,6 +54,18 @@ query {
|
||||
}
|
||||
```
|
||||
|
||||
### Local Custom Permission Variables
|
||||
|
||||
To use custom permission variables locally, add your claims to the `config.yml` as following:
|
||||
|
||||
```
|
||||
auth:
|
||||
jwt:
|
||||
custom_claims: '{"organisation-id":"profile.organisation.id"}'
|
||||
```
|
||||
|
||||
Your custom claim will be automatically prefixed with `x-hasura-`, therefore, the example above results in a custom permission variable named `x-hasura-organisation-id`.
|
||||
|
||||
## Roles
|
||||
|
||||
Every GraphQL request is resolved based on a **single role**. Roles are added in the Hasura Console when selecting a table and clicking **Permisisons**.
|
||||
|
||||
@@ -99,11 +99,11 @@ nhost logout
|
||||
|
||||
## Set up your project
|
||||
|
||||
### 1. Create a new Nhost app
|
||||
### 1. Create a new Nhost project
|
||||
|
||||
import CreateApp from '@site/src/components/create-nhost-app.mdx';
|
||||
import CreateProject from '@site/src/components/create-nhost-project.mdx'
|
||||
|
||||
<CreateApp />
|
||||
<CreateProject />
|
||||
|
||||
### 2. Create a new GitHub Repository
|
||||
|
||||
@@ -119,61 +119,43 @@ either public or private.
|
||||
|
||||
### 3. Connect Nhost project to Github
|
||||
|
||||
Finally, connect your Github repository to your Nhost project. Doing so will
|
||||
enable Nhost to deploy new versions of your project when you push automatically
|
||||
commits to your connected Git repository.
|
||||
Finally, connect your GitHub repository to your Nhost project. Doing so will
|
||||
enable Nhost to deploy new versions of your project when you push new commits to your connected Git repository.
|
||||
|
||||
1. From your project workspace, click **Connect to Github**.
|
||||
1. From your project workspace, click **Connect to GitHub**.
|
||||
|
||||

|
||||
|
||||
2. **Install the Nhost app** on your Github account.
|
||||
2. **Install the Nhost app** on your GitHub account.
|
||||
|
||||

|
||||
|
||||
3. **Connect** your Github repository.
|
||||
3. **Connect** your GitHub repository.
|
||||
|
||||

|
||||
|
||||
## Develop locally
|
||||
|
||||
## 1. Initialize your Nhost app
|
||||
## 1. Initialize your Nhost project
|
||||
|
||||
**Nhost CLI** brings the functionality of your Nhost production environment
|
||||
directly to your local machine.
|
||||
|
||||
It provides Docker containers to run the backend services that match your
|
||||
production application in a local environment. That way, you can make changes
|
||||
production environment in a local environment. That way, you can make changes
|
||||
and test your code locally before deploying those changes to production.
|
||||
|
||||
You can either initialize a blank Nhost app locally to start from scratch by
|
||||
running the following command:
|
||||
Initialize your Nhost project locally with the following command:
|
||||
|
||||
```bash
|
||||
nhost init -n my-nhost-app
|
||||
nhost init --remote
|
||||
```
|
||||
|
||||
And then link it to a remote app from your Nhost workspace in `app.nhost.io` by
|
||||
running the `link` command and selecting the corresponding app from the prompt:
|
||||
It will prompt you to choose what Nhost project you want to initialize.
|
||||
|
||||
```bash
|
||||
nhost link
|
||||
```
|
||||

|
||||
|
||||
Or you can directly initialize a local Nhost app from one of your existing
|
||||
production apps by specifying the `--remote` flag:
|
||||
|
||||
```bash
|
||||
nhost init --remote -n my-nhost-app
|
||||
```
|
||||
|
||||
It will also prompt you to choose the remote app you'd like to use to initialize
|
||||
your local Nhost development environment.
|
||||
|
||||

|
||||
|
||||
The `init` command creates the Nhost app inside your current working directory
|
||||
within a `nhost/` folder.
|
||||
Your file system will be populated with the following files and folders:
|
||||
|
||||
```
|
||||
my-nhost-app/
|
||||
@@ -200,11 +182,11 @@ git push -u origin main
|
||||
|
||||
## 2. Start a local development environment
|
||||
|
||||
To start a local development environment for your Nhost app, run the following
|
||||
To start a local development environment for your Nhost project, run the following
|
||||
command:
|
||||
|
||||
```bash
|
||||
nhost dev
|
||||
nhost up
|
||||
```
|
||||
|
||||
:::caution
|
||||
@@ -213,11 +195,10 @@ Make sure [Docker](https://www.docker.com/get-started) is up and running. It’s
|
||||
|
||||
Running this command will start up all the backend services provided by Nhost.
|
||||
|
||||
It also runs a webserver to serve the Hasura console for the GraphQL engine so
|
||||
you can manage the database and try out the API.
|
||||
It also runs a webserver to serve the Hasura Console for the GraphQL Engine so
|
||||
you can manage the database and test the GraphQL API.
|
||||
|
||||
The Hasura console should open automatically at
|
||||
[http://localhost:1337](http://localhost:1337/).
|
||||
The Hasura Console opens automatically at [http://localhost:9695](http://localhost:9695/).
|
||||
|
||||

|
||||
|
||||
@@ -226,7 +207,7 @@ The Hasura console should open automatically at
|
||||
There are three things the Nhost CLI and the GitHub integration track and apply
|
||||
to production:
|
||||
|
||||
- Database migrations
|
||||
- Database Migrations
|
||||
- Hasura Metadata
|
||||
- Serverless Functions
|
||||
|
||||
@@ -239,7 +220,7 @@ Settings in `nhost/config.yaml` are not being applied to production. They only w
|
||||
Database changes are tracked and managed through migrations.
|
||||
|
||||
:::tip
|
||||
It's important that you use the Hasura console to make database changes. Indeed, with the Hasura console, DB migration files are generated incrementally to track changes automatically for you.
|
||||
You must use the Hasura Console to make database changes. With the Hasura Console, database migration files are automatically generated incrementally to track database changes for you.
|
||||
:::
|
||||
|
||||
To demonstrate how to make database changes, let's create a new table called
|
||||
@@ -250,14 +231,15 @@ To demonstrate how to make database changes, let's create a new table called
|
||||
- `authorId` (type UUID),
|
||||
- `createdAt` (type Timestamp and default `now()`)
|
||||
|
||||
In the Hasura console, head over to the **data** tab section and click on the
|
||||
In the Hasura Console, go to the **DATA** tab section and click on the
|
||||
PostgreSQL database (from the left side navigation) that Nhost provides us.
|
||||
|
||||
Click on the **public** schema and the **Create Table** button.
|
||||
Click on the **public** schema and then the **Create Table** button.
|
||||
|
||||

|
||||
|
||||
Then, enter the values for creating the `messages` table as mentioned above.
|
||||
Enter the values for creating the `messages` table as mentioned above.
|
||||
|
||||
Also, specify the `id` column as the primary key of the table, and link the
|
||||
`authorId` column to the `users.id` column using a foreign key to link the
|
||||
`users` and `messages` tables together.
|
||||
@@ -280,7 +262,7 @@ drwxr-xr-x 3 user staff 96 Apr 27 17:06 ..
|
||||
drwxr-xr-x 4 user staff 128 Apr 27 17:06 1651071963431_create_table_public_messages
|
||||
```
|
||||
|
||||
However, note that this database migration has only been applied locally. In
|
||||
Note that this database migration has only been applied locally. In
|
||||
other words, the `messages` table does not (yet) exists in production.
|
||||
|
||||
To apply the local changes to production, check out the
|
||||
@@ -338,12 +320,12 @@ insert_permissions:
|
||||
role: user
|
||||
```
|
||||
|
||||
### Serverless functions
|
||||
### Serverless Functions
|
||||
|
||||
Now let's create a serverless function before we push all changes to GitHub so
|
||||
Now let's create a Serverless Function before we push all changes to GitHub so
|
||||
Nhost can deploy them to production.
|
||||
|
||||
For this guide, let's create a simple serverless function that will return the
|
||||
For this guide, let's create a Serverless Function that will return the
|
||||
current date-time when called.
|
||||
|
||||
First, make sure to install `express`, which is required for serverless
|
||||
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'
|
||||
|
||||
## Introduction
|
||||
|
||||
This quickstart guide provides the steps you need to build a simple Next.js app
|
||||
This quickstart provides the steps you need to build a Next.js app
|
||||
powered by Nhost for the backend. It includes:
|
||||
|
||||
- Database: [PostgreSQL](https://www.postgresql.org/)
|
||||
@@ -19,7 +19,7 @@ powered by Nhost for the backend. It includes:
|
||||
- Authentication: [Hasura Auth](https://github.com/nhost/hasura-auth/)
|
||||
- Storage: [Hasura Storage](https://hub.docker.com/r/nhost/hasura-storage)
|
||||
|
||||
By the end of this guide, you'll have a full-stack app that allows users to log
|
||||
By the end of this guide, you'll have a full-stack app that allows users to sign
|
||||
in to access a protected dashboard and update their profile information.
|
||||
|
||||
## Prerequisites
|
||||
@@ -33,12 +33,12 @@ You'll need **Node.js** version 12 or later: [install it from here](https://node
|
||||
|
||||
### Create a new Nhost app
|
||||
|
||||
import CreateApp from '@site/src/components/create-nhost-app.mdx'
|
||||
import CreateApp from '@site/src/components/create-nhost-project.mdx'
|
||||
|
||||
<CreateApp />
|
||||
|
||||
:::info
|
||||
You can also connect your Nhost app to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
You can also connect your Nhost project to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
:::
|
||||
|
||||
## Initialize the app
|
||||
@@ -132,7 +132,8 @@ import { NhostNextProvider, NhostClient } from '@nhost/nextjs';
|
||||
|
||||
// highlight-start
|
||||
const nhost = new NhostClient({
|
||||
backendUrl: process.env.NEXT_PUBLIC_NHOST_BACKEND_URL || '',
|
||||
subdomain: process.env.NEXT_PUBLIC_NHOST_SUBDOMAIN || '',
|
||||
region: process.env.NEXT_PUBLIC_NHOST_REGION || ''
|
||||
});
|
||||
// highlight-end
|
||||
|
||||
@@ -149,16 +150,16 @@ function MyApp({ Component, pageProps }) {
|
||||
}
|
||||
```
|
||||
|
||||
Finally, make sure to create an environment variable named
|
||||
`NEXT_PUBLIC_NHOST_BACKEND_URL` to store your Nhost backend URL:
|
||||
Finally, store the environment variables for `subdomain` and `region` in `.env.development`:
|
||||
|
||||
```yaml title=".env.development"
|
||||
NEXT_PUBLIC_NHOST_BACKEND_URL=YOUR_NHOST_BACKEND_URL
|
||||
NEXT_PUBLIC_NHOST_SUBDOMAIN=[subdomain]
|
||||
NEXT_PUBLIC_NHOST_REGION=[region]
|
||||
```
|
||||
|
||||
You can find your Nhost backend URL for your project from [your dashboard](https://app.nhost.io) as shown below:
|
||||
You find your Nhost project's `subdomain` and `region` in the [project overview](https://app.nhost.io):
|
||||
|
||||

|
||||

|
||||
|
||||
:::caution
|
||||
Don't forget to restart your Next.js server after saving your `.env.development`
|
||||
|
||||
@@ -31,14 +31,14 @@ You'll need **Node.js** version 14 or later: [install it from here](https://node
|
||||
|
||||
## Project setup
|
||||
|
||||
### Create a new Nhost app
|
||||
### Create a new Nhost project
|
||||
|
||||
import CreateApp from '@site/src/components/create-nhost-app.mdx'
|
||||
import CreateProject from '@site/src/components/create-nhost-project.mdx'
|
||||
|
||||
<CreateApp />
|
||||
<CreateProject />
|
||||
|
||||
:::info
|
||||
You can also connect your Nhost app to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
You can also connect your Nhost project to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
:::
|
||||
|
||||
## Initialize the app
|
||||
@@ -128,7 +128,8 @@ Nhost backend:
|
||||
import { NhostClient, NhostReactProvider } from '@nhost/react'
|
||||
|
||||
const nhost = new NhostClient({
|
||||
backendUrl: process.env.REACT_APP_NHOST_BACKEND_URL || ''
|
||||
subdomain: process.env.REACT_APP_NHOST_SUBDOMAIN,
|
||||
region: process.env.REACT_APP_NHOST_REGION
|
||||
})
|
||||
|
||||
function App() {
|
||||
@@ -143,15 +144,16 @@ export default App
|
||||
```
|
||||
|
||||
Finally, make sure to create an environment variable named
|
||||
`REACT_APP_NHOST_BACKEND_URL` to store your Nhost backend URL:
|
||||
`REACT_APP_NHOST_SUBDOMAIN` and `REACT_APP_NHOST_REGION` to store your Nhost domain details:
|
||||
|
||||
```yaml title=".env.local"
|
||||
REACT_APP_NHOST_BACKEND_URL=YOUR_NHOST_BACKEND_URL
|
||||
REACT_APP_NHOST_SUBDOMAIN=[subdomain]
|
||||
REACT_APP_NHOST_REGION=[region]
|
||||
```
|
||||
|
||||
You can find your Nhost backend URL for your project from [your dashboard](https://app.nhost.io) as shown below:
|
||||
You find your Nhost project's `subdomain` and `region` in the [project overview](https://app.nhost.io):
|
||||
|
||||

|
||||

|
||||
|
||||
:::caution
|
||||
Don't forget to restart your React server after saving your `.env.local`
|
||||
|
||||
@@ -44,27 +44,16 @@ If your system versions do not meet both requirements, the RedwoodJS installatio
|
||||
|
||||
### Create a new Nhost app
|
||||
|
||||
First things first, we need to create a new Nhost project.
|
||||
import CreateApp from '@site/src/components/create-nhost-project.mdx'
|
||||
|
||||
So, log in to your Nhost dashboard and click the **Create your first app**
|
||||
button.
|
||||
|
||||

|
||||
|
||||
Next, give your new Nhost app a name, select a geographic region for your Nhost
|
||||
services and click **Create App**.
|
||||
|
||||

|
||||
|
||||
After a few seconds, you should get a PostgreSQL database, a GraphQL API with
|
||||
Hasura, file storage, and authentication set up.
|
||||
<CreateApp />
|
||||
|
||||
Finally, update your client login URL from your Nhost dashboard as the local RedwoodJS server starts on port `8910` instead of the usual `3000` port you may be used to with a regular React app.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
You can also connect your Nhost app to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
You can also connect your Nhost project to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
:::
|
||||
|
||||
## Initialize the app
|
||||
@@ -136,7 +125,8 @@ import { NhostClient } from '@nhost/nhost-js'
|
||||
|
||||
// highlight-start
|
||||
const nhostClient = new NhostClient({
|
||||
backendUrl: process.env.NHOST_BACKEND_URL
|
||||
subdomain: process.env.NHOST_SUBDOMAIN
|
||||
region: process.env.NHOST_REGION
|
||||
})
|
||||
// highlight-end
|
||||
|
||||
@@ -175,16 +165,16 @@ const App = () => (
|
||||
|
||||
That prop avoids having an additional request to fetch the current user.
|
||||
|
||||
Next, make sure to create an environment variable named
|
||||
`NHOST_BACKEND_URL` to store your Nhost backend URL:
|
||||
Next, store the environment variables for `subdomain` and `region` in `.env`:
|
||||
|
||||
```yaml title=".env"
|
||||
NHOST_BACKEND_URL=YOUR_NHOST_BACKEND_URL
|
||||
NHOST_SUBDOMAIN=[subdomain]
|
||||
NHOST_REGION=[region]
|
||||
```
|
||||
|
||||
You can find your Nhost backend URL for your project from [your dashboard](https://app.nhost.io) as shown below:
|
||||
You find your Nhost project's `subdomain` and `region` in the [project overview](https://app.nhost.io):
|
||||
|
||||

|
||||

|
||||
|
||||
Finally, we need to customize the GraphQL Endpoint for our RedwoodJS app. Indeed, by default, RedwoodJS provides a built-in GraphQL server under the `api` side. However, as we already have our own GraphQL server through Nhost and Hasura, we do not need it.
|
||||
|
||||
@@ -194,7 +184,7 @@ So, open the RedwoodJS configuration file, `redwood.toml`, and change the GraphQ
|
||||
[web]
|
||||
apiUrl = "/.redwood/functions"
|
||||
# highlight-next-line
|
||||
apiGraphQLUrl = "${NHOST_BACKEND_URL}/v1/graphql"
|
||||
apiGraphQLUrl = "https://${NHOST_SUBDOMAIN}.graphql.${NHOST_REGION}.nhost.run/v1"
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
@@ -39,12 +39,12 @@ You'll need **Node.js** version 14 or later: [install it from here](https://node
|
||||
|
||||
### Create a new Nhost app
|
||||
|
||||
import CreateApp from '@site/src/components/create-nhost-app.mdx'
|
||||
import CreateApp from '@site/src/components/create-nhost-project.mdx'
|
||||
|
||||
<CreateApp />
|
||||
|
||||
:::info
|
||||
You can also connect your Nhost app to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
You can also connect your Nhost project to a GitHub repository. When you do this, any updates you push to your code will automatically be deployed. [Learn more](https://docs.nhost.io/platform/github-integration).
|
||||
:::
|
||||
|
||||
## Initialize the app
|
||||
@@ -153,7 +153,8 @@ import 'uno.css'
|
||||
|
||||
// highlight-start
|
||||
const nhost = new NhostClient({
|
||||
backendUrl: import.meta.env.VITE_NHOST_URL
|
||||
subdomain: import.meta.env.VITE_NHOST_SUBDOMAIN
|
||||
region: import.meta.env.VITE_NHOST_REGION
|
||||
})
|
||||
// highlight-end
|
||||
|
||||
@@ -170,16 +171,16 @@ app
|
||||
app.mount('#app')
|
||||
```
|
||||
|
||||
Finally, make sure to create an environment variable named
|
||||
`VITE_NHOST_URL` to store your Nhost backend URL:
|
||||
Finally, store the environment variables for `subdomain` and `region` in `.env`:
|
||||
|
||||
```bash title=".env"
|
||||
VITE_NHOST_URL=YOUR_NHOST_BACKEND_URL
|
||||
```yaml title=".env.development"
|
||||
VITE_NHOST_SUBDOMAIN=[subdomain]
|
||||
VITE_NHOST_REGION=[region]
|
||||
```
|
||||
|
||||
You can find your Nhost backend URL for your project from [your dashboard](https://app.nhost.io) as shown below:
|
||||
You find your Nhost project's `subdomain` and `region` in the [project overview](https://app.nhost.io):
|
||||
|
||||

|
||||

|
||||
|
||||
## Build the app
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Serverless functions can be used to handle [event triggers](/platform/database/e
|
||||
|
||||
## Creating a Serverless Function
|
||||
|
||||
Every `.js` (JavaScript) and `.ts` (TypeScript) file in the `functions/` folder of your Nhost app is its own serverless function.
|
||||
Every `.js` (JavaScript) and `.ts` (TypeScript) file in the `functions/` folder of your Nhost project is its own serverless function.
|
||||
|
||||
<Tabs groupId="language">
|
||||
<TabItem value="ts" label="TypeScript" default>
|
||||
@@ -30,7 +30,7 @@ export default (req: Request, res: Response) => {
|
||||
|
||||
:::info
|
||||
|
||||
You **MUST** install `express` locally in the base directory of your Nhost app.
|
||||
You **MUST** install `express` locally in the base directory of your Nhost project.
|
||||
|
||||
```bash
|
||||
npm install -d express @types/express
|
||||
@@ -51,7 +51,7 @@ export default (req, res) => {
|
||||
|
||||
:::info
|
||||
|
||||
You **MUST** install `express` locally in the base directory of your Nhost app.
|
||||
You **MUST** install `express` locally in the base directory of your Nhost project.
|
||||
|
||||
```bash
|
||||
npm install -d express
|
||||
@@ -76,12 +76,12 @@ HTTP endpoints are automatically generated based on the file structure inside `f
|
||||
|
||||
Here's an example of four serverless functions with their files and their HTTP endpoints:
|
||||
|
||||
| File | HTTP Endpoint |
|
||||
| --------------------------- | ------------------------------------------------------------- |
|
||||
| `functions/index.js` | `https://[app-subdomain].nhost.run/v1/functions/` |
|
||||
| `functions/users/index.ts` | `https://[app-subdomain].nhost.run/v1/functions/users` |
|
||||
| `functions/users/active.ts` | `https://[app-subdomain].nhost.run/v1/functions/users/active` |
|
||||
| `functions/my-company.js` | `https://[app-subdomain].nhost.run/v1/functions/my-company` |
|
||||
| File | HTTP Endpoint |
|
||||
| --------------------------- | ----------------------------------------------------------------- |
|
||||
| `functions/index.js` | `https://[project-subdomain].nhost.run/v1/functions/` |
|
||||
| `functions/users/index.ts` | `https://[project-subdomain].nhost.run/v1/functions/users` |
|
||||
| `functions/users/active.ts` | `https://[project-subdomain].nhost.run/v1/functions/users/active` |
|
||||
| `functions/my-company.js` | `https://[project-subdomain].nhost.run/v1/functions/my-company` |
|
||||
|
||||
---
|
||||
|
||||
@@ -95,12 +95,16 @@ Serverless functions are billed per GB-sec or GB-hour. 1 GB-hour is 3600 GB-seco
|
||||
|
||||
1 GB-sec is 1 function with 1 GB of RAM running for 1 second. If 1 function with 1 GB of RAM runs for 3600 seconds, that's the equivalent of 1 GB-hour.
|
||||
|
||||
All serverless functions in production are running with 128 MB of RAM.
|
||||
All serverless functions in production are running with 1 GB of RAM.
|
||||
|
||||
## Node Version
|
||||
|
||||
All serverless functions in production are running Node.js version 14.x.
|
||||
All serverless functions in production are running Node.js version 16.x.
|
||||
|
||||
## Regions
|
||||
|
||||
Serverless Functions are always deployed to the same region as your app.
|
||||
Serverless Functions are always deployed to the same region as your project.
|
||||
|
||||
## Local Debugging
|
||||
|
||||
To see the output of `console.log` in your terminal, you can use `nhost logs -f functions`.
|
||||
|
||||
@@ -20,7 +20,7 @@ File metadata is stored in your database in the `files` table in the `storage` s
|
||||
- Create GraphQL relationships between files and your database tables.
|
||||
|
||||
:::warning
|
||||
Don't modify the database schema, nor GraphQL root fields in any of the tables in the `storage` schema.
|
||||
Don't modify the database schema, nor GraphQL root fields in any of the tables in the `storage` schema.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
@@ -28,8 +28,8 @@ You're allowed to add and modify the following:
|
||||
|
||||
- GraphQL Relationships
|
||||
- Permissions
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
### Upload File
|
||||
|
||||
@@ -159,16 +159,11 @@ Permissions to upload, download, and delete files are managed through Hasura's p
|
||||
|
||||
### Upload
|
||||
|
||||
To upload a file, a user must have the **`insert` permission** to the `storage.files` table. The following columns must be allowed to insert:
|
||||
|
||||
- `id`
|
||||
- `bucket_id`
|
||||
- `name`
|
||||
- `mime_type`
|
||||
To upload a file, a user must have the **`insert` permission** to the `storage.files` table. The `id` column must be granted.
|
||||
|
||||
### Download
|
||||
|
||||
To download a file, a user must have the **`select` permission** to the `storage.files` table. Only the `id` column is required, but we recommend allowing to select all columns.
|
||||
To download a file, a user must have the **`select` permission** to the `storage.files` table. **All** columns must be granted.
|
||||
|
||||
### Delete
|
||||
|
||||
@@ -200,31 +195,35 @@ Let's say you want to build a CRM system and you want to store files for custome
|
||||
Start with, you would have two tables:
|
||||
|
||||
1. `customers` - Customer data.
|
||||
2. `customer_files` - What file belongs to what customer.
|
||||
2. `customer_files` - What file belongs to what customer
|
||||
|
||||
```text
|
||||
```text
|
||||
- customers
|
||||
- id
|
||||
- name
|
||||
- address
|
||||
|
||||
customer_files
|
||||
- id
|
||||
- customer_id (Foreign Key to `customers.id`)
|
||||
- file_id (Foreign Key to `storage.files.id`)
|
||||
```
|
||||
|
||||
You would also create [Hasura Relationships](https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/table-relationships/index/) (GraphQL relationships) between between `customers` and `customer_files` and between `customer_files` and `storage.files`.
|
||||
You would also create a [Hasura Relationship](https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/table-relationships/index/) (GraphQL relationship) between between `customers` and `customer_files` and between `customer_files` and `storage.files`.
|
||||
|
||||
With the two tables and GraphQL relationships in place, you can query customers and the customer's files like this:
|
||||
|
||||
```graphql
|
||||
query {
|
||||
customers { # customers table
|
||||
customers {
|
||||
# customers table
|
||||
id
|
||||
name
|
||||
customer_files { # customer_files tabel
|
||||
customer_files {
|
||||
# customer_files table
|
||||
id
|
||||
file { # storage.files table
|
||||
file {
|
||||
# storage.files table
|
||||
id
|
||||
name
|
||||
size
|
||||
@@ -239,6 +238,6 @@ The file upload process would be as follows:
|
||||
|
||||
1. Upload a file.
|
||||
2. Get the returned file id.
|
||||
3. Insert the file `id` and the customer's `id` into the `customer_files` table.
|
||||
3. Insert (GraphQL Mutation) the file `id` and the customer's `id` into the `customer_files` table.
|
||||
|
||||
This would allow you to upload and download files belonging to specific customers in your CRM system.
|
||||
This would allow you to upload and download files belonging to specific customers in your CRM system.
|
||||
|
||||
@@ -3,15 +3,15 @@ title: 'init'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
Intialize a local Nhost app in the current working directory.
|
||||
Initialize a local Nhost project in the current working directory.
|
||||
|
||||
```
|
||||
nhost init
|
||||
```
|
||||
|
||||
If you already have a Nhost app in Nhost Cloud you can use that app as a starting point by appending `--remote` to the command.
|
||||
If you already have a Nhost project in Nhost Cloud you can use that project as a starting point by appending `--remote` to the command.
|
||||
|
||||
This will pull the database migrations and Hasura metadata from the Nhost Cloud app locally for you to use as a starting point.
|
||||
This will pull the database migrations and Hasura metadata from the Nhost Cloud project locally for you to use as a starting point.
|
||||
|
||||
```
|
||||
nhost init --remote
|
||||
|
||||
@@ -3,7 +3,7 @@ title: 'link'
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
Link the local Nhost app in your working directory to an app in Nhost Cloud.
|
||||
Link the local Nhost project in your working directory to a project in Nhost Cloud.
|
||||
|
||||
```bash
|
||||
nhost link
|
||||
|
||||
@@ -3,7 +3,7 @@ title: 'list'
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
List all your Nhost apps in Nhost Cloud.
|
||||
List all your Nhost projects in Nhost Cloud.
|
||||
|
||||
```bash
|
||||
nhost list
|
||||
|
||||
@@ -3,11 +3,11 @@ title: 'up'
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
Launch the development environment for your app. Once the environment is up, the command will:
|
||||
Launch the development environment for your project. Once the environment is up, the command will:
|
||||
|
||||
- Apply database migrations.
|
||||
- Apply the Hasura metadata.
|
||||
- Apply seed data.
|
||||
- Apply [seed data](/platform/database#seed-data).
|
||||
|
||||
```bash
|
||||
nhost up
|
||||
|
||||
@@ -4,7 +4,7 @@ title: signUp()
|
||||
sidebar_label: signUp()
|
||||
slug: /reference/javascript/auth/sign-up
|
||||
description: Use `nhost.auth.signUp` to sign up a user using email and password. If you want to sign up a user using passwordless email (Magic Link), SMS, or an OAuth provider, use the `signIn` function instead.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L101
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L108
|
||||
---
|
||||
|
||||
# `signUp()`
|
||||
@@ -22,12 +22,6 @@ nhost.auth.signUp({
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`SignUpEmailPasswordParams`](/reference/docgen/javascript/auth/types/sign-up-email-password-params)
|
||||
|
||||
| Property | Type | Required | Notes |
|
||||
| :------------------------------------------------------------------------------------------------------- | :-------------- | :------: | :---- |
|
||||
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>password</span> | `string` | ✔️ | |
|
||||
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>email</span> | `string` | ✔️ | |
|
||||
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>options</span> | `SignUpOptions` | | |
|
||||
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignUpParams`](/reference/docgen/javascript/auth/types/sign-up-params)
|
||||
|
||||
---
|
||||
|
||||
@@ -4,7 +4,7 @@ title: signIn()
|
||||
sidebar_label: signIn()
|
||||
slug: /reference/javascript/auth/sign-in
|
||||
description: Use `nhost.auth.signIn` to sign in a user using email and password, passwordless (email or sms) or an external provider. `signIn` can be used to sign in a user in various ways depending on the parameters.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L144
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L170
|
||||
---
|
||||
|
||||
# `signIn()`
|
||||
@@ -22,7 +22,7 @@ nhost.auth.signIn({
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignInParams`](/reference/docgen/javascript/auth/types/sign-in-params)
|
||||
**<span className="parameter-name">params</span>** <span className="optional-status">optional</span> [`SignInParams`](/reference/docgen/javascript/auth/types/sign-in-params)
|
||||
|
||||
---
|
||||
|
||||
@@ -53,8 +53,21 @@ nhost.auth.signIn({ email: 'joe@example.com' })
|
||||
|
||||
```ts
|
||||
// [step 1/2] Passwordless sign in using SMS
|
||||
nhost.auth.signIn({ phoneNumber: '001122334455' })
|
||||
nhost.auth.signIn({ phoneNumber: '+11233213123' })
|
||||
|
||||
// [step 2/2] Finish passwordless sign in using SMS (OTP)
|
||||
nhost.auth.signIn({ phoneNumber: '001122334455', otp: '123456' })
|
||||
nhost.auth.signIn({ phoneNumber: '+11233213123', otp: '123456' })
|
||||
```
|
||||
|
||||
### Sign in anonymously
|
||||
|
||||
```ts
|
||||
// Sign in anonymously
|
||||
nhost.auth.signIn()
|
||||
|
||||
// Later in the application, the user can complete their registration
|
||||
nhost.auth.signUp({
|
||||
email: 'joe@example.com',
|
||||
password: 'secret-password'
|
||||
})
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ title: signOut()
|
||||
sidebar_label: signOut()
|
||||
slug: /reference/javascript/auth/sign-out
|
||||
description: Use `nhost.auth.signOut` to sign out the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L222
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L270
|
||||
---
|
||||
|
||||
# `signOut()`
|
||||
@@ -31,7 +31,7 @@ nhost.auth.signOut()
|
||||
nhost.auth.signOut()
|
||||
```
|
||||
|
||||
### Sign out the user from all decvices
|
||||
### Sign out the user from all devices
|
||||
|
||||
```ts
|
||||
nhost.auth.signOut({ all: true })
|
||||
|
||||
@@ -4,7 +4,7 @@ title: resetPassword()
|
||||
sidebar_label: resetPassword()
|
||||
slug: /reference/javascript/auth/reset-password
|
||||
description: Use `nhost.auth.resetPassword` to reset the password for a user. This will send a reset-password link in an email to the user. When the user clicks the reset-password link the user is automatically signed-in. Once signed-in, the user can change their password using `nhost.auth.changePassword()`.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L238
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L286
|
||||
---
|
||||
|
||||
# `resetPassword()`
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
title: changePassword()
|
||||
sidebar_label: changePassword()
|
||||
slug: /reference/javascript/auth/change-password
|
||||
description: Use `nhost.auth.changePassword` to change the password for the user. The old password is not needed.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L254
|
||||
description: Use `nhost.auth.changePassword` to change the password for the signed-in user. The old password is not needed. In case the user is not signed-in, a password reset ticket needs to be provided.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L302
|
||||
---
|
||||
|
||||
# `changePassword()`
|
||||
|
||||
Use `nhost.auth.changePassword` to change the password for the user. The old password is not needed.
|
||||
Use `nhost.auth.changePassword` to change the password for the signed-in user. The old password is not needed. In case the user is not signed-in, a password reset ticket needs to be provided.
|
||||
|
||||
```ts
|
||||
nhost.auth.changePassword({ newPassword: 'new-secret-password' })
|
||||
@@ -24,5 +24,6 @@ nhost.auth.changePassword({ newPassword: 'new-secret-password' })
|
||||
| Property | Type | Required | Notes |
|
||||
| :---------------------------------------------------------------------------------------------------------- | :------- | :------: | :---- |
|
||||
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>newPassword</span> | `string` | ✔️ | |
|
||||
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>ticket</span> | `string` | | |
|
||||
|
||||
---
|
||||
|
||||
@@ -4,7 +4,7 @@ title: sendVerificationEmail()
|
||||
sidebar_label: sendVerificationEmail()
|
||||
slug: /reference/javascript/auth/send-verification-email
|
||||
description: Use `nhost.auth.sendVerificationEmail` to send a verification email to the specified email. The email contains a verification-email link. When the user clicks the verification-email link their email is verified.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L270
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L321
|
||||
---
|
||||
|
||||
# `sendVerificationEmail()`
|
||||
|
||||
@@ -4,7 +4,7 @@ title: changeEmail()
|
||||
sidebar_label: changeEmail()
|
||||
slug: /reference/javascript/auth/change-email
|
||||
description: Use `nhost.auth.changeEmail` to change a user's email. This will send a confirm-email-change link in an email to the new email. Once the user clicks on the confirm-email-change link the email will be change to the new email.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L289
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L340
|
||||
---
|
||||
|
||||
# `changeEmail()`
|
||||
|
||||
@@ -4,7 +4,7 @@ title: deanonymize()
|
||||
sidebar_label: deanonymize()
|
||||
slug: /reference/javascript/auth/deanonymize
|
||||
description: Use `nhost.auth.deanonymize` to deanonymize a user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L305
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L356
|
||||
---
|
||||
|
||||
# `deanonymize()`
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: addSecurityKey()
|
||||
sidebar_label: addSecurityKey()
|
||||
slug: /reference/javascript/auth/add-security-key
|
||||
description: Use `nhost.auth.addSecurityKey to add a security key to the user, using the WebAuthn API.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L394
|
||||
---
|
||||
|
||||
# `addSecurityKey()`
|
||||
|
||||
Use `nhost.auth.addSecurityKey to add a security key to the user, using the WebAuthn API.
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">nickname</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
optional human-readable nickname for the security key
|
||||
|
||||
---
|
||||
@@ -4,7 +4,7 @@ title: onTokenChanged()
|
||||
sidebar_label: onTokenChanged()
|
||||
slug: /reference/javascript/auth/on-token-changed
|
||||
description: Use `nhost.auth.onTokenChanged` to add a custom function that runs every time the access or refresh token is changed.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L348
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L412
|
||||
---
|
||||
|
||||
# `onTokenChanged()`
|
||||
@@ -4,7 +4,7 @@ title: onAuthStateChanged()
|
||||
sidebar_label: onAuthStateChanged()
|
||||
slug: /reference/javascript/auth/on-auth-state-changed
|
||||
description: Use `nhost.auth.onAuthStateChanged` to add a custom function that runs every time the authentication status of the user changes. E.g. add a custom function that runs every time the authentication status changes from signed-in to signed-out.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L383
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L447
|
||||
---
|
||||
|
||||
# `onAuthStateChanged()`
|
||||
@@ -4,7 +4,7 @@ title: isAuthenticated()
|
||||
sidebar_label: isAuthenticated()
|
||||
slug: /reference/javascript/auth/is-authenticated
|
||||
description: Use `nhost.auth.isAuthenticated` to check if the user is authenticated or not.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L425
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L489
|
||||
---
|
||||
|
||||
# `isAuthenticated()`
|
||||
@@ -4,13 +4,16 @@ title: isAuthenticatedAsync()
|
||||
sidebar_label: isAuthenticatedAsync()
|
||||
slug: /reference/javascript/auth/is-authenticated-async
|
||||
description: Use `nhost.auth.isAuthenticatedAsync` to wait (await) for any internal authentication network requests to finish and then return the authentication status.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L443
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L510
|
||||
---
|
||||
|
||||
# `isAuthenticatedAsync()`
|
||||
|
||||
Use `nhost.auth.isAuthenticatedAsync` to wait (await) for any internal authentication network requests to finish and then return the authentication status.
|
||||
|
||||
The promise won't resolve until the authentication status is known.
|
||||
Attention: when using auto-signin and a refresh token is present in the client storage, the promise won't resolve if the server can't be reached (e.g. offline) or if it returns an internal error.
|
||||
|
||||
```ts
|
||||
const isAuthenticated = await nhost.auth.isAuthenticatedAsync()
|
||||
|
||||
@@ -4,7 +4,7 @@ title: getAuthenticationStatus()
|
||||
sidebar_label: getAuthenticationStatus()
|
||||
slug: /reference/javascript/auth/get-authentication-status
|
||||
description: Use `nhost.auth.getAuthenticationStatus` to get the authentication status of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L469
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L538
|
||||
---
|
||||
|
||||
# `getAuthenticationStatus()`
|
||||
@@ -14,6 +14,8 @@ Use `nhost.auth.getAuthenticationStatus` to get the authentication status of the
|
||||
If `isLoading` is `true`, the client doesn't know whether the user is authenticated yet or not
|
||||
because some internal authentication network requests have not been resolved yet.
|
||||
|
||||
The `connectionAttempts` returns the number of times the client has tried to connect to the server with no success (offline, or the server retruned an internal error).
|
||||
|
||||
```ts
|
||||
const { isAuthenticated, isLoading } = nhost.auth.getAuthenticationStatus()
|
||||
|
||||
@@ -4,7 +4,7 @@ title: getAccessToken()
|
||||
sidebar_label: getAccessToken()
|
||||
slug: /reference/javascript/auth/get-access-token
|
||||
description: Use `nhost.auth.getAccessToken` to get the access token of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L499
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L575
|
||||
---
|
||||
|
||||
# `getAccessToken()`
|
||||
@@ -4,7 +4,7 @@ title: getDecodedAccessToken()
|
||||
sidebar_label: getDecodedAccessToken()
|
||||
slug: /reference/javascript/auth/get-decoded-access-token
|
||||
description: Use `nhost.auth.getDecodedAccessToken` to get the decoded access token of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L514
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L590
|
||||
---
|
||||
|
||||
# `getDecodedAccessToken()`
|
||||
@@ -4,7 +4,7 @@ title: getHasuraClaims()
|
||||
sidebar_label: getHasuraClaims()
|
||||
slug: /reference/javascript/auth/get-hasura-claims
|
||||
description: Use `nhost.auth.getHasuraClaims` to get the Hasura claims of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L531
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L607
|
||||
---
|
||||
|
||||
# `getHasuraClaims()`
|
||||
@@ -4,7 +4,7 @@ title: getHasuraClaim()
|
||||
sidebar_label: getHasuraClaim()
|
||||
slug: /reference/javascript/auth/get-hasura-claim
|
||||
description: Use `nhost.auth.getHasuraClaim` to get the value of a specific Hasura claim of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L549
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L625
|
||||
---
|
||||
|
||||
# `getHasuraClaim()`
|
||||
@@ -4,7 +4,7 @@ title: refreshSession()
|
||||
sidebar_label: refreshSession()
|
||||
slug: /reference/javascript/auth/refresh-session
|
||||
description: Use `nhost.auth.refreshSession` to refresh the session with either the current internal refresh token or an external refresh token.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L572
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L648
|
||||
---
|
||||
|
||||
# `refreshSession()`
|
||||
@@ -4,7 +4,7 @@ title: getSession()
|
||||
sidebar_label: getSession()
|
||||
slug: /reference/javascript/auth/get-session
|
||||
description: Use `nhost.auth.getSession()` to get the session of the user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L616
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L689
|
||||
---
|
||||
|
||||
# `getSession()`
|
||||
@@ -4,7 +4,7 @@ title: getUser()
|
||||
sidebar_label: getUser()
|
||||
slug: /reference/javascript/auth/get-user
|
||||
description: Use `nhost.auth.getUser()` to get the signed-in user.
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L631
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L704
|
||||
---
|
||||
|
||||
# `getUser()`
|
||||
@@ -4,7 +4,7 @@ title: HasuraAuthClient
|
||||
sidebar_label: Auth
|
||||
description: No description provided.
|
||||
slug: /reference/javascript/auth
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L59
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/hasura-auth-client.ts#L65
|
||||
---
|
||||
|
||||
# `HasuraAuthClient`
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiChangeEmailResponse
|
||||
sidebar_label: ApiChangeEmailResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L181
|
||||
---
|
||||
|
||||
# `ApiChangeEmailResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiChangePasswordResponse
|
||||
sidebar_label: ApiChangePasswordResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L173
|
||||
---
|
||||
|
||||
# `ApiChangePasswordResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiDeanonymizeResponse
|
||||
sidebar_label: ApiDeanonymizeResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L185
|
||||
---
|
||||
|
||||
# `ApiDeanonymizeResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiRefreshTokenResponse
|
||||
sidebar_label: ApiRefreshTokenResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L161
|
||||
---
|
||||
|
||||
# `ApiRefreshTokenResponse`
|
||||
|
||||
```ts
|
||||
type ApiRefreshTokenResponse =
|
||||
| { session: null; error: ErrorPayload }
|
||||
| { session: Session; error: null }
|
||||
```
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiResetPasswordResponse
|
||||
sidebar_label: ApiResetPasswordResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L169
|
||||
---
|
||||
|
||||
# `ApiResetPasswordResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiSendVerificationEmailResponse
|
||||
sidebar_label: ApiSendVerificationEmailResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L177
|
||||
---
|
||||
|
||||
# `ApiSendVerificationEmailResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiSignInData
|
||||
sidebar_label: ApiSignInData
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L150
|
||||
---
|
||||
|
||||
# `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)
|
||||
|
||||
---
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiSignOutResponse
|
||||
sidebar_label: ApiSignOutResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L165
|
||||
---
|
||||
|
||||
# `ApiSignOutResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: ApiSignUpEmailPasswordResponse
|
||||
sidebar_label: ApiSignUpEmailPasswordResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L146
|
||||
---
|
||||
|
||||
# `ApiSignUpEmailPasswordResponse`
|
||||
|
||||
```ts
|
||||
type ApiSignUpEmailPasswordResponse =
|
||||
| { session: null; error: ErrorPayload }
|
||||
| { session: Session; error: null }
|
||||
```
|
||||
@@ -4,7 +4,7 @@ title: AuthChangeEvent
|
||||
sidebar_label: AuthChangeEvent
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L128
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L118
|
||||
---
|
||||
|
||||
# `AuthChangeEvent`
|
||||
|
||||
@@ -4,7 +4,7 @@ title: AuthChangedFunction
|
||||
sidebar_label: AuthChangedFunction
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L130
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L120
|
||||
---
|
||||
|
||||
# `AuthChangedFunction`
|
||||
@@ -12,6 +12,6 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
|
||||
```ts
|
||||
type AuthChangedFunction = () => (
|
||||
event: AuthChangeEvent,
|
||||
session: Session | null
|
||||
session: NhostSession | null
|
||||
) => void
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ title: ChangePasswordParams
|
||||
sidebar_label: ChangePasswordParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L90
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L89
|
||||
---
|
||||
|
||||
# `ChangePasswordParams`
|
||||
@@ -16,3 +16,7 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
|
||||
**<span className="parameter-name">newPassword</span>** <span className="optional-status">required</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">ticket</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
---
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: Headers
|
||||
sidebar_label: Headers
|
||||
title: CommonSignUpParams
|
||||
sidebar_label: CommonSignUpParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L139
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L25
|
||||
---
|
||||
|
||||
# `Headers`
|
||||
# `CommonSignUpParams`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">Authorization</span>** <span className="optional-status">optional</span> `string`
|
||||
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> `SignUpOptions`
|
||||
|
||||
---
|
||||
@@ -11,7 +11,7 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
|
||||
|
||||
```ts
|
||||
type DeanonymizeParams =
|
||||
| ({ signInMethod: 'email-password' } & SignUpParams)
|
||||
| ({ signInMethod: 'email-password' } & SignUpEmailPasswordParams)
|
||||
| ({
|
||||
signInMethod: 'passwordless'
|
||||
connection: 'email'
|
||||
|
||||
@@ -4,7 +4,7 @@ title: NhostAuthConstructorParams
|
||||
sidebar_label: NhostAuthConstructorParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L15
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L17
|
||||
---
|
||||
|
||||
# `NhostAuthConstructorParams`
|
||||
|
||||
@@ -4,11 +4,11 @@ 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#L132
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L122
|
||||
---
|
||||
|
||||
# `OnTokenChangedFunction`
|
||||
|
||||
```ts
|
||||
type OnTokenChangedFunction = () => (session: Session | null) => void
|
||||
type OnTokenChangedFunction = () => (session: NhostSession | null) => void
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Provider
|
||||
sidebar_label: Provider
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L140
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/core/src/types.ts#L153
|
||||
---
|
||||
|
||||
# `Provider`
|
||||
@@ -22,4 +22,7 @@ type Provider =
|
||||
| 'strava'
|
||||
| 'gitlab'
|
||||
| 'bitbucket'
|
||||
| 'discord'
|
||||
| 'twitch'
|
||||
| 'workos'
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ title: ResetPasswordParams
|
||||
sidebar_label: ResetPasswordParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L85
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L84
|
||||
---
|
||||
|
||||
# `ResetPasswordParams`
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: Session
|
||||
sidebar_label: Session
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L23
|
||||
---
|
||||
|
||||
# `Session`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">accessToken</span>** <span className="optional-status">required</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">accessTokenExpiresIn</span>** <span className="optional-status">required</span> `number`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">refreshToken</span>** <span className="optional-status">required</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">user</span>** <span className="optional-status">required</span> `null` | [`User`](/reference/docgen/javascript/auth/types/user)
|
||||
|
||||
---
|
||||
@@ -1,19 +1,19 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: LoginData
|
||||
sidebar_label: LoginData
|
||||
title: SignInEmailPasswordOtpParams
|
||||
sidebar_label: SignInEmailPasswordOtpParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L134
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L46
|
||||
---
|
||||
|
||||
# `LoginData`
|
||||
# `SignInEmailPasswordOtpParams`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">mfa</span>** <span className="optional-status">optional</span> `boolean`
|
||||
**<span className="parameter-name">otp</span>** <span className="optional-status">required</span> `string`
|
||||
|
||||
---
|
||||
|
||||
@@ -4,7 +4,7 @@ title: SignInEmailPasswordParams
|
||||
sidebar_label: SignInEmailPasswordParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L54
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L41
|
||||
---
|
||||
|
||||
# `SignInEmailPasswordParams`
|
||||
|
||||
@@ -4,7 +4,7 @@ title: SignInParams
|
||||
sidebar_label: SignInParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L78
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L75
|
||||
---
|
||||
|
||||
# `SignInParams`
|
||||
@@ -12,7 +12,9 @@ custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-j
|
||||
```ts
|
||||
type SignInParams =
|
||||
| SignInEmailPasswordParams
|
||||
| SignInEmailPasswordOtpParams
|
||||
| SignInPasswordlessEmailParams
|
||||
| SignInPasswordlessSecurityKeyParams
|
||||
| SignInPasswordlessSmsOtpParams
|
||||
| SignInPasswordlessSmsParams
|
||||
| SignInWithProviderOptions
|
||||
|
||||
@@ -4,7 +4,7 @@ title: SignInPasswordlessEmailParams
|
||||
sidebar_label: SignInPasswordlessEmailParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L59
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L51
|
||||
---
|
||||
|
||||
# `SignInPasswordlessEmailParams`
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: SignInPasswordlessSecurityKeyParams
|
||||
sidebar_label: SignInPasswordlessSecurityKeyParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L56
|
||||
---
|
||||
|
||||
# `SignInPasswordlessSecurityKeyParams`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">securityKey</span>** <span className="optional-status">required</span> `"true"`
|
||||
|
||||
---
|
||||
@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsOtpParams
|
||||
sidebar_label: SignInPasswordlessSmsOtpParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L69
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L66
|
||||
---
|
||||
|
||||
# `SignInPasswordlessSmsOtpParams`
|
||||
|
||||
@@ -4,7 +4,7 @@ title: SignInPasswordlessSmsParams
|
||||
sidebar_label: SignInPasswordlessSmsParams
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L64
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L61
|
||||
---
|
||||
|
||||
# `SignInPasswordlessSmsParams`
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: SignInReponse
|
||||
sidebar_label: SignInReponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L117
|
||||
---
|
||||
|
||||
# `SignInReponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">session</span>** <span className="optional-status">required</span> `null` | [`Session`](/reference/docgen/javascript/auth/types/session)
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">mfa</span>** <span className="optional-status">optional</span> `{ enabled: boolean, ticket: string }`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">providerUrl</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">provider</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
---
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
# ⚠️ AUTO-GENERATED CONTENT. DO NOT EDIT THIS FILE DIRECTLY! ⚠️
|
||||
title: SignInResponse
|
||||
sidebar_label: SignInResponse
|
||||
description: No description provided.
|
||||
displayed_sidebar: referenceSidebar
|
||||
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/hasura-auth-js/src/utils/types.ts#L45
|
||||
---
|
||||
|
||||
# `SignInResponse`
|
||||
|
||||
## Parameters
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">session</span>** <span className="optional-status">required</span> `null` | [`Session`](/reference/docgen/javascript/auth/types/session)
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">mfa</span>** <span className="optional-status">required</span> `null` | `{ ticket: string }`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">error</span>** <span className="optional-status">required</span> `null` | `ErrorPayload`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">providerUrl</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
---
|
||||
|
||||
**<span className="parameter-name">provider</span>** <span className="optional-status">optional</span> `string`
|
||||
|
||||
---
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user