-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implemented /auth/callback
and minor type refactor
#83
Conversation
Quality Gate passedIssues Measures |
/auth/callback
and minor type refactor
accessToken, | ||
expiresAt, | ||
}; | ||
|
||
try { | ||
const parsedUser = UserSchema.parse(user); |
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 deemed it unnecessary to validate the object structure here, since the cookie is signed, therefore we are sure that the cookie has the type that we set it to
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.
Good point. Additionally, unit tests may take care of any other errors later.
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.
Nice improvements!
accessToken, | ||
expiresAt, | ||
}; | ||
|
||
try { | ||
const parsedUser = UserSchema.parse(user); |
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.
Good point. Additionally, unit tests may take care of any other errors later.
export enum AuthenticationProvider { | ||
BEA = "bea", |
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.
This is great, thanks!
redirect_uri
switch should be easy