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

72
Views
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
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!