[Config] Add enable OAuth login option
This commit is contained in:
@@ -150,6 +150,21 @@ export class LoginComponent extends Component<ILoginComponentProps, ILoginCompon
|
|||||||
render() {
|
render() {
|
||||||
const { classes, loginWithOAuth, translate } = this.props
|
const { classes, loginWithOAuth, translate } = this.props
|
||||||
|
|
||||||
|
const OAuthLogin = (
|
||||||
|
<div style={this.styles.singinOptions as any}>
|
||||||
|
<IconButton
|
||||||
|
onClick={() => loginWithOAuth!(OAuthType.FACEBOOK)}
|
||||||
|
><div className='icon-fb icon'></div></IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={() => loginWithOAuth!(OAuthType.GOOGLE)}
|
||||||
|
> <div className='icon-google icon'></div> </IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={() => loginWithOAuth!(OAuthType.GITHUB)}
|
||||||
|
> <div className='icon-github icon'></div> </IconButton>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container spacing={24}>
|
<Grid container spacing={24}>
|
||||||
<Grid item xs={12} className={classes.contain}>
|
<Grid item xs={12} className={classes.contain}>
|
||||||
@@ -167,18 +182,8 @@ export class LoginComponent extends Component<ILoginComponentProps, ILoginCompon
|
|||||||
|
|
||||||
<h2 className='zoomOutLCorner animated g__paper-title'>{translate!('login.title')}</h2>
|
<h2 className='zoomOutLCorner animated g__paper-title'>{translate!('login.title')}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div style={this.styles.singinOptions as any}>
|
{config.settings.enabledOAuthLogin ? OAuthLogin : ''}
|
||||||
<IconButton
|
|
||||||
onClick={() => loginWithOAuth!(OAuthType.FACEBOOK)}
|
|
||||||
><div className='icon-fb icon'></div></IconButton>
|
|
||||||
<IconButton
|
|
||||||
onClick={() => loginWithOAuth!(OAuthType.GOOGLE)}
|
|
||||||
> <div className='icon-google icon'></div> </IconButton>
|
|
||||||
<IconButton
|
|
||||||
onClick={() => loginWithOAuth!(OAuthType.GITHUB)}
|
|
||||||
> <div className='icon-github icon'></div> </IconButton>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<Divider style={this.styles.divider} />
|
<Divider style={this.styles.divider} />
|
||||||
<TextField
|
<TextField
|
||||||
className={classes.textField}
|
className={classes.textField}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const environment = {
|
|||||||
messagingSenderId: '964743099489'
|
messagingSenderId: '964743099489'
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
|
enabledOAuthLogin: true,
|
||||||
appName: 'Green',
|
appName: 'Green',
|
||||||
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
||||||
defaultLanguage: LanguageType.English
|
defaultLanguage: LanguageType.English
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export const environment = {
|
|||||||
messagingSenderId: '964743099489'
|
messagingSenderId: '964743099489'
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
|
enabledOAuthLogin: true,
|
||||||
appName: 'Green',
|
appName: 'Green',
|
||||||
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
||||||
defaultLanguage: LanguageType.English
|
defaultLanguage: LanguageType.English
|
||||||
|
|||||||
Reference in New Issue
Block a user