Skip to content

Implement user account verification with LinkedIn during onboarding #17074

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

Merged
merged 16 commits into from
Apr 12, 2023

Conversation

jankeromnes
Copy link
Contributor

@jankeromnes jankeromnes commented Mar 29, 2023

Description

Implement user account verification with LinkedIn during onboarding.

Related Issue(s)

Fixes #

How to test

  1. Try onboading flow
  2. Verify your account by connecting to LinkedIn

Release Notes

Implement user account verification with LinkedIn during onboarding

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh
  • /werft analytics=segment

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-jx-connect-linkedin.1 because the annotations in the pull request description changed
(with .werft/ from main)

@socket-security
Copy link

socket-security bot commented Mar 29, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
[email protected] None +0 nvh95

@jankeromnes jankeromnes force-pushed the jx/connect-linkedin branch 5 times, most recently from 175d079 to f1feecf Compare March 30, 2023 10:38
@gitguardian
Copy link

gitguardian bot commented Mar 30, 2023

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@jankeromnes jankeromnes force-pushed the jx/connect-linkedin branch from f1feecf to aa48b54 Compare March 30, 2023 10:43
@roboquat roboquat added size/XL and removed size/L labels Mar 30, 2023
@jankeromnes jankeromnes force-pushed the jx/connect-linkedin branch 3 times, most recently from 4a3e9bb to 0ae2c61 Compare April 4, 2023 16:52
@jankeromnes jankeromnes force-pushed the jx/connect-linkedin branch from 206e46f to 5e00849 Compare April 11, 2023 07:59
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-jx-connect-linkedin.17 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 12, 2023
@gtsiolis
Copy link
Contributor

gtsiolis commented Apr 12, 2023

Looking at this now! 👀

@svenefftinge
Copy link
Contributor

I'm not sure this works:
I clicked the "Connect with LinkedIn" button and giot immediately forward to the next page where I pick editor.
I would have expected some sort of pop-up from LinkedIn or so.

export class LinkedInProfile1680096507296 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (id char(36) NOT NULL, userId char(36) NOT NULL, profile text NOT NULL, creationTime varchar(255) NOT NULL, _lastModified timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this not be unique per user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@svenefftinge it could be. Please explicitly mention what you're expecting to see different in this CREATE statement. 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

no id but making the userid the PK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea, thanks!

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Took a closer look at the UX.

Thanks for your patience while adding 500 lines for one button, @jankeromnes. 🙇

Comment on lines 70 to 77
<Button
className="w-full flex items-center justify-center space-x-2"
onClick={linkedInLogin}
disabled={isLoading || !clientID}
>
<img src={SignInWithLinkedIn} width={20} height={20} alt="Sign in with Linked In" />
<span>Connect with LinkedIn</span>
</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Clicking this just redirected me to the next step as @svenefftinge mentioned in #17074 (comment). Is this expected?

Re-posting here an export from the design specs.

AllStates

Copy link
Contributor Author

@jankeromnes jankeromnes Apr 12, 2023

Choose a reason for hiding this comment

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

Thanks for noticing @gtsiolis!

The auto-forward without LinkedIn pop-up should now be fixed.

Also,

  • only the Default spec is implemented right now
  • the Success spec is not necessary given that success auto-forwards to the next page
  • the Error spec is not implemented yet (errors are logged into the console instead)
  • I'm not sure when the Skip spec should be used if at all

Please let me know what exactly is blocking this PR from being merged, or please resolve if nothing is blocking 😁

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 12, 2023

Many thanks for the early review comments! 🙌

I'm not sure this works:
I clicked the "Connect with LinkedIn" button and giot immediately forward to the next page where I pick editor.
I would have expected some sort of pop-up from LinkedIn or so.

Huh, you're right. It used to work, but in the latest state it just auto-forwards 🤨 taking a look to find what broke.

EDIT: Fixed. ✅

@svenefftinge
Copy link
Contributor

The design is assuming that we give credits to individuals, which is not the case. We give credits to organizations. A new user might not create an organization so there is no way they can benefit from the promised credits cc @phimae

@jankeromnes
Copy link
Contributor Author

Taking this back to draft while I investigate why the LinkedIn pop-up no longer shows up.

@phimae
Copy link

phimae commented Apr 12, 2023

The design is assuming that we give credits to individuals, which is not the case. We give credits to organizations. A new user might not create an organization so there is no way they can benefit from the promised credits cc @phimae

What happens if the user does not create their own org? Do they get zero credits until they do so? Are there any nudges in the product for that?

Does the above change based on the LinkedIn connector? If I understand correctly then even today a user would not benefit from the 500 credits if they don't create an org? The change we make is just making the 500 everyone gets today contingent of the Linkedin connection

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 12, 2023

Looks like the LinkedIn button click auto-submits the form, without giving a chance for the LinkedIn pop-up to show up.

You can make it work by emptying one of the required fields (first name or last name) before clicking on the LinkedIn button. Working on a fix.

EDIT: Fixed in telepresence and pushing the fix now. ✅

@easyCZ
Copy link
Member

easyCZ commented Apr 12, 2023

We'll also need a follow-up which deletes the LinkedIN data whenever the user chooses to delete their account to conform to GDPR.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Apr 12, 2023

Ready for another round of reviews! 🏓

@jankeromnes jankeromnes marked this pull request as ready for review April 12, 2023 13:47
@svenefftinge
Copy link
Contributor

What happens if the user does not create their own org? Do they get zero credits until they do so? Are there any nudges in the product for that?

Users will not get credits t all. The only possible cost center is an org. We are making it so that the first org a user creates gets the free credits. So this is not part of the user account creation but the following creation of an org, which only happens if the user is not automatically added to an existing org.

Copy link
Contributor

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

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

Works now and the code looks good as well!
I'm ok with just ignoring my comment around credits as we are currently giving every user 500 credits no matter they have opted-in or not. So it doesn't really change anything.

@roboquat roboquat merged commit f7101c5 into main Apr 12, 2023
@roboquat roboquat deleted the jx/connect-linkedin branch April 12, 2023 14:39
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 17, 2023
@ozeliger
Copy link

ozeliger commented Apr 18, 2023

What was the reasoning behind adding a Linkedin verification? Imo seems a little non-relevant, no? You're already connecting your Github account -- why connect a Linkedin account. Further, folks that don't link their Linkedin acc get only 100 credits as opposed to 500 if they do link. Why? Seems a little odd
@jankeromnes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XL team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

8 participants