Skip to content

Commit

Permalink
Merge branch 'v1.x' into kevin/init-issue-614
Browse files Browse the repository at this point in the history
# Conflicts:
#	example/package.json
#	example/yarn.lock
#	package.json
  • Loading branch information
kmjennison committed Dec 31, 2023
2 parents b09e134 + 44475f8 commit fe7901a
Show file tree
Hide file tree
Showing 11 changed files with 2,627 additions and 3,274 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ A clear and concise description of the bug.
**Versions**

`next-firebase-auth` version:
Firebase JS SDK:
Firebase JS SDK (`firebase`):
Firebase admin SDK (`firebase-admin`):
Next.js:

**To Reproduce**
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 18.x
node-version: 20.x
- name: Install dependencies
run: yarn install
# Build before running unit tests so that built types are updated before
Expand All @@ -21,7 +21,9 @@ jobs:
run: yarn test # generates coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
- name: Check bundle sizes
run: yarn run bundlesize:no-build
env:
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}
# Disabling bundlesize for now because of:
# https://github.com/siddharthkp/bundlesize/pull/370
# - name: Check bundle sizes
# run: yarn run bundlesize:no-build
# env:
# BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18.x
node-version: 20.x
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: yarn test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ dist
.tern-port

build
.env.local
next-env.d.ts
service-worker.js
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Migrating to v1 requires a few steps:
1. Migrate to the latest API
2. Upgrade `firebase` and `firebase-admin`
* Note: we recommend pinning `firebase` 9.16.0 until issue [#614](https://github.com/gladly-team/next-firebase-auth/issues/614) is resolved
* Note: we recommend pinning `firebase` to 9.16.0 until issue [#614](https://github.com/gladly-team/next-firebase-auth/issues/614) is resolved

### Breaking Changes: API

Expand Down Expand Up @@ -61,7 +61,7 @@ Codemod:
npx -p next-firebase-auth codemod withauthuserssr-to-withuserssr .
```

#### `useAuthUser` has become `useAuthUser`
#### `useAuthUser` has become `useUser`

Codemod:

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build Status](https://img.shields.io/github/actions/workflow/status/gladly-team/next-firebase-auth/node.js.yml?branch=v1.x)](https://github.com/gladly-team/next-firebase-auth/actions/workflows/node.js.yml?query=branch%3Av1.x+)
[![codecov](https://codecov.io/gh/gladly-team/next-firebase-auth/branch/v1.x/graph/badge.svg)](https://app.codecov.io/gh/gladly-team/next-firebase-auth/branch/v1.x)
[![npm](https://img.shields.io/npm/v/next-firebase-auth/canary)](https://www.npmjs.com/package/next-firebase-auth)
[![Bundle size](https://img.shields.io/bundlephobia/minzip/next-firebase-auth@canary?label=bundle%20size)](https://bundlephobia.com/package/next-firebase-auth@canary)
[![npm](https://img.shields.io/npm/v/next-firebase-auth/latest)](https://www.npmjs.com/package/next-firebase-auth)
[![Bundle size](https://img.shields.io/bundlephobia/minzip/next-firebase-auth?label=bundle%20size)](https://bundlephobia.com/package/next-firebase-auth)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](./CODE_OF_CONDUCT.md)

# next-firebase-auth
Expand Down Expand Up @@ -61,14 +61,14 @@ Depending on your app's needs, other approaches might work better for you.

Install:

`yarn add next-firebase-auth@canary` or `npm i next-firebase-auth@canary`

> ⚠️ If you're using Firebase JS SDK v8 or below, use `next-firebase-auth@^0.15.0`.
`yarn add next-firebase-auth` or `npm i next-firebase-auth`

Make sure peer dependencies are also installed:

`yarn add firebase firebase-admin next react react-dom`

> ⚠️ Note: we recommend pinning `firebase` to 9.16.0 until issue [#614](https://github.com/gladly-team/next-firebase-auth/issues/614) is resolved
Create a module to initialize `next-firebase-auth`.

#### Example config:
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
"eslint-config-next": "^13.4.9",
"typescript": "^5.1.6"
}
}
}
1,436 changes: 696 additions & 740 deletions example/yarn.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"lint": "tsc --noEmit && eslint ./",
"bundlesize": "npm-run-all -s build bundlesize:no-build",
"bundlesize:no-build": "bundlesize",
"bundlesize:comment": "Uninstalled bundlesize for now because of https://github.com/siddharthkp/bundlesize/pull/370",
"test": "npm-run-all -s install-example-deps lint test:coverage",
"test:run": "jest --env=jsdom",
"test:coverage": "yarn run test:run --coverage",
Expand Down Expand Up @@ -60,7 +61,6 @@
"babel-jest": "^29.6.1",
"babel-loader": "^9.1.3",
"babel-plugin-module-resolver": "^5.0.0",
"bundlesize": "^0.18.1",
"copy-webpack-plugin": "^11.0.0",
"core-js": "^3.31.1",
"datwd": "^0.2.0",
Expand Down Expand Up @@ -111,7 +111,7 @@
"peerDependencies": {
"firebase": ">=9.0.0 <11",
"firebase-admin": ">=10.0.0 <12",
"next": ">=9.5.0 <14",
"next": ">=9.5.0 <15",
"react": ">=16.8.0 <19",
"react-dom": ">=16.8.0 <19"
},
Expand All @@ -137,4 +137,4 @@
"files": [
"/build"
]
}
}
2 changes: 2 additions & 0 deletions src/firebaseAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export const verifyIdToken: VerifyIdToken = async (
} else {
logDebug(verifyErr)
}

newTokenFailure = true
}
}

Expand Down
Loading

0 comments on commit fe7901a

Please sign in to comment.