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

Add FirebaseAuth identity token #207

Merged
merged 6 commits into from
Oct 18, 2024
Merged

Add FirebaseAuth identity token #207

merged 6 commits into from
Oct 18, 2024

Conversation

petrpavlik
Copy link
Contributor

@petrpavlik petrpavlik commented Oct 17, 2024

These changes are now available in 5.1.0

  • Add support for Firebase Auth by introducing FirebaseAuthIdentityToken.
  • Fix some unit tests not being run. Probably a regression cause by migration to the new testing framework.

Adding support for Firebase Authentication was okayed by @ptoffy, see here vapor/jwt#159.

I'll also follow up with a PR for /~https://github.com/vapor/jwt once this is merged in.

@petrpavlik petrpavlik requested a review from ptoffy as a code owner October 17, 2024 07:18
@ptoffy ptoffy added the semver-minor Contains new APIs label Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.68%. Comparing base (b0b58ec) to head (4d26e2c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rces/JWTKit/Vendor/FirebaseAuthIdentityToken.swift 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
+ Coverage   77.20%   83.68%   +6.47%     
==========================================
  Files          55       56       +1     
  Lines        1347     1483     +136     
==========================================
+ Hits         1040     1241     +201     
+ Misses        307      242      -65     
Files with missing lines Coverage Δ
...rces/JWTKit/Vendor/FirebaseAuthIdentityToken.swift 96.77% <96.77%> (ø)

... and 25 files with indirect coverage changes

Copy link
Member

@ptoffy ptoffy left a comment

Choose a reason for hiding this comment

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

Thanks for this! Just missing some formatting. Feel free to run swift format --recursive --in-place . with /~https://github.com/vapor/contributing/blob/main/.swift-format in the project's directory. While you're at it could you add some names to the @Tests which were missing? Something similar to the other test suites should be fine

@petrpavlik
Copy link
Contributor Author

@ptoffy done, please take another look.

Not sure though why the windows CI pass failed on some CCryptoBoringSSL (linker?) errors?

@petrpavlik petrpavlik requested a review from ptoffy October 18, 2024 08:01
@ptoffy
Copy link
Member

ptoffy commented Oct 18, 2024

Yeah looks like this should fix it apple/swift-crypto@4518e5e but there hasn't been a release yet

Copy link
Member

@ptoffy ptoffy left a comment

Choose a reason for hiding this comment

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

Just a few whitespace nits to be in par with the rest of the repo. I would have thought swift-format would catch these but maybe we need to be stricter 🤷

Sources/JWTKit/Vendor/FirebaseAuthIdentityToken.swift Outdated Show resolved Hide resolved
Sources/JWTKit/Vendor/FirebaseAuthIdentityToken.swift Outdated Show resolved Hide resolved
Sources/JWTKit/Vendor/FirebaseAuthIdentityToken.swift Outdated Show resolved Hide resolved
Tests/JWTKitTests/VendorTokenTests.swift Outdated Show resolved Hide resolved
Tests/JWTKitTests/VendorTokenTests.swift Outdated Show resolved Hide resolved
@petrpavlik
Copy link
Contributor Author

Thanks, I'll fix those. Yeah, I just ran swift-format before pushing the changes, relying on that I'd fix everything for me.

@petrpavlik petrpavlik requested a review from ptoffy October 18, 2024 16:15
Copy link
Member

@ptoffy ptoffy left a comment

Choose a reason for hiding this comment

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

Thanks!

@ptoffy ptoffy merged commit 02a0fa6 into vapor:main Oct 18, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants