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

authentication with Firebase Auth and JWT #35

Merged
merged 18 commits into from
Mar 11, 2024
Merged

authentication with Firebase Auth and JWT #35

merged 18 commits into from
Mar 11, 2024

Conversation

EvelynBunnyDev
Copy link
Contributor

@EvelynBunnyDev EvelynBunnyDev commented Mar 1, 2024

Authentication with Firebase Auth and JWT

♻️ Current situation & Problem

Please refer to these two discussion posts for context:
https://github.com/orgs/CS342/discussions/78.
https://github.com/orgs/CS342/discussions/83

⚙️ Release Notes

Modifications has been made to Prisma/Chat/ChatView

  1. We generated JWT token in app in the signInWithFirebase function: token = try await Auth.auth().currentUser?.getIDToken().
  2. Then, the token is sent to the frontend via a URL parameter: if let url = URL(string: "http://localhost:3000?token=\(token)")
    Successful implementation is reflected by passing a JWT token from Swift to the web chat interface, which connects to the python backend and prints "user successfully authenticated via JWT".

📚 Documentation

See in-line documentation

✅ Testing

This codebase has not been thoroughly tested. We will address the stylistic requirements later.

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

bryant-jimenez and others added 5 commits February 22, 2024 04:06
Handlers for receiving a notification in the background or foreground, call methods in the PrismaStandard for setting the time received in Firestore.
@EvelynBunnyDev EvelynBunnyDev requested a review from mjoerke March 1, 2024 21:22
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 37.01%. Comparing base (257bbcd) to head (ac9e452).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   36.20%   37.01%   +0.81%     
==========================================
  Files          43       43              
  Lines        1942     1970      +28     
==========================================
+ Hits          703      729      +26     
- Misses       1239     1241       +2     
Files Coverage Δ
Prisma/PushNotifications/PushNotifications.swift 8.17% <0.00%> (-0.17%) ⬇️
Prisma/Chat/ChatView.swift 6.53% <0.00%> (-9.26%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 257bbcd...ac9e452. Read the comment docs.

mjoerke
mjoerke previously requested changes Mar 1, 2024
Prisma/Chat/ChatView.swift Outdated Show resolved Hide resolved
@dhruvna1k dhruvna1k enabled auto-merge (squash) March 11, 2024 07:25
@dhruvna1k dhruvna1k self-assigned this Mar 11, 2024
@dhruvna1k dhruvna1k merged commit aa17157 into main Mar 11, 2024
7 checks passed
@dhruvna1k dhruvna1k deleted the jwt-auth branch March 11, 2024 20:42
@dhruvna1k dhruvna1k restored the jwt-auth branch March 12, 2024 09:00
@PSchmiedmayer PSchmiedmayer deleted the jwt-auth branch March 18, 2024 05:23
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.

5 participants