-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(auth): implemented NextAuth with dummy provider #33
Conversation
Resolves #29 |
Rebase on top of |
@nganphan123 No, it is currently only comparing plaintext to plaintext. Encryption probably deserves its own branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @connordoman, thanks for the awesome research and work done here.
Editted: See #33 (comment) for updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@COSC-499-W2023/team-1 Hey team,
Have we considered exploring NextJS middleware with http://www.passportjs.org/? Then, we can break out of AuthNext requirements. Then, there can be 2 ways of authencation via HTTP Autho a rization Header
Basic
: useusers.properties
file.Beater
: OAuth with Cognito. Supported only OpenShift (OCP).
This way, users on k8s can choose Basic Auth without having to find domain name. While on OCP, we can automatically grab that from Routes
.
Looking into Next.js also lists Worst case scenario for Week 9 we use the system as-is and update it afterwards Opened #39 |
Just editted my comment. I think when u set |
I'll continue to look into it to see if there's a solution to our |
@connordoman I think we can use this for cognito. https://www.npmjs.com/package/aws-jwt-verify. The web client can send a bearer token (taken from Cognito Auth) in all its request and the NextJS can just verify it on middleware. |
Let's bring the suggestions above about setting up If |
|
162178a
to
d359672
Compare
@COSC-499-W2023/team-1 can we merge this |
Rebase on top of |
9f760ab
to
6928598
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks great, awesome work Connor!
Signed-off-by: Connor Doman connor@connordoman.dev
The current configuration uses a dummy provider that checks a plaintext password against hardcoded values. NextAuth is modular so this can be changed later on with custom database and
Cognito
providers. NextAuth also recommends using a prefabbed provider like these to avoid opening security holes from babysitting passwords manually.Currently, the example login UI at
app/page.tsx
redirects to NextAuth's template form for a custom provider. We will override this behavior in #30 by passing credentials intosignIn()
.The README also contains updated info for what's required in your
.env.local
(located insidefront-end
).