Legal-Questioner / legal-questioner-solutions-challenge

1 stars 0 forks source link

Add User Authentication #5

Open Tegh25 opened 7 months ago

Tegh25 commented 7 months ago

Adding user authentication would allow search history to be saved and for users to easily go back to past queries and responses, increasing user experience. Users should be able to log in and create an account once entering the website, but should still be able to use the search function without logging in.

Requirements

Options

Risheit commented 7 months ago

I'm not familiar with nextAuth.js. Any reason to use it above Firebase Auth?

Tegh25 commented 7 months ago

This article as some interesting insights: https://www.linkedin.com/pulse/different-between-nextauth-firebase-supabase-naymur-rahman/

All are great options that I felt should be considered, Firebase may be better in this case for a Google competition.

BruceNiemi commented 7 months ago

I feel like we should look into a solution such as Keycloak as it can integrate pretty nicely with the backend service unless we don't want the Spring application controlling auth.

Risheit commented 7 months ago

I think going for what integrates the easiest into our app is the best. @Tegh25 If you're planning on refactoring the frontend into nextjs then nextAuth sounds great, otherwise Firebase or Keycloak might be better. @BruceNiemi how difficult would it be to set up Keycloak?

Tegh25 commented 7 months ago

There doesn't seem to be any major benefits to refactoring to Next.js unless we need the increased performance, Next.js also has its own hosting platform so I'm not sure how well it would integrate with Google Cloud hosting.

Let's cross it off the list for now.

BruceNiemi commented 7 months ago

@BruceNiemi I'm not sure about the complexities of that. I'm just wondering what would be needed be behind an auth page though?

BruceNiemi commented 7 months ago

@Risheit

Risheit commented 7 months ago

@BruceNiemi Added details to its own issue here: #9. In short, a hackathon judge suggested a history feature for each user. We'd need authentication to get that working.