Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

129
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda