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

feat: extract client auth code in a library #1264

Merged
merged 25 commits into from
Sep 20, 2023

Conversation

cromoteca
Copy link
Contributor

Adds a NPM module which extracts some existing code from auth support in Starter and SSO Kit.

This will allow to simplify the creation of new applications.

Closes #1235

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (7722b7a) 96.70% compared to head (105f59c) 96.70%.
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1264   +/-   ##
=======================================
  Coverage   96.70%   96.70%           
=======================================
  Files          14       14           
  Lines        1698     1698           
  Branches      144      144           
=======================================
  Hits         1642     1642           
  Misses         56       56           
Flag Coverage Δ
unittests 96.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Artur- Artur- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some random initial comments about the module and not at all about the actual content. I had to do most of these changes to the react-grid module also

packages/ts/react-auth/.lintstagedrc.js Outdated Show resolved Hide resolved
packages/ts/react-auth/.lintstagedrc.js Outdated Show resolved Hide resolved
packages/ts/react-auth/.lintstagedrc.js Outdated Show resolved Hide resolved
packages/ts/react-auth/.lintstagedrc.js Outdated Show resolved Hide resolved
packages/ts/react-auth/.eslintrc Show resolved Hide resolved
packages/ts/react-auth/README.md Outdated Show resolved Hide resolved
packages/ts/react-auth/README.md Outdated Show resolved Hide resolved
packages/ts/react-auth/package.json Outdated Show resolved Hide resolved
@sissbruecker sissbruecker self-requested a review September 14, 2023 07:20
@cromoteca cromoteca changed the title Feat/1235/extract client auth code in a library feat: extract client auth code in a library Sep 14, 2023
@cromoteca cromoteca requested a review from Artur- September 14, 2023 09:11
packages/ts/react-auth/src/ProtectedRoute.tsx Outdated Show resolved Hide resolved
packages/ts/react-auth/src/ProtectedRoute.tsx Outdated Show resolved Hide resolved
packages/ts/react-auth/src/ProtectedRoute.tsx Outdated Show resolved Hide resolved
packages/ts/react-auth/src/ProtectedRoute.tsx Outdated Show resolved Hide resolved
packages/ts/react-auth/src/ProtectedRoute.tsx Outdated Show resolved Hide resolved
packages/ts/react-auth/src/useAuth.tsx Outdated Show resolved Hide resolved
@sissbruecker sissbruecker force-pushed the feat/1235/extract-client-auth-code-in-a-library branch from a20c09c to 64d2d53 Compare September 15, 2023 16:54
@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sissbruecker sissbruecker enabled auto-merge (squash) September 20, 2023 09:07
@sissbruecker sissbruecker merged commit 0f4b476 into main Sep 20, 2023
11 checks passed
@sissbruecker sissbruecker deleted the feat/1235/extract-client-auth-code-in-a-library branch September 20, 2023 10:13
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Hilla 2.3.0.alpha5 and is also targeting the upcoming stable 2.3.0 version.

@tarekoraby
Copy link
Contributor

Does this imply changes to the docs? Did we start planning this?

@cromoteca
Copy link
Contributor Author

Probably yes. The docs explain how to implement from scratch. It is probably easier to use the new package. But the first thing to do is to use this package in the Start (pre-release version).

@cromoteca
Copy link
Contributor Author

Ping @platosha

taefi pushed a commit that referenced this pull request Sep 27, 2023
Introduces a `@hilla/react-auth` package containing helpers for dealing with login, logout, retrieving auth state, and protecting routes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract client auth code in a library
5 participants