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

auth: Add Google OAuth #45

Merged
merged 7 commits into from
Oct 13, 2024
Merged

auth: Add Google OAuth #45

merged 7 commits into from
Oct 13, 2024

Conversation

aniebietafia
Copy link
Contributor

This pull request introduces several enhancements and features to the brints-estate-api project, including the addition of Google authentication, improvements to user management, and updates to the project configuration files.

Authentication Enhancements:

  • Added Google OAuth authentication, including new services and controllers (GoogleAuthenticationController, GoogleAuthenticationService) and DTOs (GoogleTokenDto). ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-7d9ee62ca7b67b823be922d3f189c2cdaf9112e8d323c03a105a2a166d3a28d7R31-R35), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-7d9ee62ca7b67b823be922d3f189c2cdaf9112e8d323c03a105a2a166d3a28d7R62), [[3]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-412de104d88a412508500af0b4cdef47ea08a05d6b874bef6363b6a68ba351d4R10-R11), [[4]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-968550147f22b74a8154e8549536c47f03455410a70249de1da0d3a65c292245R1-R7), [[5]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-d9f48e5b10e68a592e45ffd2e823c5047bdcc9f1d027d55b93f36ffc03ec0491R1-R38), [[6]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-5774b894a96d9129307a67dc7e2eec4f9c020ee9b6e114a7aae3fc7eb1e06570R1-R89))
  • Introduced interfaces for authentication tokens and Google payload (IGooglePayload, ILoginUser, IRefreshToken, IAccessTokens). ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-21ce8ca4ed3f6bbc2a4935705f03b5372b77be5c972ca6f0a05b6be00912b138R1-R23), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-36d1f8cc80c6c5e281c10e0326baba00084780296ada8e50b3a342aec62d3eceR1-R6))

User Management:

  • Updated CreateUserDto to include gender enumeration and revised UpdateUserDto to use PartialType and PickType. ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-399e843456cc14f03643362c218ff08c83d2078b4f5ebc0bef64511a887b310cR76), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-f4f1b8c8bab04183672214e19934ed8f7ed08fa2b7cf9dbf23808b450e882031L1-R13))
  • Added new providers for creating and finding users by Google ID (CreateGoogleUserProvider, FindOneByGoogleIdProvider). ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-d82515209bb7201dcc68aa63420eeee1b8e32973d5ee1d288678c6a55fef246bR1-R28), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-2097934c242b2e003e19b32833e9b86fc8654d0e9d52c13624c2f5a406960414R1-R25))
  • Modified the User entity to make the password field nullable. ([brints-estate-api/src/users/entities/user.entity.tsL25-R27](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-aac536a4edbe676be37493a0511526d279ca1cd47cfbbaa196bab07706001039L25-R27))

Configuration and Documentation:

  • Updated .gitignore to include documentation directory and added a new script for generating API documentation using Compodoc. ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-1b7a537006bd4ad389413a1f5a246f2a391ee023be78effdfe3ce938cb75220dR132-R134), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-d1f043b76f735a89d5bd4db88e3d2ffc5e91ac0626277bb7ff2170fcb2887546L21-R29))
  • Changed project metadata in package.json (author, license) and added new dependencies (@compodoc/compodoc, google-auth-library). ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-d1f043b76f735a89d5bd4db88e3d2ffc5e91ac0626277bb7ff2170fcb2887546L5-R7), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-d1f043b76f735a89d5bd4db88e3d2ffc5e91ac0626277bb7ff2170fcb2887546R45))

Miscellaneous:

  • Added comments and documentation to various classes and methods to improve code readability and maintainability. ([[1]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-45f52a422617ba804e6c650ea705fe5db28f2fbb9e21df945c8a2eca18c7a87cR11-R49), [[2]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-45f52a422617ba804e6c650ea705fe5db28f2fbb9e21df945c8a2eca18c7a87cL34-R76), [[3]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-bb00918181e2f3948877d01b855b32cac4566d192238e008c541df11f05f9f9aL43-R43), [[4]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-bb00918181e2f3948877d01b855b32cac4566d192238e008c541df11f05f9f9aL56-R56), [[5]](https://github.com/Brints/nestjs-brints-group-estate/pull/45/files#diff-9c2fafa803d161de49a732ebbdd6c463593a8662e76a387466f4331c081bec93L89-R89))

These changes collectively enhance the functionality and maintainability of the brints-estate-api project, particularly in the areas of authentication and user management.

@aniebietafia aniebietafia merged commit 207f0db into main Oct 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant