Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
Why User object in auth0/nextjs useUser hook is missing properties?

User object in auth0/nextjs useUser hook is missing properties

I can't seem to get the while user object from the useUser hook in auth0/nextjs:

{
  "nickname": "example",
  "name": "example@yahoo.com",
  "picture": "https://s.gravatar.com/avatar/ca48de58bbf91d5963aa…&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fal.png",
  "updated_at": "2022-05-19T13:13:29.487Z",
  "sub": "auth0|628639882896f400694b6e72"
}

As you can see there are many properties missing such as email etc.. Any help is appreciated

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to modify your scopes.

Example of usage, in your [...auth0].js file, than in /api/auth/me you will see needed info

import { handleAuth, handleLogin, handleProfile } from '@auth0/nextjs-auth0';


export default handleAuth({
  async login(req, res) {
    try {
      await handleLogin(req, res, {
        returnTo: '/api/auth/me',
        authorizationParams: {
          response_type: 'code',
          scope: 'openid profile email',
        }
      });

    } catch (error) {
      res.status(error.status || 400).end(error.message);
    }
    
  }
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!