Skip to content
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

Merged
merged 80 commits into from
Aug 29, 2024
Merged

OV-5: Add jwt token #22

merged 80 commits into from
Aug 29, 2024

Conversation

stefano-lacorazza
Copy link
Collaborator

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

@stefano-lacorazza stefano-lacorazza added the BE Backend feature label Aug 20, 2024
@stefano-lacorazza stefano-lacorazza added this to the Release 1.0 milestone Aug 20, 2024
@stefano-lacorazza stefano-lacorazza self-assigned this Aug 20, 2024
@stefano-lacorazza stefano-lacorazza linked an issue Aug 20, 2024 that may be closed by this pull request
7 tasks
@o-nedashkivska
Copy link
Collaborator

There were some changes in #17
You depend on this pr, so you should better merge it once again

Copy link
Collaborator

@anton-otroshchenko anton-otroshchenko left a 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

@stefano-lacorazza
Copy link
Collaborator Author

stefano-lacorazza commented Aug 29, 2024

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

o-nedashkivska
o-nedashkivska previously approved these changes Aug 29, 2024
backend/src/bundles/auth/auth.service.ts Outdated Show resolved Hide resolved
backend/src/bundles/auth/auth.service.ts Outdated Show resolved Hide resolved
@@ -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> {
Copy link
Collaborator

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

Comment on lines 5 to 6
private SECRET_KEY: Uint8Array;
private EXPIRATION_TIME: string;
Copy link
Collaborator

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]>
@anton-otroshchenko anton-otroshchenko merged commit 610406d into next Aug 29, 2024
2 checks passed
@anton-otroshchenko anton-otroshchenko deleted the task/OV-5-JWT-token branch August 29, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend feature
Projects
Status: To Be Tested
Development

Successfully merging this pull request may close these issues.

FEAT: JWT token
6 participants