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

tenant support to v1.x #647

Merged
merged 106 commits into from
Jul 8, 2023

Conversation

juhanakristian
Copy link
Contributor

Continuing the work of @Twister42 and @HegarGarcia

Fixes some issues mentioned in #429 comments

The changes were originally made to main but this PR is made against v1.x branch

kmjennison and others added 30 commits August 29, 2021 18:39
This reverts commit 1e04c95.
…se-version

Display the Firebase version on the demo app
…ng-force-refresh

Adding forceRefresh on getIdToken
* Upgrade some deps

* Upgrade caniuse

* Upgrade Prettier

* Downgrade eslint to satisfy peerdeps

* Minor upgrades for Next and Firebase deps

* Upgrade firebase-admin

* Upgrade firebase-admin in demo

* Minor upgrade demo deps

* Upgrade NFA version in demo

* Upgrade more dependencies

* Upgrade more demo dependencies

* Revert "Upgrade more demo dependencies"

This reverts commit 7da3e58.

* Revert "Minor upgrade demo deps"

This reverts commit 50f928e.

* Minor upgrade Firebase

* Pin typescript version (typing error with 4.4.4) and minor upgrade other types

* Minor bump a few demo deps

* Upgrade more demo deps

* Upgrade some deps

* Remove unused Codecov dependency
* Use Next 12

* Allow latest versions of Next and firebase-admin
* Use Next 12

* Allow latest versions of Next and firebase-admin

* Upgrade Next to v12

* Update demo
* feat: fallback to applicationDefault credentials

Co-Authored-By: Jesse Anderson <jeryanders@gmail.com>

* chore: add test for firebaseAdminDefaultCredential

* chore: update README with firebaseAdminDefaultCredential

Co-Authored-By: Jesse Anderson <jeryanders@gmail.com>

* chore: cleanup wording in README comments

* fix: updates based on comments

* chore: update error message in test

Co-authored-by: Jesse Anderson <jeryanders@gmail.com>
* Upgrade most deps

* Upgrade ESLint and Prettier and lint fix

* Remove unneeded jsdom dep

* Upgrade most example app deps

* Upgrade example app lockfile deps

* Upgrade lockfile deps
…adly-team#365)

* fix: check for 'auth/argument-error' when verifying token

* feat: upgrade firebase and firebase-admin

* feat(gladly-team#174): handle additional errors from `verifyIdToken`

* test(gladly-team#174): add tests coverage for new errors in `verifyIdToken`

* feat: upgrade dependencies that have non breaking changes

* feat: implement pr feedback

* chore: upgrade dependencies

* Rebuild lockfile

* Include error if empty refreshToken

* Add TODO

Co-authored-by: Zino Hofmann <zino@hofmann.amsterdam>

Co-authored-by: Zino Hofmann <zino@hofmann.amsterdam>
…team#368)

* Add broken tests

* Don't throw on token errors

* Add assertion checks to tests

* Add/modify comments in config validation

* Move tests into describe block

* Add error callbacks to config

* Call error callbacks when we fail to refresh or verify the user's ID token

* Add new config properties to types

* Await error callback functions in case they need to perform something async

* Lint fixes

* Add tests

* Update README.md
@vercel
Copy link

vercel bot commented May 25, 2023

@juhanakristian is attempting to deploy a commit to the Gladly Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (ee6443e) 98.05% compared to head (10ec5cd) 98.10%.

❗ Current head 10ec5cd differs from pull request most recent head e450c8e. Consider uploading reports for the commit e450c8e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             v1.x     #647      +/-   ##
==========================================
+ Coverage   98.05%   98.10%   +0.04%     
==========================================
  Files          31       31              
  Lines         875      895      +20     
  Branches      257      272      +15     
==========================================
+ Hits          858      878      +20     
  Misses         17       17              
Impacted Files Coverage Δ
src/configTypes.ts 50.00% <ø> (ø)
src/createAuthUser.ts 100.00% <100.00%> (ø)
src/firebaseAdmin.ts 91.89% <100.00%> (+0.30%) ⬆️
src/initFirebaseClientSDK.ts 100.00% <100.00%> (ø)
src/testHelpers/authUserInputs.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nfa-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2023 8:06pm

Copy link
Contributor

@kmjennison kmjennison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thank you for the PR! Just one minor change on the config and a few small comments, then good to merge.

src/__tests__/firebaseAdmin.test.js Outdated Show resolved Hide resolved
src/__tests__/initFirebaseClientSDK.test.js Outdated Show resolved Hide resolved
src/__tests__/initFirebaseClientSDK.test.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@juhanakristian
Copy link
Contributor Author

The review issues have been fixed but I'll need to fix the issues from the TypeScript conversion

@kmjennison
Copy link
Contributor

Appreciate it! Sorry for blowing up your PR with all the changes!

@juhanakristian
Copy link
Contributor Author

The conflicts have been resolved now but it looks like bundle size check is failing in the pipeline. Anything I should do about that?

Copy link
Contributor

@kmjennison kmjennison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Just one minor edit to remove a console log, then good to go! I bumped up the bundle size limit, so no worries on that.

src/__tests__/firebaseAdmin.test.ts Outdated Show resolved Hide resolved
@kmjennison kmjennison merged commit 47e627f into gladly-team:v1.x Jul 8, 2023
3 checks passed
@juhanakristian
Copy link
Contributor Author

juhanakristian commented Jul 10, 2023

Thanks for making the last fix and merging the PR 👍

@kmjennison
Copy link
Contributor

Of course! Thank you for your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants