nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

Extend existing scheme #1785

Open duckimann opened 2 years ago

duckimann commented 2 years ago

The doc says You can create a new scheme from scratch or extend an existing scheme. here

How can i extend existing scheme in this config? And what should it look like?

{
    facebook: {
        clientId: process.env.FB_AUTH_CLIENT_ID,
        endpoints: {
            token: "/api/auth/",
            userInfo: '/api/user/'
        }
    },
    google: {
        clientId: process.env.GOOGLE_AUTH_CLIENT_ID,
        codeChallengeMethod: "",
        responseType: 'code',
        endpoints: {
            token: "/api/auth/",
            userInfo: '/api/user/'
        },
        // redirect_uri: 'http://localhost:3000/redirect'
    },
}

Note: This issue is an follow up of this one, if the solution here works, i'll close the one mentioned.