Skip to content
Discussion options

You must be logged in to vote

@balazsorban44 Thanks for the tip 👍

Achieved via the following if it helps anybody:

Providers.Facebook({
    /**
     * Get custom profile information for facebook login
     * @param profile is the Facebook profile
     * @param tokens are the access tokens
     * @returns a next-auth user model with customised fields
     */
    async profile(profile, tokens) {
        // Profile id
        const { id } = profile
        // Access token
        const { accessToken } = tokens
        // Graph API URL to return a large picture
        const url = `https://graph.facebook.com/v10.0/${id}/picture?type=large&access_token=${accessToken}`
        // GET req via axios
        const response = await

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by stevedaniels-traintime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1885 on April 29, 2021 16:16.