Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

78
Visualizações
next auth use data returned from authorization custom provider

I have a custom provider in next-auth (last.fm). the user already is being sent to the authorization URL and can autherize the application there. Last.fm then sends the user back to the callback URL (in this case localhost:3000/api/auth/callback/lastfm with a token in the query. how can I access this token in the query to request a session token?

{
      id: "lastfm",
      name:"Last.fm",
      authorization: LfmauthUrl,  // Useres Autheries the App, Provider returns token
      type: 'oauth',
      version: "2.0",
      clientId: process.env.LASTFM_API_KEY,
      token: {
        // url: "https://example.com/oauth/token",
        async request(context) {      // I thougt that the token maybe could be in the context here. Couldnt find it tho
          console.log(context) 
          await makeTokenRequest(context)
        }
      }
    }

All I really need is the token returned from last.fm after teh autherization

Thanks for any help!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda