Commit a1522c5
authored
feat: Make use session sync, use a plugin based approach for session fetching, add auth middleware, add lastRefreshedAt property to session(#69)
* feat: use more h3 native utilities in nuxt auth handler
* cleanup: move fetch and url helpers to utils, improve some typing
* cleanup: restructure useSession to prepare for sync, move url and navigate utiltiy to urls.ts
* feat: move all state to one composable, resolve empty object todo, start on pplugin
* feat: switch to plugin based approach fully
* cleanup: no more async _fetch as its unused
* cleanup/feat!: rename lastSync to lastRefreshedAt and expose + document it, make useSession data read-only, improve docs by expanding getting started + configuration section + credit @JoaoPedroAS51 + fix type check command, add lastRefrehsedAt to app.vue, add a new example page to the playground that will always be unprotected, remove now() util in favor of a real date, make `getCsrfToken` return the token right away
* fix: use `callWithNuxt` in nested composable calls
* polishing: improve docs feature section, return promise from async function firectly
* refactor: use url based on request event on client
* refactor: only get session if it was not fetched server-side
* refactor: dont make status readonly, return promise directly
* refactor: stop using deprecated utility during module setup
* feat: add note to local middleware docs, a bit better logging by module setup
* polish: take over some env var config from next-auth nuxt example1 parent c27d5a2 commit a1522c5
File tree
24 files changed
+524
-402
lines changed- docs/content
- 1.welcome
- 4.usage
- playground
- middleware
- pages
- protected
- server/middleware
- src
- runtime
- composables
- middleware
- server/services
- utils
24 files changed
+524
-402
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
0 commit comments