-
Notifications
You must be signed in to change notification settings - Fork 314
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
chore(rwa): update user lookup in getServiceFacade, authenticator util typing and useAuthenticator updates #2538
Conversation
🦋 Changeset detectedLatest commit: 41ec1ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request introduces 2 alerts when merging 8aa0b09 into c12e9f5 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 331c42f into c12e9f5 - view on LGTM.com new alerts:
|
|
||
// check for user in actorContext prior to state context. actorContext is more "up to date", | ||
// but is not available on all states | ||
const user = actorContext?.user ?? state.context?.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.
👍
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.
LGTM
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 looks like a good start. From looking at the Angular and Vue implementations, I noticed that we have some discrepancies in a few place, that can be looked at in future PRs. Angular still uses getServiceContextFacade
in the authenticator.service
while React and Vue are using composable/hooks with getServiceFacade
. 👍
Good call out. Will make sure that they get addressed 👍 |
Description of changes
Authenticator
state machine utils in facade.tsuser
lookup ingetServiceContextFacade
to initially checkactorContext
prior to falling back onstate.context
to allow removal of direct lookup ofuser
fromactorContext
in theSetupTOTP
UI componentsuseAuthenticator
to clean up duplicationIssue #, if available
NA
Description of how you validated changes
e2e tests
Checklist
yarn test
passessideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.