Git Product home page Git Product logo

Comments (5)

drudv avatar drudv commented on May 4, 2024

Also I think we could resolve it by marking some identity providers as safe (false by default), to prevent such situation. I understand that there are some strategies (like OpenID) that allow users to make their own auth server to forge other users' identity, but if we are talking about trusted centralized identity providers like GitHub, we can safely let users to sign-in through them even if there are local accounts associated with their emails, right?

from next-auth.

iaincollins avatar iaincollins commented on May 4, 2024

Thanks for raising this - I dislike the current user journey for this flow too.

I like the idea of a much better option for the user that asks them to confirm what they are trying to do rather than giving them a confusing error. I haven't sat down to think about the flow for a while so I can't remember if there are any edge cases off hand.

I think it page currently gets passed what service the user tried to use with a view that it might be possible to improve it later. I'd welcome any PRs to improve the behaviour! I've tried to focus on a secure-by-default but the user experience isn't great in this case.

Having the option to mark providers as trusted in some way sounds reasonable. I think many providers these days require you to validate your email address before you can use it for oAuth, which would - in practice - be sufficiently secure for many cases.

from next-auth.

drudv avatar drudv commented on May 4, 2024

@iaincollins Could you please take a look at PR #64?

Looks like redirecting to a confirmation page with a password input would require a temporary state to keep profile data received from external identity provider in order to use the data for creating an account after the intent confirmation. I didn't want to introduce a breaking change, so I ended up sticking with the second option we were talking about: trustedIdentity property in provider config.

Thanks!

from next-auth.

iaincollins avatar iaincollins commented on May 4, 2024

Oh that's great thanks, will comment on the PR!

from next-auth.

iaincollins avatar iaincollins commented on May 4, 2024

PR #64 is now merged but not rolled out in a new version on NPM yet. I'd like to update the template pages and documentation, and ideally get some automated testing in place in the next few days before we do that.

from next-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.