Skip to content
Discussion options

You must be logged in to vote

I solved this problem code updated bellow:

// Return all data to access them in jwt with profile function
providers: [
    Providers.Facebook({
      clientId: process.env.FACEBOOK_CLIENT_ID,
      clientSecret: process.env.FACEBOOK_CLIENT_SECRET,

      profile(profile) {
        return {
          id: profile.id,
          name: profile.name,
          email: profile.email,
          image: profile.picture.data.url,
        };
      },
    }),
] 

// Consume api request in jwt
async jwt(token, profile) {
      if (profile) {
        const data = {
          email: profile.email,
          password: process.env.SOCIAL_PASSWORD,
        };

        const user: any = await axios
          .p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Rafazeon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Ask how to do something or how something works
1 participant
Converted from issue

This discussion was converted from issue #2113 on June 01, 2021 23:38.