Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge next-firebase-auth: 0.13.5-alpha.0 #8

Open
wants to merge 175 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
104c8a6
Create Next config in example app
kmjennison May 14, 2021
20dc822
Upgrade example app dependencies
kmjennison May 14, 2021
b5087e8
0.13.1
kmjennison May 14, 2021
f3e477c
Update README.md
kmjennison May 14, 2021
149bf76
Merge branch 'main' into kevin/update-example
kmjennison May 14, 2021
4a1f81a
Update NFA
kmjennison May 14, 2021
9ed785f
Merge pull request #177 from gladly-team/kevin/update-example
kmjennison May 14, 2021
fe70427
Update README.md
kmjennison May 17, 2021
9b1c67f
Update README.md
kmjennison May 17, 2021
01ba745
Update README.md
kmjennison May 17, 2021
111570c
Update README.md
kmjennison May 17, 2021
6d4b884
Update README.md
kmjennison Jun 3, 2021
9cc9962
docs (README): Clearer explanation about cookies keys
Izhaki Jun 9, 2021
736b15c
A note about keys being secrets
Izhaki Jun 9, 2021
5630295
Merge pull request #198 from Izhaki/patch-1
kmjennison Jun 10, 2021
172c760
Update README.md
kmjennison Jun 10, 2021
207cfca
Update README.md
kmjennison Jun 10, 2021
24b8c96
Support Next 11
kmjennison Jun 27, 2021
d48a48b
Merge pull request #220 from gladly-team/kevin/next-11
kmjennison Jun 27, 2021
2012af6
0.13.2
kmjennison Jun 27, 2021
201ffc1
Upgrade example to Next 11
kmjennison Jun 27, 2021
c7553eb
Merge pull request #221 from gladly-team/kevin/update-example
kmjennison Jun 27, 2021
3a9844d
Update README.md
kmjennison Jun 27, 2021
3174d69
Merge pull request #222 from gladly-team/kevin/init-docs
kmjennison Jun 27, 2021
d0e7524
add static hoisting
Jul 25, 2021
f5a8bd4
WIP - add dynamic redirect to example
kmjennison Jul 29, 2021
4e9941b
Add a property to useFirebaseUser to know when cookies have (likely) …
kmjennison Jul 29, 2021
6e17834
Change property name
kmjennison Jul 29, 2021
64a5cc9
On the client side, redirect after the cookie request has completed
kmjennison Jul 29, 2021
8316986
Add link to issue
kmjennison Jul 29, 2021
40749c6
Fix render logic to wait for auth request
kmjennison Jul 29, 2021
b484f24
Change property name
kmjennison Jul 29, 2021
b1f725b
Add test
kmjennison Jul 29, 2021
8574bdf
Update debug logging
kmjennison Jul 30, 2021
a206bcf
Add TODOs
kmjennison Jul 30, 2021
3ba1caa
Reset state for repeated auth requests
kmjennison Jul 30, 2021
5b54c95
Don't modify useFirebaseUser state after unmount
kmjennison Jul 30, 2021
2405a54
Lint fixes
kmjennison Jul 30, 2021
ed7256e
Merge pull request #243 from gladly-team/kevin/fix-race-condition
kmjennison Jul 30, 2021
58ea8ae
Upgrade dependencies and lint
kmjennison Jul 30, 2021
b111442
Merge pull request #245 from gladly-team/kevin/upgrade-deps
kmjennison Jul 30, 2021
61b7209
Combine state updates in useFirebaseUser to reduce renders
kmjennison Jul 30, 2021
0047376
Merge pull request #246 from gladly-team/kevin/combine-state-updates
kmjennison Jul 30, 2021
c53f254
Add test
kmjennison Jul 30, 2021
67695b5
Redact config secrets when debug logging
kmjennison Jul 30, 2021
75f256a
Lint fix
kmjennison Jul 30, 2021
05ffb64
Merge branch 'main' into add_static_hoisting
kmjennison Jul 30, 2021
78a5dfc
Merge pull request #247 from gladly-team/kevin/debug-hide-config-secrets
kmjennison Jul 30, 2021
943de04
Update withAuthUser.js
kmjennison Jul 30, 2021
ee9d8a3
Update withAuthUser.js
kmjennison Jul 30, 2021
3d1d1f2
Upgrade example app dependencies
kmjennison Jul 30, 2021
57ec10f
Enable debugging for the example app by default
kmjennison Jul 30, 2021
f19ab16
Prevent state updates after unmount
kmjennison Jul 30, 2021
d447c1c
Use useMemo in withAuthUser to potentially avoid an unnecessary re-re…
kmjennison Aug 2, 2021
a3b8a87
Merge pull request #254 from gladly-team/kevin/add-use-memo
kmjennison Aug 2, 2021
6cdb8e4
Merge pull request #237 from uncvrd/add_static_hoisting
kmjennison Aug 2, 2021
850f6b4
Update lockfile
kmjennison Aug 2, 2021
b546bc9
Upgrade some dependencies
kmjennison Aug 2, 2021
a5628db
Merge branch 'main' into kevin/update-example
kmjennison Aug 2, 2021
a3d59c8
0.13.3-alpha.0
kmjennison Aug 2, 2021
f8952bb
Upgrade NFA
kmjennison Aug 2, 2021
a29a36c
Merge pull request #255 from gladly-team/kevin/update-example
kmjennison Aug 2, 2021
05931b5
Merge branch 'main' into kevin/dynamic-redirect-docs
kmjennison Aug 2, 2021
29b8aa5
Add eslint-config-next dev dependency to the example app (for local b…
kmjennison Aug 2, 2021
bea93f7
Merge pull request #256 from gladly-team/kevin/add-eslint-config
kmjennison Aug 2, 2021
2f4d43d
Add bundle analyzer to example app
kmjennison Aug 3, 2021
88f76fc
Merge pull request #258 from gladly-team/kevin/add-bundle-analyzer
kmjennison Aug 3, 2021
bde5a8d
Add hoist-non-react-statics to Node externals whitelist
kmjennison Aug 3, 2021
64946f5
Merge pull request #259 from gladly-team/kevin/add-reqd-external
kmjennison Aug 3, 2021
a5cfba1
0.13.3-alpha.1
kmjennison Aug 3, 2021
b03c470
Update example
kmjennison Aug 3, 2021
2499927
Merge pull request #260 from gladly-team/kevin/update-example
kmjennison Aug 3, 2021
fdda440
Merge branch 'main' into kevin/dynamic-redirect-docs
kmjennison Aug 3, 2021
567038d
Fix redirect URL example
kmjennison Aug 3, 2021
966f954
Remove redirect example
kmjennison Aug 3, 2021
b033eea
Update README.md
kmjennison Aug 3, 2021
93f970c
Update README.md
kmjennison Aug 3, 2021
2671a1e
Merge pull request #261 from gladly-team/kevin/dynamic-redirect-docs
kmjennison Aug 3, 2021
e6ee173
Create CODE_OF_CONDUCT.md
kmjennison Aug 13, 2021
d87b5f5
Update README.md
kmjennison Aug 13, 2021
1ca3b4c
Create CONTRIBUTING.md
kmjennison Aug 13, 2021
f15721c
Update CONTRIBUTING.md
kmjennison Aug 13, 2021
ea9184b
Update CONTRIBUTING.md
kmjennison Aug 13, 2021
b48a351
Update README.md
kmjennison Aug 13, 2021
a418081
Update CONTRIBUTING.md
kmjennison Aug 13, 2021
0ceccd0
Merge pull request #271 from gladly-team/kevin/contributing-docs
kmjennison Aug 13, 2021
465b902
Update README.md
kmjennison Aug 13, 2021
c4dc739
Update comment
kmjennison Aug 16, 2021
d9f0204
0.13.3
kmjennison Aug 16, 2021
0d004d9
Update example app
kmjennison Aug 16, 2021
23276ce
Merge pull request #277 from gladly-team/kevin/upgrade-example
kmjennison Aug 16, 2021
647b603
#142: TypeScript and `withAuthUser`
Aug 24, 2021
6c16524
WIP
kmjennison Aug 27, 2021
131219c
Use type in server-side data fetch
kmjennison Aug 27, 2021
161c102
Merge pull request #289 from gladly-team/kevin/typescript-example
kmjennison Aug 27, 2021
0c3b278
Merge pull request #283 from gavinharris-dev/main
kmjennison Aug 27, 2021
ee3d770
Update README.md
kmjennison Aug 27, 2021
b46fd40
Update README.md
kmjennison Aug 27, 2021
39cd166
Merge pull request #290 from gladly-team/kevin/typescript-readme
kmjennison Aug 27, 2021
581ef6b
Debug release action
kmjennison Aug 29, 2021
1e04c95
0.14.0-alpha.0
kmjennison Aug 29, 2021
a6ec037
Revert "0.14.0-alpha.0"
kmjennison Aug 29, 2021
a813889
Remove --dry-run from release action
kmjennison Aug 29, 2021
e11fdd3
Display the Firebase version on the demo app
kmjennison Aug 30, 2021
92bdc83
Merge pull request #294 from gladly-team/kevin/demo-firebase-version
kmjennison Aug 30, 2021
d101b30
Update README.md
kmjennison Aug 31, 2021
d99a9a6
Update issue templates
kmjennison Sep 2, 2021
2e11b45
feat: forceRefresh on getIdToken
iamgbayer Sep 17, 2021
0bebb9a
feat: adding description about forceRefresh
iamgbayer Sep 17, 2021
a344a86
feat: adding argument type to getIdToken
iamgbayer Sep 17, 2021
3dce8ed
Update createAuthUser.js
kmjennison Sep 17, 2021
5f36c0d
Merge pull request #301 from iamgbayer/guilhermebayer/adding-force-re…
kmjennison Sep 17, 2021
f429935
0.13.4-alpha.0
kmjennison Sep 17, 2021
7ad6080
0.13.4
kmjennison Oct 15, 2021
49d4e4f
Upgrade some dependencies (#325)
kmjennison Nov 2, 2021
1e0ec3f
Support Next 12 and Firebase Admin 10 (#328)
kmjennison Nov 2, 2021
dd17d66
0.13.5-alpha.0
kmjennison Nov 2, 2021
887eb76
Update demo to use Next 12 (#330)
kmjennison Nov 2, 2021
51c72ca
Update README.md
kmjennison Nov 8, 2021
fddfb88
Update README.md
kmjennison Nov 30, 2021
10d4bc2
Change example app cookies to use SameSite=lax (#354)
kmjennison Dec 10, 2021
d202b77
0.13.5
kmjennison Dec 10, 2021
d7ef716
feat: add support for application default credentials (#348)
prescottprue Dec 10, 2021
367f7f5
Update README.md
kmjennison Dec 10, 2021
77a6280
Upgrade dependencies on v0.x (#356)
kmjennison Dec 10, 2021
0d31469
Fix peer dependency range syntax for firebase-admin (#358)
kmjennison Dec 10, 2021
a1cfd86
Handle additional token errors in verifyIdToken (#361) (#365)
kmjennison Dec 13, 2021
097896a
Remove thrown errors from token refresh & verification logic (#368)
kmjennison Dec 14, 2021
6222ec2
Fix typo in README (#374)
adzcai Dec 17, 2021
fda3fe1
Cherry pick v1.x #369 (#375)
kmjennison Dec 17, 2021
4e70bb7
Allow easy error handling for login/logout requests (#376)
kmjennison Dec 17, 2021
cadcf7b
Run Prettier on README (#381)
kmjennison Dec 17, 2021
079f37c
0.14.0-alpha.o
kmjennison Dec 17, 2021
e6862c6
Update README.md
kmjennison Dec 17, 2021
cd30ee7
0.14.0-alpha.1
kmjennison Dec 17, 2021
24a1def
Update v0.x example (#382)
kmjennison Dec 17, 2021
0b76d60
Update documentation (#387)
kmjennison Dec 17, 2021
f738e92
0.14.0
kmjennison Dec 21, 2021
131a762
Added troubleshooting step to README (#398)
vpaladino778 Dec 23, 2021
f1c258f
Update README.md
kmjennison Dec 27, 2021
86c9bab
feat: add ability to define to redirect to app with different base pa…
Dec 29, 2021
626beb6
Update documentation for redirects (#400)
kmjennison Dec 29, 2021
23d34d9
0.14.1-alpha.0
kmjennison Dec 29, 2021
43c454f
Update example app (#402)
kmjennison Dec 29, 2021
6dc4799
0.14.1
kmjennison Feb 4, 2022
dd3b4b7
added onLogoutRequestError and onLoginRequestError to InitConfig inte…
camilo-mujica Feb 7, 2022
f0967f2
Update link to documentation
kmjennison Feb 15, 2022
2e4c974
0.14.2
kmjennison Feb 15, 2022
d359756
Bugfix: don't error on unset Firebase admin config values (#436)
kmjennison Feb 16, 2022
e6fe5dd
0.14.3-alpha.0
kmjennison Feb 16, 2022
699a9de
fix: Add useFirebaseAdminDefaultCredential type definition (#451)
hunghvu Apr 1, 2022
d9cfa82
Fix README typos, grammar (#448)
hunghvu Apr 1, 2022
c18e1bb
0.14.3-alpha.1
kmjennison Apr 1, 2022
ef01560
0.14.3
kmjennison Apr 1, 2022
6df19d9
Upgrade NFA version in demo (#455)
kmjennison Apr 1, 2022
baf01f2
v0.x: Add support for React 18 (#472)
kmjennison May 6, 2022
5dbd8b9
v0.x: upgrade dependencies (#477)
kmjennison May 7, 2022
5ad1d14
0.14.4-alpha.0
kmjennison May 7, 2022
f156cb6
v0.x: Update example app (React 18, other dependencies) (#471)
kmjennison May 7, 2022
5317222
Upgrade additional example app dependencies (#479)
kmjennison May 7, 2022
bf8559c
fix typo. add missing "b" to README.md (#485)
nori-k Jun 1, 2022
efdc357
Support firebase-admin v11 peer dependency (#504)
kmjennison Jul 23, 2022
25e3b5f
Upgrade dependencies [v0.x] (#505)
kmjennison Jul 23, 2022
fae3d59
Upgrade example deps [v0.x] (#507)
kmjennison Jul 23, 2022
6b500c4
0.14.4-alpha.1
kmjennison Jul 23, 2022
74dc766
Bump NFA in package.json
kmjennison Jul 23, 2022
30249c0
Upgrade NFA in example (#508)
kmjennison Jul 23, 2022
42426e0
0.14.4
kmjennison Jul 23, 2022
32974f0
Use NFA 0.14.4 in example app (#509)
kmjennison Jul 23, 2022
1aab289
Add info about NextAuth.js to README [v1.x]
kmjennison Aug 8, 2022
75b33ae
Update README.md
kmjennison Aug 23, 2022
121b6be
v0.x: Update bug issue template (#542)
kmjennison Aug 25, 2022
144f730
v0.x: allow Next v13 peer dependency (#588)
kmjennison Nov 21, 2022
ecb5fb3
0.15.0
kmjennison Nov 21, 2022
d66c9e4
Update README.md
kmjennison Dec 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ module.exports = {
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
},
overrides: [
// Set Jest rules only for test files.
Expand Down
19 changes: 16 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ assignees: ''

---

**When filing a bug report, please confirm you've done the following:**

1. Have you set `onVerifyTokenError` and `onTokenRefreshError` in your config and checked for any helpful errors?
2. Have you set `debug: true` in your config and read through server-side and client-side debug logs for any helpful messages?
3. Have you tried the [example app](https://github.com/gladly-team/next-firebase-auth/tree/main/example) with your own Firebase credentials?
4. Have you read through the [troubleshooting](https://github.com/gladly-team/next-firebase-auth#troubleshooting) Q&A?

**Describe the bug**
A clear and concise description of what the bug is.
A clear and concise description of the bug.

**Version**
What version of `next-firebase-auth` are you using?
**Versions**

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

**To Reproduce**
Steps to reproduce the behavior:
Expand All @@ -23,5 +33,8 @@ Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.

**Debug and error logs**
Please provide debug logs or errors from `onVerifyTokenError` and `onTokenRefreshError`.

**Additional context**
Add any other context about the problem here.
13 changes: 12 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ jobs:
- run: yarn install
- run: yarn test
- run: yarn run build
- run: npm publish
- run: echo ${{github.ref}}
- name: Release canary version
# The ref will be the tag name. Match against tags like
# "v1.0.0-canary.0".
if: ${{ contains(github.ref, '-canary.') }}
run: npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Release latest version
# Assume non-canary is latest.
if: ${{ !contains(github.ref, '-canary.') }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"bracketSpacing": true,
"jsxBracketSameLine": false,
"useTabs": false,
"semi": false,
"singleQuote": true,
Expand Down
40 changes: 40 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Contributor Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others’ private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant, version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

Welcome, and thanks for considering contributing to `next-firebase-auth`! We really appreciate your support.

Here are some quick guidelines on how to contribute productively.

### Open issues before working

Before working on a new feature or bug fix, please open a detailed issue for discussion. This helps prevent wasted time (for example, if the feature is out of scope of this package) and gives other community members a chance for input.

If you'll start work on an existing issue, please comment that you're working on it so other contributors don't duplicate efforts.

### Use issue templates

Please use the issue templates. Issues outside of the template guidelines may be closed.

Use discussions for Q&A and for help on your app's specific implementation.

If reporting a bug, especially a full-stack one (such as problems with cookies), please provide a full example or clear way to reproduce it.

### Security disclosures

If you find a security vulnerability, do **not** open an issue. Please email the maintainers at [[email protected]](mailto:[email protected]).

### Making code contributions

1. Before coding, please open a related issue (or comment on an existing issue to let us know you're working on it)
2. Fork this repository
3. Make code changes in your fork
* Add comments where it's potentially unclear what your code is doing
* Commit with descriptive messages
* Ensure complete code coverage for your changes
* Make sure all linting and tests succeed (`yarn run test`)
4. Open a pull request pointing to the `main` branch in this repository
* Add a clear title
* In the description, link to the related issue, such as: `Closes #123.`

### Developing with a local version of the package

While developing, it can be helpful to use a local version of `next-firebase-auth` in another app. To do so:

1. Install [yalc](https://www.npmjs.com/package/yalc): `yarn global add yalc`
2. In `next-firebase-auth`, publish a local version: `yarn run dev:publish` -- this builds your local package code, then publishes it with Yalc
3. In another local Next.js app, such as the example app in this repository: `yalc add next-firebase-auth`
4. After you make changes to your local `next-firebase-auth`, use `yarn run dev:publish` again to use the latest local code in your app

### We may be slow to respond

At the moment, this repository is maintained by ~1 person in their spare time. We will be as responsive as possible, but we may be slow to respond to issues and PRs. Thanks for your patience!

### Be a good community member

Please respect our [Code of Conduct](./CODE_OF_CONDUCT.md) and contribute to a positive, constructive open source environment.

We strive to support first-time contributors and beginners through guidance and constructive feedback.
Loading