-
Couldn't load subscription status.
- Fork 402
feat(clerk-js): Introduce experimental support for Google One Tap #3176
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
Conversation
This will be revisited soon
🦋 Changeset detectedLatest commit: c0751a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
| ); | ||
| }, 'OrganizationList'); | ||
|
|
||
| export const __experimental_GoogleOneTap = withClerk(({ clerk, ...props }: WithClerkProp<OneTapProps>) => { |
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.
❓ Are we sure a component name starting with _ works well in JSX?
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.
Using it with our playground did not give me trouble
|
|
||
| Introduce experimental support for Google One Tap | ||
| - React Component `<__experimental_GoogleOneTap/>` | ||
| - JS `clerk.__experimental_mountGoogleOneTap(node,props)` |
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.
❓ Is the __experimental_ prefix the one we settled for?
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.
I thought it was experimental_
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.
Pretty sure we settled for __experimental_ same one we had for the most recent project "passkeys"
| <SignedOut> | ||
| <__experimental_GoogleOneTap /> | ||
| </SignedOut> |
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.
❓ do we want to put a signed out check inside the component itself?
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.
We do have that check inside one-tap-start.tsx. I will be dropping this file change tho.
| } | ||
|
|
||
| const environmentClientID = environment.displayConfig.googleOneTapClientId; | ||
| const shouldLoadGIS = user?.id && environmentClientID; |
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.
❓ Why do we only load GIS if user.id is defined?
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 is not right, I pushed a fix.
) (#3196) * feat(clerk-js): Introduce experimental support for Google One Tap (#3176) * chore(clerk-js): format * chore(clerk-js): Replace with useCore* hooks * chore(clerk-js): Update tests snapshots * chore(clerk-js): Make linter happy * chore(clerk-js): Use `useUserContext` instead of `useCoreUser` * fix(clerk-js): Reprompt google one tap only when user id changes
Description
This PR introduces:
< __experimental_GoogleOneTap/>__experimental_mountGoogleOneTap()__experimental_unmountGoogleOneTap()Proper support for the PSU flow will be added later. This PR will also be backported to v4 (core-1)
DOM while is mounted
SignIn/SignUp (without additional steps)
Screen.Recording.2024-04-12.at.4.24.14.PM.mov
SignUp (with additional steps)
Screen.Recording.2024-04-12.at.4.23.10.PM.mov
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change