Coder Social home page Coder Social logo

Comments (6)

iaincollins avatar iaincollins commented on May 4, 2024 1

Ah, thanks I'd completely missed it was using OpenID and not oAuth!

Looking at a few examples and the official Passport documentation it looks like it shouldn't be hard to support OpenID as well, the only real difference is it is missing a parameter - it doesn't return a RefreshToken, just an AccessToken โ€“ย which messes up what next-auth is expecting the order of parameters passed to the callback to be.

This should be relatively easy to accommodate and I'm going to make adding support for OpenID connections a feature request.

Regarding the email, yes it does need a unique email address property for each user, but it's okay if the service doesn't return one.

Some services don't (including Twitter, unless you explicitly enable it) in which case you can return something like ${profile.id}@${service}.localdomain in the getProfile() method for that function. You can also regex for this in the UI (e.g. look for *@twitter.localdomain) to prompt users to provide a real address after sign in, so they can recover their account later if they every lose access to their oAuth provider account (e.g. if are locked out, or if they delete that account).

from next-auth.

iaincollins avatar iaincollins commented on May 4, 2024

Oh no!

That's weird, I haven't see that before! I thought that was a fixed list of arguments defined as part of the Passport API as everything had been consistent so far.

Hmm I'll think of a way to handle this.

Thanks for raising it!

from next-auth.

embiem avatar embiem commented on May 4, 2024

I think it has something to do with steam auth being OpenID and Facebook, Twitter etc. generally use oAuth.

Another problem with OpenID is, that it doesn't return an email, which is currently needed in next-auth, right?

from next-auth.

datenpate avatar datenpate commented on May 4, 2024

@iaincollins are you already working on supporting OpenID? I am working on it right now, but it will introduce some alternative routes to stay close to the oid standard.

from next-auth.

 avatar commented on May 4, 2024

Any update? I'm currently my own IdentityServer using OpenID connect. I'm now in the process of making a dashboard app and would like to use the Hybrid Flow in order to authenticate user's into the dashboard.

Cheers!

from next-auth.

LoriKarikari avatar LoriKarikari commented on May 4, 2024

v2 has released now and doesn't use passport.js anymore.

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.