-
Notifications
You must be signed in to change notification settings - Fork 343
Remote terms of service and privacy policy #14894
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
base: develop
Are you sure you want to change the base?
Changes from 1 commit
7343cda
af5b772
65402a4
d69b65b
5f037f8
e064b1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| import type * as cognitoModule from '$/authentication/cognito' | ||
| import { | ||
| latestPrivacyPolicyQueryOptions, | ||
| latestTermsOfServiceQueryOptions, | ||
| } from '$/composables/userAgreements' | ||
| import { useFeatureFlag } from '$/providers/featureFlags' | ||
| import * as analytics from '$/utils/analytics' | ||
| import { proxyRefs, type ToValue } from '$/utils/reactivity' | ||
|
|
@@ -122,6 +126,8 @@ function createAuthStore( | |
| await updateUserMutation.mutateAsync({ username }) | ||
| } else { | ||
| const orgId = await organizationId() | ||
| const tosHash = (await queryClient.fetchQuery(latestTermsOfServiceQueryOptions)).hash | ||
| const ppHash = (await queryClient.fetchQuery(latestPrivacyPolicyQueryOptions)).hash | ||
| const email = session.value?.email ?? '' | ||
|
|
||
| invariant(orgId == null || backendModule.isOrganizationId(orgId), 'Invalid organization ID') | ||
|
|
@@ -130,6 +136,8 @@ function createAuthStore( | |
| userName: username, | ||
| userEmail: backendModule.EmailAddress(email), | ||
| organizationId: orgId != null ? orgId : null, | ||
| tosAccepted: tosHash, | ||
| ppAccepted: ppHash, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So here we have assumption that user accepted tos and pp during registration? Please add a comment, because it looks little buggy atm. Also, technically tos and pp could change in a time between registration and first run of the application, but I don't feel we need to cover it right now :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | So here we have assumption that user accepted tos and pp during registration? Please add a comment, because it looks little buggy atm. | Also, technically tos and pp could change in a time between registration and first run of the application, but I don't feel we need to cover it right now :) Backend returns users accepted tos and pp and if they are different than the ones downloaded from pages then users is asked to reconfirm acceptation on applicatio open. Same the new hashes are being send with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I see the case you mean.. I will add custom cognito attribues to pass accepted hashes |
||
| }) | ||
| } | ||
| // Wait until the backend returns a value from `users/me`, | ||
|
|
@@ -141,7 +149,6 @@ function createAuthStore( | |
|
|
||
| return true | ||
| } | ||
|
|
||
| const usersMeQueryOptions = createUsersMeQuery(session, remoteBackend, setUsername) | ||
|
|
||
| const usersMeQuery = vueQuery.useQuery(usersMeQueryOptions) | ||
|
|
||
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 entire vue wrapper is not needed.
You may just move
import RegistrationReact...andconst Registration = ...directly to router.ts, see other how react pages are loaded there.withDataLoaderis no longer needed.