-
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
OV-5: Add jwt token #22
Conversation
There were some changes in #17 |
c1b02a8
…ting OV-8: protect routing
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.
Please also pull the next branch
Im sorry, I dont understand what I have to do. It tells me OV-5 is up to date with next |
@@ -16,8 +16,8 @@ class UserService implements Service { | |||
this.userRepository = userRepository; | |||
} | |||
|
|||
public find(): ReturnType<Service['find']> { | |||
return Promise.resolve(null); | |||
public async find(userId: string): Promise<UserEntity | null> { |
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.
There is no need to specify userId
. If you are working inside of the users bundle it is understandable that find uses user id. REST API principles
private SECRET_KEY: Uint8Array; | ||
private EXPIRATION_TIME: string; |
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.
We are using camelCase for class fields throughout a project
Co-authored-by: Sofiia Trokhymchuk <[email protected]>
c4bcd77
Co-authored-by: Sofiia Trokhymchuk <[email protected]>
Merged OV-2-add-sign-in-flow to OV-5-JWT-token to implement 'Return token in response to the sign-in and sign-up'
Created token services with createToken and verifyToken using HS256 algorithm.
Added token to UserSignUpResponseDto and UserSignUpResponseDto