Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

As a user I can login using my email address and password-less links #437

Closed

Description

@pdotsani

Starting a thread for discussion on this topic. Proposing we use passporjs local auth strategy.

Activity

  1. allella commented on Nov 11, 2020

    @allella
    Contributor

    Thanks @pdotsani

    I don't have opinions on the tech-side, but I'll close #306 and PR #411 based on the authentication conversation from the Nov 7th meeting.

  2. vkWeb commented on Nov 20, 2020

    @vkWeb
    Member

    @pdotsani any thoughts on passwordless login?

    It'll work like: user enters their email -> 6 digit OTP code gets sent to their email -> user enters the received otp -> logged in for max. time a cookie can set. freeCodeCamp.org and Brave use this methodoly.

    And to enter sensitive areas (also called sudo mode in security world) like admin settings an email otp verification will be required.

    cc @timmyichen

  3. timmyichen commented on Nov 20, 2020

    @timmyichen
    Contributor

    I think per @QuincyLarson we should stick with a single form of auth, and Google won out.

  4. timmyichen commented on Nov 20, 2020

    @timmyichen
    Contributor

    Ah, thanks for the more recent context.

    Don't need 6 digit OTP for login, we can just do login via magic link, right? You enter your email, you click the link sent to your email, bam, you're logged in for X days or until you've manually logged out.

  5. vkWeb commented on Nov 20, 2020

    @vkWeb
    Member

    @timmyichen Yes that would work too. 👍

  6. pdotsani commented on Nov 20, 2020

    @pdotsani
    ContributorAuthor

    @timmyichen @vkWeb any recommendations for libraries we can use to implement this function? After a quick google search, looks like there is a passport strategy that supports what we need:

    https://www.npmjs.com/package/passport-magic-link

    This library would need support from our email service of course.

  7. vkWeb commented on Nov 21, 2020

    @vkWeb
    Member

    @pdotsani @timmyichen I think we should consult @ojeytonwilliams on this. He knows a lot about fCC's main codebase so he might be aware of fCC's strategy to handle passwordless login.

    @ojeytonwilliams how do fCC implements passwordless logins? Should we use OTP based auth or magic links?

    IMO, security wise magic links and OTPs are equally good. But OTPs have better UX because:

    • singular flow of auth, no multiple tabs
    • magic links only work when user and magic link are opened in the same browser, kinda problematic if the user is on a different browser than their default

    With magic link transactions, both the initial request and its response must take place in the same browser or the transaction will fail. This is particularly relevant for iOS users, who cannot change their default web browser. For example, the user might make the initial request using the Chrome browser, but when the user opens the magic link in their email, iOS automatically opens it in Safari (the default browser). If this happens, the transaction will fail.

    Source: https://auth0.com/docs/connections/passwordless/guides/email-magic-link

  8. vkWeb commented on Nov 21, 2020

    @vkWeb
    Member

    Ohh a second thought:

    Organizations will need to set up their own email delivery service for this to work, isn't it? wouldn't it be expensive for small and medium organizations...?

    @allella what's your thought on this?

  9. allella commented on Nov 23, 2020

    @allella
    Contributor

    I didn't read through the documentation because I assumed if the package is sending an email with a reset link, then the email service doesn't need to do anything special / different than any other transnational email that originates from the server.

    Am I missing something? Would the email that's sent be anything more than a text-based email with a hashed link?

  10. ojeytonwilliams commented on Nov 24, 2020

    @ojeytonwilliams
    Contributor

    @vkWeb fCC uses Auth0 for everything (including passwordless login), so that's not much use here.

    I don't have a strong preference for OTP over magic links, and I don't think we should worry about the default browser issue at this stage. Also, unless I'm missing something, switching between the three options (local, magic link and OTP) would not be hard, if we want to just pick one and test it out.

  11. pdotsani commented on Dec 6, 2020

    @pdotsani
    ContributorAuthor

    Hoping to move this forward, I would suggest we create a feature pr using this library and see what folks think. A passportjs library seems to be an ideal route for our mvp. Auth0 requires a little more configuration and requires a subscription I believe.

    This also depends on if our email service is already available. Does anyone know the status of this? I just want to avoid overlapping work as much as possible.

  12. allella commented on Dec 7, 2020

    @allella
    Contributor

    @pdotsani sounds good to me. Limiting the dependencies and configuration on specific 3rd party auth services would be nice.

    Jonathan is working on email and may need help from someone familiar with the framework on #428

  13. changed the title [-]As a user I can login using my email address and password[/-] [+]As a user I can login using my email address and password-less links[/+] on Mar 26, 2021
  14. allella commented on Apr 22, 2021

    @allella
    Contributor

    Fran merged in #464. I thought this would auto-close, but it looks like it's still open.

    Closing this, but please reopen if needed.

  15. allella commented on Apr 26, 2021

    @allella
    Contributor

    #583 addressed some of the remaining integration on the authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions