-
Notifications
You must be signed in to change notification settings - Fork 9
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
Nextauth ms2 #127
Nextauth ms2 #127
Conversation
if (error) return; | ||
<Result | ||
status="error" | ||
title="Failed to fetch role" | ||
subTitle="An error ocurred while fetching role, please try again." | ||
/>; |
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.
Empty return, probably typo?
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.
I fixed it in my last commit.
dataIndex: 'id', | ||
key: 'tooltip', | ||
title: '', | ||
with: 100, |
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.
typo?
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.
I fixed it with in last commit.
In my recent commits, I mainly made the following changes:
|
Summary
Used nextauth for auth in ms2 and implemented a middleware in the old ms that reads the nextauth cookies to authenticate requests.
Details MS2
useAuthStore
, auth status can be checked withuseSession
provided by nextauthAuth
guard runs in the server withgetServerSession
Details Old MS
loginSession
ifAPI_ONLY = true
getSessionFromCookie
to read cookies set by nextauth and fill thereq.session
field whenAPI_ONLY = true
API_ONLY = true