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 support for Firebase Authentication #160

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Add support for Firebase Authentication #160

merged 2 commits into from
Oct 21, 2024

Conversation

petrpavlik
Copy link
Contributor

@petrpavlik petrpavlik commented Oct 18, 2024

These changes are now available in 5.1.0

Add support for decoding Firebase Authentication JWT tokens.

  1. Provide project id when configuring your Vapor application
app.jwt.firebaseAuth.applicationIdentifier = firebaseProjectId
  1. Verify the token on a request
let token = try await req.jwt.firebaseAuth.verify()
let email = token.email
let name = token.name
let avatarUrl = token.avatarUrl
// ...

@petrpavlik petrpavlik requested a review from ptoffy as a code owner October 18, 2024 20:19
@petrpavlik
Copy link
Contributor Author

@ptoffy this is the follow up PR to add firebase auth

@ptoffy ptoffy added the semver-minor Contains new APIs label Oct 21, 2024
@ptoffy ptoffy merged commit 8ce7280 into vapor:main Oct 21, 2024
11 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