For the time being, I'm attempting to integrate Nuxt Auth Facebook. I've already set up on my local machine, but I'm having trouble. When I click login with Facebook and it takes me to Facebook, I click continue with my Facebook, and Facebook returns me to my website with an access token.
auth: {
strategies: {
facebook: {
endpoints: {
userInfo: 'https://graph.facebook.com/v6.0/me?fields=id,name,picture{url}'
},
clientId: '...',
scope: ['public_profile', 'email']
},
}
}
the flow I want to do something like this: after clicking on Facebook, I want to get the user id and email address from Facebook and pass it to the API, which will check the database and save it and return the token if it doesn't exist. If the data is already available, return the token.
How do I integrate it? Is there a website or a tutorial I can refer to?