Comments (6)
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.
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.
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.
@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.
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.
v2 has released now and doesn't use passport.js anymore.
from next-auth.
Related Issues (20)
- Tiktok provider is missing url in token object / Second Attempt HOT 1
- Google Provider TODO: Handle OIDC response body error HOT 26
- Provider configs `token` and `userinfo` ignore `url` and `request` properties HOT 2
- Docker setup guide needed HOT 1
- Missing Link on PG documentation for schema HOT 1
- How to enable refresh token in v5 - ^5.0.0-beta.16 HOT 4
- Authentik or OIDC like provider not recognize the same user. HOT 1
- Fix Github stars icon HOT 1
- [next-auth][error][OAUTH_CALLBACK_ERROR] | facebook provider HOT 1
- [framework-sveltekit] minor issue in: `SignIn` component HOT 1
- Middleware Route Protection nextjs example result in Middleware relative urls error HOT 1
- Allow installing svelte 5 (pre-releases) as a peer dependency HOT 1
- Allow installing svelte 5 (pre-releases) as a peer dependency HOT 1
- EDGE_FUNCTION_INVOCATION_TIMEOUT when using DrizzleAdapter | timeout Vercel edge functions
- Missing: https://authjs.dev/guides/providers/credentials HOT 1
- Cannot leverage platform attribute in SvelteKit during sign-in HOT 5
- Fix typo
- Documentation on Custom Providers
- Auth.js Pages Documentation Page link is broken - Shows 404 HOT 2
- GetToken() not working in middleware.ts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-auth.