Add base structure for discord

This commit is contained in:
DMehaffy 2018-07-23 05:07:17 -07:00
parent 2fbb6027bd
commit 4c64168cda
4 changed files with 17 additions and 0 deletions

View File

@ -49,6 +49,8 @@ class PopUpForm extends React.Component { // eslint-disable-line react/prefer-st
return `${strapi.backendURL}/connect/google/callback`;
case 'github':
return get(this.props.values, 'redirect_uri', '');
case 'discord':
return `${strapi.backendURL}/connect/discord/callback`;
default: {
const value = get(this.props.values, 'callback', '');

View File

@ -166,6 +166,7 @@
"PopUpForm.Providers.facebook.providerConfig.redirectURL": "The redirect URL to add in your Facebook application configurations",
"PopUpForm.Providers.google.providerConfig.redirectURL": "The redirect URL to add in your Google application configurations",
"PopUpForm.Providers.github.providerConfig.redirectURL": "The redirect URL to add in your GitHub application configurations",
"PopUpForm.Providers.discord.providerConfig.redirectURL": "The redirect URL to add in your Discord application configurations",
"PopUpForm.Providers.linkedin2.providerConfig.redirectURL": "The redirect URL to add in your Linkedin application configurations",
"PopUpForm.Providers.twitter.providerConfig.redirectURL": "The redirect URL to add in your Twitter application configurations",

View File

@ -66,6 +66,14 @@ module.exports = async cb => {
'user:email'
]
},
discord: {
enabled: false,
icon: 'discord',
key: '',
secret: '',
callback: '/auth/discord/callback',
scope: ['email']
},
twitter: {
enabled: false,
icon: 'twitter',

View File

@ -174,6 +174,12 @@ const getProfile = async (provider, query, callback) => {
});
break;
}
case 'discord': {
const discord = new Purest({
provider: 'discord',
})
}
case 'twitter': {
const twitter = new Purest({
provider: 'twitter',