Skip to content

Commit e64a195

Browse files
authored
Merge branch 'main' into update-pull-request
2 parents 25ee10e + 8c73bf3 commit e64a195

File tree

110 files changed

+3387
-3128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+3387
-3128
lines changed

.editorconfig

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Before posting an enchantment, please consider the following questions:
4141
- Would it require a major, minor, or patch release?
4242
- Which providers would be impacted by this change?
4343

44-
> [!IMPORTANT]
44+
> [!IMPORTANT]
4545
> The more impact your Enchantment has on the package, the longer it may take to push, as we need to integrate it into our release cycle.
4646
47-
> [!IMPORTANT]
47+
> [!IMPORTANT]
4848
> While we appreciate every request, we cannot accept them all. Please be understanding if we do not accept your request.
4949
5050
## Pull requests
@@ -94,10 +94,10 @@ To start developing on this package, please follow the quick start guide below.
9494
```
9595
8. [Open a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests), and fill out the provided fields.
9696

97-
> [!TIP]
97+
> [!TIP]
9898
> Read more about how to use the included playground [here](../README.md#development).
9999
100-
> [!IMPORTANT]
100+
> [!IMPORTANT]
101101
> By submitting a Pull request, you agree to license your work under the MIT license used by the project.
102102
103103
### Reviews
@@ -106,7 +106,7 @@ After you submit your Pull request, a member of our core team will review it. Pl
106106

107107
After receiving a review, please address any comments left by the reviewer or debate them if you disagree. This process will repeat until the pull request is approved and merged!
108108

109-
> [!NOTE]
109+
> [!NOTE]
110110
> Besides a manual review of your pull request, we will run an automated CI pipeline on your code.
111111
112112
## Release cycles
@@ -119,7 +119,7 @@ This package follows [Semantic Versioning 2.0.0](https://semver.org/).
119119

120120
If we release a pre-version of a new release, we will tag it with `next` in the npmjs release and add one of the following additions to the versions:
121121

122-
- **ALPHA**: Early development build of a new release
122+
- **ALPHA**: Early development build of a new release
123123
- Not properly tested yet
124124
- **RC**: Potential release candidate of a new release
125125
- Internally tested on a series of demo apps

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
### 📚 Description
2121

22-
2322
### 📝 Checklist
2423

2524
- [ ] I have linked an issue or discussion.

.github/reproduire/needs-reproduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Hello 👋
22

3-
Please provide a [reproduction](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction) for this issue 🙏
3+
Please provide a [reproduction](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction) for this issue 🙏
44

55
<details>
66
<summary>How can I create a reproduction?</summary>
77

8-
Please use one of the following links to reproduce your issue.
8+
Please use one of the following links to reproduce your issue.
99

1010
- https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
1111
- https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

.github/workflows/ci.yaml

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: nodejs CI
1+
name: CI
22

33
on:
44
push:
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ env.NODE_VER }}
29-
cache: 'pnpm'
29+
cache: "pnpm"
3030

3131
- name: Install deps and prepare types
3232
run: pnpm i && pnpm dev:prepare
@@ -56,7 +56,7 @@ jobs:
5656
uses: actions/setup-node@v4
5757
with:
5858
node-version: ${{ env.NODE_VER }}
59-
cache: 'pnpm'
59+
cache: "pnpm"
6060

6161
- name: Install deps and prepare types
6262
run: pnpm i && pnpm dev:prepare
@@ -82,7 +82,7 @@ jobs:
8282
uses: actions/setup-node@v4
8383
with:
8484
node-version: ${{ env.NODE_VER }}
85-
cache: 'pnpm'
85+
cache: "pnpm"
8686

8787
- name: Install deps
8888
run: pnpm i
@@ -93,38 +93,12 @@ jobs:
9393
# Check building
9494
- run: pnpm build
9595

96-
- name: Run Playwright tests using Vitest
96+
- name: Run Playwright tests using Vitest with refresh disabled
9797
run: pnpm test:e2e
98+
env:
99+
NUXT_AUTH_REFRESH_ENABLED: false
98100

99-
test-playground-refresh:
100-
runs-on: ubuntu-latest
101-
defaults:
102-
run:
103-
working-directory: ./playground-refresh
104-
steps:
105-
- uses: actions/checkout@v4
106-
107-
- uses: pnpm/action-setup@v4
108-
name: Install pnpm
109-
with:
110-
run_install: false
111-
112-
- name: Use Node.js ${{ env.NODE_VER }}
113-
uses: actions/setup-node@v4
114-
with:
115-
node-version: ${{ env.NODE_VER }}
116-
cache: 'pnpm'
117-
118-
- name: Install deps
119-
run: pnpm i
120-
121-
- name: Install Playwright Browsers
122-
run: pnpm exec playwright install --with-deps
123-
124-
# Check building
125-
- run: pnpm build
126-
127-
- name: Run Playwright tests using Vitest
101+
- name: Run Playwright tests using Vitest with refresh enabled
128102
run: pnpm test:e2e
129103

130104
test-playground-authjs:
@@ -144,7 +118,7 @@ jobs:
144118
uses: actions/setup-node@v4
145119
with:
146120
node-version: ${{ env.NODE_VER }}
147-
cache: 'pnpm'
121+
cache: "pnpm"
148122

149123
- name: Install deps
150124
run: pnpm i

.github/workflows/pkg.pr.new.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Commit
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
tags:
7+
- '!**'
8+
pull_request:
9+
10+
env:
11+
NODE_VER: 22.5
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [20]
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- uses: pnpm/action-setup@v4
24+
name: Install pnpm
25+
with:
26+
run_install: false
27+
28+
- name: Use Node.js ${{ env.NODE_VER }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ env.NODE_VER }}
32+
cache: 'pnpm'
33+
34+
- name: Install deps
35+
run: pnpm i
36+
37+
- name: Build and pack
38+
run: pnpm prepack
39+
40+
- name: Publish package preview
41+
run: pnpx pkg-pr-new publish --compact

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
shamefully-hoist=true
22
strict-peer-dependencies=false
33
link-workspace-packages=true
4+
ignore-workspace-root-check=true

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npx nuxi@latest module add sidebase-auth
3838

3939
<details>
4040
<summary>Or install manually</summary>
41-
41+
4242
#### 1. Install the package as a dev dependency
4343

4444
```sh
@@ -53,7 +53,7 @@ npx nuxi@latest module add sidebase-auth
5353

5454
```ts
5555
export default defineNuxtConfig({
56-
modules: ['@sidebase/nuxt-auth']
56+
modules: ['@sidebase/nuxt-auth']
5757
})
5858
```
5959
</details>
@@ -64,8 +64,7 @@ Then visit the [Quick Start documentation](https://auth.sidebase.io/guide/gettin
6464

6565
`@sidebase/nuxt-auth` is a library with the goal of supporting authentication for any universal Nuxt 3 application. At the moment three providers are supported:
6666
- [`authjs`](https://auth.sidebase.io/guide/authjs/quick-start): for non-static apps that want to use [Auth.js / NextAuth.js](https://github.com/nextauthjs/next-auth) to offer the reliability & convenience of a 23k star library to the Nuxt 3 ecosystem with a native developer experience (DX)
67-
- [`local`](https://auth.sidebase.io/guide/local/quick-start): for static pages that rely on an external backend with a credential flow for authentication.
68-
- [`refresh`](https://auth.sidebase.io/guide/local/quick-start#refresh-token): for static pages that rely on an external backend with a credential flow and refresh tokens for authentication.
67+
- [`local`](https://auth.sidebase.io/guide/local/quick-start): for static pages that rely on an external backend with a credential flow for authentication. The Local Provider also supports refresh tokens since `v0.9.0`. Read more [here](https://auth.sidebase.io/upgrade/version-0.9.0).
6968

7069
You can find a full list of our features, as well as which provider supports each feature [on our docs](https://auth.sidebase.io/guide/getting-started/choose-provider).
7170

@@ -80,7 +79,7 @@ You can find a full list of our features, as well as which provider supports eac
8079
- Methods to `getSession`, `getCsrfToken`, `getProviders`, `signIn` and `signOut`
8180
- Full TypeScript support for all methods and properties
8281

83-
### Application protection
82+
### Application protection
8483
- Application-side middleware protection for the [full application](https://auth.sidebase.io/guide/application-side/protecting-pages#global-middleware) or [specific pages](https://auth.sidebase.io/guide/application-side/protecting-pages#local-middleware)
8584
- Server-side [middleware](https://auth.sidebase.io/guide/authjs/server-side/session-access#server-middleware) and [endpoint protection](https://auth.sidebase.io/guide/authjs/server-side/session-access#endpoint-protection)
8685

@@ -142,7 +141,6 @@ This module also has it's own playground:
142141
We have one playground per provider:
143142
- [`authjs`](./playground-authjs)
144143
- [`local`](./playground-local)
145-
- [`refresh`](./playground-refresh)
146144

147145
##### How to test static Nuxt 3 apps?
148146

@@ -162,10 +160,10 @@ To test static Nuxt 3 apps we want to run a static frontend and a separate backe
162160
163161
pnpm dev
164162
165-
# A second Nuxt app should now be running on http://localhost:3001.
163+
# A second Nuxt app should now be running on http://localhost:3001.
166164
# We use this purely for authentication
167165
```
168-
4. Visit [http://localhost:3000](http://localhost:3000) -> this should open the static application. Performing any auth-related actions, the app should send requests to the backend running on port `3001`
166+
4. Visit [http://localhost:3000](http://localhost:3000) -> this should open the static application. Performing any auth-related actions, the app should send requests to the backend running on port `3001`
169167

170168
## Contributing
171169

0 commit comments

Comments
 (0)